anomalyco / anomalyco/opencode

[FEATURE]: /approve — toggle permission approval mode at runtime (on/off, per-session)

Open
#41,909 3 comments 0 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Aug 12, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Requested feature

Add an /approve on|off slash command (inspired by Claude Code's /approve on/off) to toggle manual step-by-step permission approval at runtime, optionally per session.

Why

Permissions mode is currently fixed at startup: packages/tui/src/context/permission.tsx reads args.auto and exposes an in-memory toggle(), and the CLI only supports --auto / -y / --dangerously-skip-permissions flags (packages/opencode/src/cli/cmd/run.ts). There is no interactive command to switch between normal and auto approval mid-session.

Proposed behavior

  • /approve on sets approval mode to auto; /approve off restores manual confirmation.
  • Toggle is persisted per-session (surface in PermissionV1.Ruleset / session config) and honored by the existing permission evaluation path (packages/opencode/src/permission).

Benefits

  • Go hands-free when safe, re-enable guards when tasks become risky, without restarting.
  • Mirrors Claude's /approve on|off and the existing /yolo-style flag.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.