feat(permissions): YOLO mode, global-only settings, runtime /yolo with dialog gate - #405
Open
alecuba16 wants to merge 1 commit into
Open
feat(permissions): YOLO mode, global-only settings, runtime /yolo with dialog gate#405alecuba16 wants to merge 1 commit into
alecuba16 wants to merge 1 commit into
Conversation
Adds persistent YOLO mode (bypass all permission prompts) plus a runtime /yolo command, split from Kuberwastaken#388 as its own PR. - config.yolo_mode ("yoloMode"): when true, the effective permission mode is BypassPermissions at startup. Same root/sudo guard as --dangerously-skip-permissions (the guard is kept, not skipped). - SECURITY: yolo_mode is global-only in Settings::merge (pinned to base, same pattern as skip_dangerous_mode_permission_prompt). A project .claurst/settings.json cannot enable or disable it. - /yolo [on|off|toggle]: runtime toggle. Turning on goes through the BypassPermissionsModeDialog gate (accept activates, decline cancels without exiting). /yolo off restores the mode active before /yolo on instead of hard-setting Default, so plan/acceptEdits survive. - Session-only: runtime /yolo does not write settings.json. - Tests: merge global-only (3 core tests incl. tempdir isolation via CLAURST_HOME), dialog accept/decline, mode restore, toggle (5 TUI tests). No test writes the real user settings.
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second split from #388 (bang commands landed as #404). YOLO mode only, branched off main, no shared payload with the other splits.
What this adds
config.yolo_mode("yoloMode"in settings.json): when true, the effective permission mode isBypassPermissionsat startup./yolo [on|off]runtime toggle, gated by the existingBypassPermissionsModeDialog.Security review points addressed
Settings::mergepinsyolo_mode: base.config.yolo_mode, the same pattern asskip_dangerous_mode_permission_prompt. A cloned repo shipping{"config":{"yoloMode":true}}cannot flip bypassPermissions on; a globalfalsecannot be overridden by a project file. Covered byyolo_mode_is_global_only_in_mergeplus a tempdir test (project_settings_cannot_enable_yolo_mode) that writes an isolatedCLAURST_HOMEglobal and a project settings file withyoloMode: trueand asserts the merged result is off.yoloModestartup path runs the sameUid::effective().is_root()bail as--dangerously-skip-permissions. The guard is not skipped./yologoes through the dialog./yolo onshowsBypassPermissionsModeDialogfirst (yolo_pendingflag distinguishes the runtime toggle from the startup gate). Accepting switches the mode; declining cancels the toggle and dismisses the dialog without exiting./yolo offdoes not hard-setDefault. The mode active before/yolo onis remembered and restored, soplan/acceptEditssessions survive a YOLO round-trip./yolois session-only (nosave_syncin its path). The tempdir test isolatesCLAURST_HOMEsocargo testnever touches the developer settings.json.Tests
cargo check --workspace,cargo clippy --workspace --all-targets -- -D warnings, and both test suites pass. Thesettings_screencount test failure on main is pre-existing and unrelated.Docs
docs/commands.md(CRLF preserved) documents/yolo;docs/configuration.mddocumentsyolo_modewith the global-only note.