Repository navigation
feat(launch): every session starts in bypass permissions, with --yolo - #77
Merged
Merged
Conversation
Claude Code now starts an interactive session in auto mode whenever no settings source names a mode, and --resume never restores bypass. The claude/clp launchers passed only --allow-dangerously-skip-permissions, so new sessions and every herdr-restored pane came back in auto. - claude, clp (POSIX, fish, PowerShell) and claude-as start with --dangerously-skip-permissions. A first -a, --yolo, --unsafe, --bypass or -adskp is accepted and dropped: `claude-as you@example.com --yolo`. - A mode named on the command line (--permission-mode, or the allow/skip flags themselves, before any `--`) wins; bypass then stays on Shift+Tab. Without this, --dangerously-skip-permissions would override it. - Setup sets permissions.defaultMode to bypassPermissions in user settings, so resumes and direct runs start in bypass too. It is its own choice (--no-bypass-default / -NoBypassDefault, off under --minimal), keeps a mode the user set, and writes nothing as root outside a sandbox, where Claude Code would refuse to start at all. - claude-as --move resumes a session last in manual mode with --permission-mode=default, since the launch default is now bypass. Tests: bats 181 across the touched suites (dash and zsh included), Pester 189, shellcheck, shfmt, PSScriptAnalyzer. Real Claude Code 2.1.308: 23 -p runs through the generated functions and claude-as, and 18 interactive sessions in tmux reading the status line: plain claude shows "auto mode on" before, and "bypass permissions on" through every launcher after. Cross-reviewed by a second Claude session, two rounds, 95. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
Claude Code now starts an interactive session in auto mode whenever no settings source names a mode, and
--resumenever restores bypass. Theclaude/clplaunchers passed only--allow-dangerously-skip-permissions, so new sessions and every herdr-restored pane came back with⏵⏵ auto mode oninstead of⏵⏵ bypass permissions on.What
claude,clp(POSIX, fish, PowerShell) andclaude-asstart with--dangerously-skip-permissions. A first-a,--yolo,--unsafe,--bypassor-adskpis accepted and dropped, soclaude-as you@example.com --yoloworks.--permission-mode, or the allow/skip flags themselves, before any--) wins, and bypass stays on Shift+Tab. Without this,--dangerously-skip-permissionswould override the named mode.permissions.defaultMode: "bypassPermissions"in user settings, so resumes and direct runs start in bypass too.--no-bypass-default/-NoBypassDefaultopts out, and--minimalleaves it off.permissionsvalue that is not an object is left alone with a warning.claude-as --moveresumes a session that was last in manual mode with--permission-mode=default.Verification
-pruns through the generated functions andclaude-as, checkingpermissionModein the init event.claudeshowedauto mode on. After it, every launcher showsbypass permissions on, and a named--permission-modeshows that mode.🤖 Generated with Claude Code