Skip to content

Add /yolo slash command to toggle skip-permissions live - #485

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-6297-add-yolo-slash-command-to-toggle-skip-permissions-mid
Aug 19, 2026
Merged

Add /yolo slash command to toggle skip-permissions live#485
TheGreatAxios merged 2 commits into
mainfrom
cl-6297-add-yolo-slash-command-to-toggle-skip-permissions-mid

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

Adds a /yolo slash command that toggles --dangerously-skip-permissions for the rest of the session, with a clear status flash and transcript notice.

Closes CL-6297.

Changes

  • /yolo flips live skipPermissions via the permission gate
  • Status/transcript feedback when enabling or disabling
  • Wired through built-in command registry (same surface as other session toggles)

Test plan

  • Targeted unit/command tests green in worktree
  • Pre-commit typecheck + build on commit
  • Manual: /yolo enables skip-permissions; consequential tools do not ask
  • Manual: /yolo again disables; asks resume
  • Manual: does not affect auto-mode envelope

@linear-code

linear-code Bot commented Aug 19, 2026

Copy link
Copy Markdown

CL-6297

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed as reviewer of record against CL-6297.

Verdict: approve (GitHub will not let this identity formally approve its own PR).

/yolo is a live twin of the CLI skip-permissions flag: it flips setSkipPermissions on the existing gate and pre-gate sandboxes consult a getter, so outside-workspace access unlocks (or re-locks) without rebuilding plugins.

Checked:

  • Command: /yolo, /yolo on, /yolo off; bare invocation toggles. Missing context (exec) returns not available in this mode.
  • Enable message states the envelope: gate bypassed, secret-guard and authz remain.
  • Envelope holds: secretGuardPlugin and authzPlugin sit before permissionPlugin and do not read skip-permissions. Gate evaluate() early-returns the same way the CLI flag already does.
  • Live sandbox consult: pathEscapePlugin, deleteFilePlugin, shellGuardPlugin / persistent cwd, and list_dir all take allowOutside: () => permissionGate.getSkipPermissions().
  • Tests cover command on/off/toggle/unknown/unwired, gate live toggle, and per-call allowOutside getters.
  • ARCHITECTURE / IMPLEMENTATION / PRODUCT (secret guard, path sandbox, recovery) mention /yolo.

Nits (not blocking):

  • Ticket listed an explicit toggle argument. Handler treats only empty args as toggle and rejects toggle with Usage: /yolo [on|off]. Easy follow-up if you want the ticket text to be literal.
  • PRODUCT.md's built-in slash-command list still omits /yolo even though nearby paragraphs mention it.

Commit message is plain English and matches the change.

Mirror setAuto with setSkipPermissions, resolve allowOutside per call so
sandboxes honor the toggle, and wire /yolo on|off|toggle in the TUI.
Bare /yolo already toggled; the ticket also named an explicit
toggle argument. PRODUCT now includes /yolo in the slash list.
@TheGreatAxios
TheGreatAxios force-pushed the cl-6297-add-yolo-slash-command-to-toggle-skip-permissions-mid branch from 394972a to fc08b88 Compare August 19, 2026 07:22
@TheGreatAxios
TheGreatAxios merged commit 5d09423 into main Aug 19, 2026
2 checks passed
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