Skip to content

Agent stuck in an infinite loop [Minimax-2.7, any mode] #19267

Closed as not planned

Description

@GregoireBellon

Description

When asking a simple question using Minimax-2.7 using any mode, the session gets infinitely compacted, and the agent is stuck in an infinite loop.

From what I tested, it also happens with Minimax-2.5, on any sort of project.

Plugins

No response

OpenCode version

1.3.2

Steps to reproduce

Have Context7 installed.
Use the minimax provider.
Clone this repository

In plan mode, using MiniMax-M2.7, prompt "@general In this repo, we're using express, use Context7 to give me doc relative to the version of express we're using"

Screenshot and/or share link

https://opncd.ai/share/Ukj0vDVV

Operating System

Fedora Linux 43 (Workstation Edition), Linux 6.19.8-200.fc43.x86_64

Terminal

Ghostty version=1.3.1-1.fc43

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    perfIndicates a performance issue or need for optimization
    on Mar 26, 2026
  2. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Please review these issues and comment if yours is distinct, so we can avoid duplicating effort.

  3. buithehien1991 commented on Mar 26, 2026

    @buithehien1991

    +1

  4. Ownistic commented on Apr 11, 2026

    @Ownistic

    I also noticed this issue, I'm using minimax 2.7 from minimax.io and minimax 2.7 high speed, I noticed the high speed model does this more often but both of them do it

  5. neuhaus commented on May 1, 2026

    @neuhaus

    That's not an opencode bug, that's an issue with the LLM or more likely the LLM provider because they did a bad job.

  6. removed
    bugSomething isn't working
    perfIndicates a performance issue or need for optimization
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  7. manugerahgunawan commented on May 13, 2026

    @manugerahgunawan

    Sharing my experience with infinite compaction on m2.7
    Image

    Image

    I greeted the agent in opencode then it got automatically compacted over and over

    I tested with kimi and got
    Image
    In my case, somehow opencode loaded up all skills (from project and claude global), instead of using it per manual invocation like many other IDE.

    For your case, maybe you can do the same check with a bigger context model and ask what the initial context is filled with.

  8. gregoire-galadrim commented on May 20, 2026

    @gregoire-galadrim

    @manugerahgunawan thanks for your feedback : I have the same problem, it loads all of my MCPs and skills, which fills up the whole context and causes an infinite compaction

  9. MassEast commented on May 21, 2026

    @MassEast

    Putting the below into my settings.json helped

      "compaction": {
        "auto": true,
        "prune": true,
        "reserved": 4096
      },
    
  10. github-actions commented on Jul 21, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions