anomalyco / anomalyco/opencode
[FEATURE]: /approve — toggle permission approval mode at runtime (on/off, per-session)
Open
@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 onsets approval mode to auto;/approve offrestores 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|offand the existing/yolo-style flag.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.