Skip to content

Sub Agents Do Not Obey Plan / Build mode. #23533

Closed

Description

@Czargasm

Description

I just had a sub agent do a lot of building behind the scenes when I was in plan mode waiting for the LLM to diagnose a problem.

It spawned 3 agents.. 2 of them started doing what they were supposed to and the 3rd one decided to start implementing changes.

Plugins

None I keep it very vanilla.

OpenCode version

v1.14.17

Steps to reproduce

Not sure. First time that has happened to me but it made me very paranoid.

I was using Kimi 2.5 on Opencode GO.

Screenshot and/or share link

No response

Operating System

Debian 13.4

Terminal

Windows Terminal

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 20, 2026
  2. github-actions commented on Apr 20, 2026

    @github-actions
    Contributor

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

    If your issue is distinct (e.g., specific to sub-agents spawned via the Task tool rather than the primary agent), please clarify how it differs from the above.

  3. Czargasm commented on Apr 20, 2026

    @Czargasm
    Author

    I didn't compact.. this was a fresh session. I don't think it was using bash but it might have been I just immediately panicked and tried to stop it but you can't double esc a sub agent so I went to main agent and stopped it. It even denied that it edited files until I made it check and then it had a lot of repairing to do.

  4. MartinEmrich commented on Apr 21, 2026

    @MartinEmrich

    Same here, experienced this across various models (Qwen3.5, Qwen3.5, Anthropic Claude Haiku and Sonnet), projects and sessions. The core issue is that OpenCode does not enforce write tool call restrictions in Plan mode, it only "hopes" the model adheres to the instructions. If the model does a writing tool call (even hidden in a bash or python command line execution), there's nothing stopping it.

  5. iceman1010 commented on Apr 26, 2026

    @iceman1010

    Some models are really terrible. They kind of don't care at all if you're in plan mode. And this is not only about sub-agents. Something needs to be done to restrict it in plan mode.

  6. neuhaus commented on May 1, 2026

    @neuhaus

    This critical issue is a duplicate of issue #7292 and hasn't been fixed since it was introduced on Jan 1st.

  7. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  8. Czargasm commented on May 6, 2026

    @Czargasm
    Author

    Damn that's a long time for this issue to be unfixed. I've mitigated the problems with 3 different kinds of backups but it would be nice to just be able to trust plan mode. Might as well close this one since its a dupe.

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