BUG: Sonic gets stuck in plan mode. #1394

Closed
opened 2026-02-16 17:30:47 -05:00 by yindo · 8 comments
Owner

Originally created by @justindonnaruma on GitHub (Aug 20, 2025).

Originally assigned to: @rekram1-node on GitHub.

  • 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".

Originally created by @justindonnaruma on GitHub (Aug 20, 2025). Originally assigned to: @rekram1-node on GitHub. * 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".
yindo closed this issue 2026-02-16 17:30:47 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 20, 2025):

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

  • #2077: Similar mode confusion where Claude claims work is complete in build mode after hallucinating in plan mode
  • #1965: Model ignoring mode restrictions and trying to perform actions outside of plan mode scope
  • #1799: Models ignoring plan mode restrictions and attempting to write files

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.

@github-actions[bot] commented on GitHub (Aug 20, 2025): This issue might be a duplicate of existing issues. Please check: - #2077: Similar mode confusion where Claude claims work is complete in build mode after hallucinating in plan mode - #1965: Model ignoring mode restrictions and trying to perform actions outside of plan mode scope - #1799: Models ignoring plan mode restrictions and attempting to write files 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.
Author
Owner

@ActuallyTrent commented on GitHub (Aug 20, 2025):

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.

@ActuallyTrent commented on GitHub (Aug 20, 2025): 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.
Author
Owner

@rekram1-node commented on GitHub (Aug 20, 2025):

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

@rekram1-node commented on GitHub (Aug 20, 2025): 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
Author
Owner

@rekram1-node commented on GitHub (Aug 21, 2025):

Updated prompt, should be a bit better

@rekram1-node commented on GitHub (Aug 21, 2025): Updated prompt, should be a bit better
Author
Owner

@renich commented on GitHub (Aug 29, 2025):

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

@renich commented on GitHub (Aug 29, 2025): I started trying sonic today and it's failing. It insists it's on planning mode and that it cannot write files.
Author
Owner

@rekram1-node commented on GitHub (Aug 29, 2025):

@renich are you on latest?

@rekram1-node commented on GitHub (Aug 29, 2025): @renich are you on latest?
Author
Owner

@rekram1-node commented on GitHub (Aug 29, 2025):

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

@rekram1-node commented on GitHub (Aug 29, 2025): grok-code does have this issue much more than other models, that's something I've noticed
Author
Owner

@renich commented on GitHub (Aug 29, 2025):

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

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

@renich commented on GitHub (Aug 29, 2025): @rekram1-node yes, I am. I'm using: `npx opencode-ai@latest` to launch. And, btw, after `/compact`, everything started working again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1394