Add auto-enable Claude Code remote control setting#163
Merged
dhilgaertner merged 2 commits intomainfrom Apr 14, 2026
Merged
Conversation
Adds a Settings > General toggle that launches new Claude Code sessions with `--rc --name '<session.name>'` so they appear in claude.ai's Remote Control panel under the matching Crow session name (Manager tab shows as "Manager"). Applies to worker auto-launch, the Manager terminal, and crow-CLI-spawned terminals. A small antenna badge marks sessions whose Claude was launched with RC active. Closes #157 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
c81f76d to
b297c38
Compare
The Manager terminal is persisted and its `command` is executed directly by the shell, so the stored string must reflect the current RC setting before `preInitialize` runs. Rebuilds the Manager terminal's command in `hydrateState` from `appState.remoteControlEnabled` (moved to be set before hydrate) so toggling the preference — or installing this change on top of a pre-existing Manager — takes effect on next launch and the badge is surfaced. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 tasks
dhilgaertner
added a commit
that referenced
this pull request
Apr 15, 2026
## Summary - `/crow-workspace` and `/crow-batch-workspace` now launch Claude Code with `--rc --name '<session-name>'` whenever the global **Settings → Remote Control** is on, closing the gap left by #163 which only wired RC into app-initiated launches. - Adds two small helpers to `skills/crow-workspace/setup.sh`: `posix_quote` (mirrors Swift's `ClaudeLaunchArgs.shellQuote` byte-for-byte — including the `'\''` apostrophe escape) and `is_remote_control_enabled` (reads `{devRoot}/.claude/config.json`; missing file / absent key / malformed JSON all default to off, matching `AppConfig.decodeIfPresent`). - No Swift/app changes needed. `/crow-batch-workspace` inherits the fix automatically since it delegates to this script. Closes #164 ## Test plan - [x] Unit-verified `posix_quote` output matches `ClaudeLaunchArgsTests` (`Manager` → `'Manager'`; `Bob's session` → `'Bob'\''s session'`). - [x] Unit-verified `is_remote_control_enabled` across six config states: key=true, key=false, key absent, file missing, pretty-printed+true, malformed. - [x] `bash -n` syntax check. - [ ] Manual: with **Remote Control off**, run `/crow-workspace` on a test ticket and confirm the launched command is `claude --permission-mode plan "$(cat …)"` (no `--rc`). - [ ] Manual: with **Remote Control on**, run `/crow-workspace` on a test ticket and confirm the command includes `--rc --name '<session-name>'` and the session appears in Claude.ai's Remote Control panel with the antenna badge. - [ ] Manual: `/crow-batch-workspace` with two tickets while RC is on — both terminals launch with `--rc --name '…'`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Dustin Hilgaertner <dustinhilgaertner@Dustins-Mac-mini.local> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7 tasks
dhilgaertner
added a commit
that referenced
this pull request
Apr 22, 2026
## Summary - Adds a `managerAutoPermissionMode` setting (default `true`) that passes `--permission-mode auto` to the Manager's `claude` launch, eliminating per-call approval prompts for the `crow`, `gh`, and `git` commands the Manager runs to orchestrate workspaces. - Exposes a Settings → General → **Manager Terminal** toggle so users on plans or providers where auto mode is unavailable (Pro plan, Bedrock/Vertex/Foundry, Claude Code < 2.1.83) can opt out. - Scope is Manager-only — worker sessions and `crow new-terminal`–spawned terminals keep the default permission mode. Implementation mirrors the existing `remoteControlEnabled` plumbing added in #163: field on `AppConfig` → mirror on `AppState` → new optional parameter on `ClaudeLaunchArgs.argsSuffix(...)` → wired into both Manager launch paths in `SessionService` (first-time creation and hydration rebuild). Closes #187. ## Test plan - [x] `make build` — clean build. - [x] `swift test --package-path Packages/CrowCore` — 112 tests pass (3 new `ClaudeLaunchArgs` cases, 2 new `AppConfig` cases including forward-compat default). - [x] `swift test --package-path Packages/CrowPersistence` — 7 tests pass (new `ConfigStore` round-trip for the new field, plus the forward-compat test extended to assert legacy configs default to `true`). - [x] Fresh launch with no `.claude/config.json` key — confirm Manager's `ps` argv contains `--permission-mode auto`. - [x] Toggle off in Settings → relaunch → confirm flag is gone from Manager argv and running `gh issue view …` now prompts for approval. - [x] Toggle back on → relaunch → confirm flag returns and the same `gh` call runs without a prompt. - [x] Confirm worker sessions and CLI-spawned terminals do **not** include `--permission-mode auto`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <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.
Summary
--rc --name '<session.name>', so it shows up in claude.ai's Remote Control panel under the same name as the Crow session (Manager tab appears asManager).SessionService.launchClaude), the Manager terminal (ensureManagerSession), and crow-CLI-spawned terminals (AppDelegate.resolveClaudeInCommandvia thenew-terminalRPC).--rc, so toggling the setting mid-session doesn't falsely flag older sessions.Implementation notes
AppConfig.remoteControlEnabled), matching thenotifications/sidebarshape. Decodes withdecodeIfPresentfor forward-compat — olderconfig.jsonfiles continue to work.CrowCore/ClaudeLaunchArgshelper (POSIX-quoted--name), used by bothSessionServiceandresolveClaudeInCommand.resolveClaudeInCommandalso guards against double-injection if the command already contains--rc/--remote-control.AppState.remoteControlEnabledis hydrated at launch (beforeensureManagerSession) and kept in sync insaveSettings, so the toggle takes effect without an app restart.Closes #157
Test plan
make buildsucceedsmake test— CrowCore (incl. 5 newClaudeLaunchArgstests +appConfigRemoteControlRoundTrip) and CrowPersistence (incl.configStoreForwardCompatDefaultsRemoteControlOff) pass/crow-workspace; confirm the terminal's first line showsclaude --rc --name '<session>' --continue(or the initial prompt) and the antenna badge appears in the sidebar + header--rc --name '<session>'and Manager tab launches with--rc --name 'Manager'--rc, no badge🤖 Generated with Claude Code