Skip to content

[BUG][v2]: Build agent remains in Plan mode after reverting to a Plan-agent message #42439

Closed

Description

@ConvoCortex

Description

After reverting a conversation to a point where the most recent agent was Plan, switching the active agent to Build does not correctly restore Build’s agent context. Build keeps receiving the Plan-mode system reminder and refuses file edits or other implementation work.

Expected behavior
After selecting Build, it should receive Build’s system context and be allowed to perform implementation work, independent of the agent active at the reverted point.
Actual behavior
Build still receives the Plan-mode reminder telling it that it is in Plan mode and cannot edit or create files. It refuses to build despite Build being selected.
Workaround
After reverting, send any additional message while still using Plan. Then switch to Build. Build receives the correct context and works normally.

Plugins

No response

OpenCode version

0.0.0-next-17403 (next channel)

Steps to reproduce

Steps to reproduce

  1. Start a session and use the Plan agent.
  2. Use revert to restore the conversation to a point where the last retained agent message/state is Plan.
  3. Switch the active agent to Build.
  4. Ask Build to make an implementation change.

Screenshot and/or share link

No response

Operating System

Linux 6.18.33.2-microsoft-standard-WSL2 (x86_64)

Terminal

windows terminal

Activity

  1. github-actions commented on Aug 13, 2026

    @github-actions
    Contributor

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

  2. opencode-agent commented on Aug 16, 2026

    @opencode-agent
    Contributor

    Fixed by #42652. The merged change reconciles the live Plan enter/leave reminder with the durable session agent on every model request, including after committed reverts, so Build no longer inherits a stale Plan reminder. Closing as completed.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions