You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
take a look in my dotfiles/tmux/.local/bin and help me refactor these. I want to simplify it. All of this is triggered by ^ f (alias in .zshrc). Steps: 1. look for a session named after the project I selected. 2. if it exists, attach, if not, create a new tmux session named after the selected project with two windows. One is my shell located at the project's root, and the second is nvim opened at the project's root.
Apologies if this issue is light on details. This was the first prompt of the first session of the day. If there is any more specifics that you'd like me to add here I am happy to do so.
Thanks for the report, @MCotter92, and no need to apologise for the short description.
Version 1.18.35 is OpenCode v1, which now only gets fixes for critical bugs (data loss, security, breakage with no workaround), so this is unlikely to be fixed there. In v1, Plan mode relies largely on instructions to the model, and models sometimes still change files, often through shell commands. #39491 tracks the same behaviour.
Workaround for v1: make the plan agent ask before running shell commands or editing files, for example in opencode.json:
We'd encourage you to try OpenCode v2 (@opencode/cli, run as opencode2). Its Plan agent has a hard permission rule that blocks the edit, write and patch tools outside its own plan directory (~/.opencode/plan), instead of relying on the model to follow instructions.
If you believe this is critical, or you see Plan mode modify files on v2 as well, please reply here, ideally saying whether the change was made with the edit tool or a shell command.
Closing this as not planned. It was reported on OpenCode v1 (1.18.35), which only gets critical fixes, and we haven't heard back since our last comment. The same v1 Plan mode behaviour is tracked in #39491. Until then, setting the plan agent's edit permission to deny and its bash permission to ask keeps it from changing files without your say-so.
One correction to my earlier comment: OpenCode v2 is the npm package @opencode/cli, and its command is opencode, not opencode2. In v2, the Plan agent can't use the edit, write or patch tools outside its plan directory.
If you see Plan mode modify files on v2, please open a new issue. It helps to say whether the change was made with the edit tool or a shell command. Thanks for the report, @MCotter92!
Activity
opencode-agent commentedon Oct 7, 2026
Thanks for the report, @MCotter92, and no need to apologise for the short description.
Version 1.18.35 is OpenCode v1, which now only gets fixes for critical bugs (data loss, security, breakage with no workaround), so this is unlikely to be fixed there. In v1, Plan mode relies largely on instructions to the model, and models sometimes still change files, often through shell commands. #39491 tracks the same behaviour.
Workaround for v1: make the
planagent ask before running shell commands or editing files, for example inopencode.json:{ "agent": { "plan": { "permission": { "edit": "deny", "bash": "ask" } } } }We'd encourage you to try OpenCode v2 (
@opencode/cli, run asopencode2). Its Plan agent has a hard permission rule that blocks the edit, write and patch tools outside its own plan directory (~/.opencode/plan), instead of relying on the model to follow instructions.If you believe this is critical, or you see Plan mode modify files on v2 as well, please reply here, ideally saying whether the change was made with the edit tool or a shell command.
github-actions commentedon Oct 7, 2026
This issue might be a duplicate of existing issues. Please check:
For keybind-related issues, please also check our pinned keybinds documentation: #4997
rtkirill commentedon Oct 9, 2026
Same for me, editing code in a Plan mode
opencode-agent commentedon Oct 10, 2026
Closing this as not planned. It was reported on OpenCode v1 (1.18.35), which only gets critical fixes, and we haven't heard back since our last comment. The same v1 Plan mode behaviour is tracked in #39491. Until then, setting the
planagent'seditpermission todenyand itsbashpermission toaskkeeps it from changing files without your say-so.One correction to my earlier comment: OpenCode v2 is the npm package
@opencode/cli, and its command isopencode, notopencode2. In v2, the Plan agent can't use the edit, write or patch tools outside its plan directory.If you see Plan mode modify files on v2, please open a new issue. It helps to say whether the change was made with the edit tool or a shell command. Thanks for the report, @MCotter92!