Skip to content

opencode in plan mode inside cursor is making edits to the codebase #2258

Closed

Description

@luisrudge
Image

Activity

  1. github-actions commented on Aug 26, 2025

    @github-actions
    Contributor

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

    The issue #1682 describes a similar problem where plan mode system prompts are being dumped/repeated infinitely, which could manifest as the agent making unwanted edits instead of staying in plan mode as expected.

    Feel free to ignore if none of these address your specific case.

  2. smazurov commented on Aug 26, 2025

    @smazurov

    yup, same here, not related to vscode integration (happens in terminal as well).

  3. luisrudge commented on Sep 7, 2025

    @luisrudge
    Author

    yeah this is pretty consistent now.. most things that I ask in plan mode are being edited right away.

  4. rekram1-node commented on Sep 7, 2025

    @rekram1-node
    Contributor

    thx for raising I will look into it

  5. Sewer56 commented on Sep 7, 2025

    @Sewer56
    Contributor

    I find that if thinking is disabled on the Anthropic models, then plan mode will often write to the files. With thinking, not so much.

    Unfortunately, thinking mode is disabled by default, and it's not really clear for a user how to enable it, because the only documented way to do so is in a model configuration example in the docs.

  6. pmatos commented on Sep 8, 2025

    @pmatos

    I just noticed that Qwen3 code + planning mode also just starts editing the source code instead of formulating a plan.

  7. rekram1-node commented on Sep 8, 2025

    @rekram1-node
    Contributor

    when yall are saying it tries to edit, you are referring to how it prompts you with edits even tho it is in plan mode, correct?

    Permission is required from user to actually make edits

  8. luisrudge commented on Sep 8, 2025

    @luisrudge
    Author

    OC doesn't ask me anything.. I'm sure I already said 'always allow' or something in the past since I don't care about these permissions

  9. rekram1-node commented on Sep 8, 2025

    @rekram1-node
    Contributor

    @luisrudge what version are you on, that is unexpected behavior in plan mode (unless you always allowed it):

    opencode --version
    0.6.6
    
  10. luisrudge commented on Sep 8, 2025

    @luisrudge
    Author

    0.6.5

  11. Sewer56 commented on Sep 8, 2025

    @Sewer56
    Contributor

    What I experienced at least myself was that the (non-thinking) model would try to make an edit, and that edit would just... happen. No prompt asking the user, nothing. Autopilot.

    On a fresh config, without any sort of permission overrides for slash commands or agents whatsoever.

    On 0.6.4, when I made the comment above.

  12. rekram1-node commented on Sep 9, 2025

    @rekram1-node
    Contributor

    should be fixed in next release: #2505

  13. rekram1-node commented on Sep 14, 2025

    @rekram1-node
    Contributor

    closing for now lmk if anyone has more issues w/ plan mode

  14. juanmpga commented on Nov 30, 2025

    @juanmpga

    I've just had the same issue on the terminal, with Claude Opus 4.5. At some point I've probably answer some permission requirements with the "accept always" option in case that has anything to do (but I'd expect Plan mode not to intend any edits in the first place, regardless of permissions).

    Btw, superhappy with the tool in general, what an amazing piece of work you've done!!

  15. Sewer56 commented on Nov 30, 2025

    @Sewer56
    Contributor

    This tends to happen with certain models and is model specific.
    Qwen 3 Coder, Gemini 3, Opus 4.5 are ones I've seen it in.

    They'll just use commands like cat to overwrite the files in plan mode.

  16. juanmpga commented on Dec 9, 2025

    @juanmpga

    Thanks for the info. As a quick update, over the last days I haven't had any unexpected edits on Plan mode, so it may be fixed now (at least for Opus 4.5).

  17. alexfedosov commented on Jan 13, 2026

    @alexfedosov

    Still happens pretty consistently with Gemini 3 Pro and opencode 1.0.167

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