Launch Manager terminal in auto permission mode by default#189
Merged
dhilgaertner merged 3 commits intomainfrom Apr 22, 2026
Merged
Launch Manager terminal in auto permission mode by default#189dhilgaertner merged 3 commits intomainfrom
dhilgaertner merged 3 commits intomainfrom
Conversation
Adds a `managerAutoPermissionMode` setting (default on) that passes `--permission-mode auto` to the Manager's `claude` launch so crow/gh/git orchestration runs without per-call approval. Exposed via a new Settings toggle for users on plans/providers where auto mode is unavailable. Closes #187 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dgershman
approved these changes
Apr 22, 2026
Collaborator
dgershman
left a comment
There was a problem hiding this comment.
Code & Security Review
Critical Issues
None found.
Security Review
Strengths:
- Auto permission mode is scoped exclusively to the Manager terminal — worker sessions and CLI-spawned terminals are explicitly unaffected, preserving the principle of least privilege for user-facing code sessions.
- The setting defaults to
truebut provides a clear opt-out path via Settings UI, with documentation explaining which plans/providers support it. - No secrets, credentials, or sensitive data are exposed. The feature simply passes a CLI flag (
--permission-mode auto) — the actual permission enforcement remains in Claude Code itself. - Shell argument construction uses
shellQuote()for safe interpolation, preventing command injection via session names.
Concerns:
- None. The blast radius is well-contained: one boolean flag on a single terminal type, with the underlying permission enforcement delegated to Claude Code's own auto-mode implementation.
Code Quality
- Clean implementation that mirrors the established
remoteControlEnabledplumbing pattern (AppConfig → AppState → ClaudeLaunchArgs → SessionService), making it easy to follow. argsSuffixrefactored from early-return guard to additive string building — handles the 2×2 matrix of (remoteControl × autoPermissionMode) cleanly.- Default parameter
autoPermissionMode: Bool = falsepreserves backward compatibility for all existing call sites without requiring changes. - Forward-compatible decoding via
decodeIfPresent(...) ?? trueensures legacy configs without the key automatically get auto mode — good UX for existing users. - Both Manager launch paths (first-time creation at
SessionService.swift:265and hydration rebuild atSessionService.swift:72) are updated consistently. - Comprehensive test coverage: 3 new
ClaudeLaunchArgstests (auto-only, auto+RC, default-off), 2 newAppConfigtests (round-trip, missing-key default), and 1 newConfigStorepersistence test. All 136 tests pass. - Settings UI toggle includes clear guidance text about requirements and when to opt out.
- Documentation updated in README.md and
docs/configuration.mdwith accurate plan/provider/version requirements.
Summary Table
| Priority | Issue |
|---|---|
| 🟢 | Consider: the docs/configuration.md section lists specific model names (Sonnet 4.6, Opus 4.6, Opus 4.7) — these may need updating as new models ship, but that's a docs maintenance concern, not a code issue. |
Recommendation: Approve — well-scoped feature with clean implementation, good test coverage, and no security concerns. Follows established patterns and is properly documented.
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.
Summary
managerAutoPermissionModesetting (defaulttrue) that passes--permission-mode autoto the Manager'sclaudelaunch, eliminating per-call approval prompts for thecrow,gh, andgitcommands the Manager runs to orchestrate workspaces.crow new-terminal–spawned terminals keep the default permission mode.Implementation mirrors the existing
remoteControlEnabledplumbing added in #163: field onAppConfig→ mirror onAppState→ new optional parameter onClaudeLaunchArgs.argsSuffix(...)→ wired into both Manager launch paths inSessionService(first-time creation and hydration rebuild).Closes #187.
Test plan
make build— clean build.swift test --package-path Packages/CrowCore— 112 tests pass (3 newClaudeLaunchArgscases, 2 newAppConfigcases including forward-compat default).swift test --package-path Packages/CrowPersistence— 7 tests pass (newConfigStoreround-trip for the new field, plus the forward-compat test extended to assert legacy configs default totrue)..claude/config.jsonkey — confirm Manager'spsargv contains--permission-mode auto.gh issue view …now prompts for approval.ghcall runs without a prompt.--permission-mode auto.🤖 Generated with Claude Code