Skip to content

Conversation

@AndyWendt
Copy link

@AndyWendt AndyWendt commented Jan 17, 2026

Summary

Fixes slopus/happy#206 - 'yolo' mode not sticking in happy app

This PR contains two related fixes:

Fix 1: Set options.permissionMode when --yolo flag is used

The --yolo flag only passed --dangerously-skip-permissions to Claude CLI but did not set options.permissionMode internally. This caused the PermissionHandler to stay in "default" mode.

// Before: only passes CLI flag to Claude
} else if (arg === '--yolo') {
  unknownArgs.push('--dangerously-skip-permissions')
}

// After: ALSO sets internal permissionMode
} else if (arg === '--yolo') {
  unknownArgs.push('--dangerously-skip-permissions')
  options.permissionMode = 'bypassPermissions'
}

Fix 2: Preserve CLI permission mode when mobile sends "default"

When the CLI is started with --yolo, messages from the mobile app with permissionMode: "default" would override the CLI's setting. Now the CLI's explicit mode is preserved unless the mobile explicitly chooses a different mode.

// If CLI was started with --yolo, don't let "default" messages override it
if (cliPermissionMode && incomingMode === 'default') {
    messagePermissionMode = cliPermissionMode;
}

Test Plan

  • Built and installed CLI locally
  • Started happy --yolo in tmux
  • Verified "bypass permissions on" shows in status bar
  • Confirmed Bash tool executes without permission prompt
  • Tested that mobile messages with permissionMode: "default" don't reset yolo mode

Related

The --yolo flag only passed --dangerously-skip-permissions to Claude CLI
but did not set options.permissionMode internally. This caused the
PermissionHandler to stay in "default" mode for remote/mobile sessions,
resulting in permission prompts even when yolo mode was selected.

Now --yolo correctly sets options.permissionMode = 'bypassPermissions'
so the PermissionHandler auto-allows tool requests in both local CLI
and remote/mobile modes.

Fixes slopus/happy#206
When the CLI is started with --yolo, the permission mode should persist
even when mobile messages include permissionMode: "default". The mobile
app can still override with an explicit mode (acceptEdits, plan, etc.),
but a "default" message won't reset the CLI's explicit --yolo setting.

This fixes the issue where running `happy --yolo` and then sending a
message from the mobile app would reset to default permission mode.

Part of slopus/happy#206
@AndyWendt AndyWendt marked this pull request as draft January 17, 2026 20:19
@AndyWendt
Copy link
Author

Closing in favor of a new PR based on v0.13.0

@AndyWendt AndyWendt closed this Jan 17, 2026
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.

'yolo' aka --dangerously-skip-permissions mode not sticking in happy app

1 participant