Skip to content

Conversation

@surma
Copy link

@surma surma commented Jan 6, 2026

I don't know if you all have any interest in this, but I whipped this up because I really enjoy the simplicity of this flag in Claude Code.

So this adds a CLI flag and environment variable to bypass all permission prompts, similar to Claude Code's implementation.

Happy to take feedback or just throw this away if you don't think this is the right approach.

Usage

# CLI flag
opencode --dangerously-skip-permissions

# Environment variable
OPENCODE_DANGEROUSLY_SKIP_PERMISSIONS=true opencode

# With run command
opencode run --dangerously-skip-permissions "do something"

Behavior

  • Skips all ask permission prompts (auto-allows)
  • deny rules still apply (explicit denies are respected)
  • Shows "△ YOLO mode" warning in the TUI (home screen, footer, and sidebar)

Changes

  • flag.ts: Add OPENCODE_DANGEROUSLY_SKIP_PERMISSIONS env var
  • permission/next.ts: Add skipPermissions state and bypass logic in ask()
  • run.ts: Add --dangerously-skip-permissions option
  • thread.ts: Add --dangerously-skip-permissions option, propagate to TUI via args
  • args.tsx: Add dangerouslySkipPermissions to Args interface
  • home.tsx, footer.tsx, sidebar.tsx: Show warning indicator when enabled

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant