Description
[BUG] AI agent executes commands automatically in Plan Mode without approval.
Description
There is a critical security/logic flaw where the AI agent completely ignores the Plan mode constraint and directly executes bash/system commands (such as starting/stopping local processes) without waiting for user approval.
Steps to Reproduce
- Enter
Plan mode.
- The user inputs a prompt that implies a system action (e.g., "Open Discord").
- The AI suggests a plan, but simultaneously issues and runs the PowerShell/Bash commands underneath to kill and restart the application.
- The application actually opens/closes on the local machine, meaning the tool bypassed the confirmation barrier entirely.
Actual Behavior
Even though the UI/Session shows it is in Plan mode, the backend executes the generated code/commands automatically.
Expected Behavior
In Plan mode, the agent MUST ONLY generate the plan and stop. It should never execute any code or commands until the user explicitly toggles to an execution mode or approves the action.
Environment Context
- Repository: anomalyco/opencode
- OS: Windows / macOS
- Mode: Plan Mode
windwos11 pro opencode install from npm
Plugins
No response
OpenCode version
1.15.12
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
windwos11 26200.8457
Terminal
windos terminal
Description
[BUG] AI agent executes commands automatically in Plan Mode without approval.
Description
There is a critical security/logic flaw where the AI agent completely ignores the
Planmode constraint and directly executes bash/system commands (such as starting/stopping local processes) without waiting for user approval.Steps to Reproduce
Planmode.Actual Behavior
Even though the UI/Session shows it is in
Planmode, the backend executes the generated code/commands automatically.Expected Behavior
In
Planmode, the agent MUST ONLY generate the plan and stop. It should never execute any code or commands until the user explicitly toggles to an execution mode or approves the action.Environment Context
windwos11 pro opencode install from npm
Plugins
No response
OpenCode version
1.15.12
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
windwos11 26200.8457
Terminal
windos terminal