Skip to content

[Bug] Commands auto-executed in plan mode without approval #29955

Closed as not planned

Description

@nuigurumikono

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

  1. Enter Plan mode.
  2. The user inputs a prompt that implies a system action (e.g., "Open Discord").
  3. The AI suggests a plan, but simultaneously issues and runs the PowerShell/Bash commands underneath to kill and restart the application.
  4. 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

Activity

  1. github-actions commented on May 30, 2026

    @github-actions
    Contributor

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

    If your issue is the same as one of these, please add a comment there rather than opening a new report.

  2. github-actions commented on Jul 29, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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