Skip to content

feat(launch): every session starts in bypass permissions, with --yolo - #77

Merged
gutyoh merged 1 commit into
mainfrom
feat/bypass-by-default
Oct 22, 2026
Merged

gutyoh merged 1 commit into
mainfrom
feat/bypass-by-default

Conversation

@gutyoh

@gutyoh gutyoh commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Why

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 with ⏵⏵ auto mode on instead of ⏵⏵ bypass permissions on.

What

  • 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, so claude-as you@example.com --yolo works.
  • A mode named on the command line (--permission-mode, or the allow/skip flags themselves, before any --) wins, and bypass stays on Shift+Tab. Without this, --dangerously-skip-permissions would override the named mode.
  • Setup sets permissions.defaultMode: "bypassPermissions" in user settings, so resumes and direct runs start in bypass too.
    • It is its own choice: --no-bypass-default / -NoBypassDefault opts out, and --minimal leaves it off.
    • A mode the user already set stays.
    • Nothing is written as root outside a sandbox, where Claude Code would refuse to start at all.
    • A permissions value that is not an object is left alone with a warning.
    • The VS Code extension still needs its own allow-bypass setting.
  • claude-as --move resumes a session that was last in manual mode with --permission-mode=default.

Verification

  • bats: 181 cases across the touched suites, including dash and zsh. Pester: 189. shellcheck, shfmt and PSScriptAnalyzer are clean.
  • Real Claude Code 2.1.308:
    • 23 -p runs through the generated functions and claude-as, checking permissionMode in the init event.
    • 18 interactive sessions in tmux, reading the status line. Before the change, plain claude showed auto mode on. After it, every launcher shows bypass permissions on, and a named --permission-mode shows that mode.
  • Cross-reviewed by a second Claude session over two rounds; the final confidence was 95.

🤖 Generated with Claude Code

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>
@gutyoh
gutyoh merged commit cc553a5 into main Oct 22, 2026
14 checks passed
@gutyoh
gutyoh deleted the feat/bypass-by-default branch October 22, 2026 13:51
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