Skip to content

BUG: Sonic gets stuck in plan mode. #2105

Closed

Description

@justindonnaruma
  • OS: Ubuntu 24.04 via WSL
  • OpenCode: v0.5.8
  • Model: Sonic

While attempting to switch back and forth between Plan and Build modes, I have found Sonic to get stuck in Plan mode, and refuses to come out of it.

My use case:

  • Switch to Plan mode to ask it for analysis and implementation plans, have it write a build prompt.
  • In the same session, switch to build mode and use the prompt it provided.

It responded twice with "I must stick with the system constraints".

Activity

  1. github-actions commented on Aug 20, 2025

    @github-actions
    Contributor

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

    While these issues involve different models, they all relate to similar mode-switching and mode-restriction problems. The core issue appears to be models not properly respecting mode boundaries or getting confused about their current operational mode.

    Feel free to ignore if none of these address your specific case with Sonic getting stuck with "system constraints" messages.

  2. ActuallyTrent commented on Aug 20, 2025

    @ActuallyTrent

    I don't think this is the fault of OpenCode. Mode changes (such as telling the LLM its in plan mode) happen currently as messages in the conversation (and I believe follows the anthropic pattern of <system_reminder>...</system_reminder>)

    It seems like Sonic isn't respecting subsequent changes. Perhaps their internal system prompt has very strong safeguards against disregarding system prompts (to prevent you from doing things like "ignore all previous instructions"), and maybe the system_reminder stuff is running afoul of it.

  3. self-assigned this
    on Aug 20, 2025
  4. rekram1-node commented on Aug 20, 2025

    @rekram1-node
    Contributor

    yeah this is something we can try to prompt for better but ultimately the model is confusing itself based on prior conversation context, sometimes it needs an extra push. I opened PR to help address, ultimately up to team to merge or not

  5. deleted a comment from linear on Aug 21, 2025
  6. rekram1-node commented on Aug 21, 2025

    @rekram1-node
    Contributor

    Updated prompt, should be a bit better

  7. renich commented on Aug 29, 2025

    @renich

    I started trying sonic today and it's failing. It insists it's on planning mode and that it cannot write files.

  8. rekram1-node commented on Aug 29, 2025

    @rekram1-node
    Contributor

    @renich are you on latest?

  9. rekram1-node commented on Aug 29, 2025

    @rekram1-node
    Contributor

    grok-code does have this issue much more than other models, that's something I've noticed

  10. renich commented on Aug 29, 2025

    @renich

    @rekram1-node yes, I am. I'm using: npx opencode-ai@latest to launch.

    And, btw, after /compact, everything started working again.

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