One worker system; retire Keychain product path - #5632
Conversation
A child is spawn(prompt): it inherits the parent and can finish a slice. Roles are labels, not a permission matrix. Secrets and account sessions use the 0600 file store only so CODEWHALE_SECRET_BACKEND=system cannot surface a Keychain prompt. Co-authored-by: Cursor <cursoragent@cursor.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Claude finished @Hmbown's task in 6m 15s —— View job Review: PR #5632 — One worker system; retire Keychain product path
The Keychain retirement ( 1.
|
There was a problem hiding this comment.
🔍 User title provenance dropped on autosave
SessionMetadata gains title_source with the contract that a user rename always wins, but merge_persisted_lifecycle copies the persisted title without copying title_source, so autosave rewrites a User-renamed session back as Truncation. This is currently latent: apply_generated_title is only called in tests and build_session_snapshot merely logs a namer spec, so no title is overwritten yet. It becomes a real regression once the namer is wired to apply generated titles.
(Refers to this code)
Was this helpful? React with 👍 or 👎 to provide feedback.
| if spawn_request.worktree.is_none() { | ||
| let parallel = manager.read().await.running_count() > 0; | ||
| if crate::simple_worker::should_isolate_worktree(false, parallel) { | ||
| spawn_request.worktree = Some(SubAgentWorktreeRequest { | ||
| branch: None, | ||
| path: None, | ||
| base_ref: None, | ||
| }); | ||
| } | ||
| } |
There was a problem hiding this comment.
🔴 Parallel spawns forced into worktrees, breaking non-git workspaces
Any second concurrent sub-agent is forced into a git worktree (should_isolate_worktree(false, parallel)) whenever another agent is running, where running_count() counts every live agent and neither agent's write capability is checked. In a workspace with no git repository the worktree creation fails and the spawn errors out; in git repos, read-only fan-out gets spurious worktrees and branches.
Prompt for agents
The auto-worktree block forces worktree isolation on the second and later concurrent sub-agent spawns whenever any other agent is running. Two problems: (1) it triggers for read-only workers, both when the running agent is read-only and when the new spawn itself is read-only, contrary to the documented intent of isolating only a live parallel writer; and (2) create_isolated_worktree calls git_repo_root, which returns Err in a workspace that is not a git repository, so the spawn fails outright in non-git directories. Gate this so it only applies when the new spawn is actually write-capable (see spawn_request_is_write_capable) and, ideally, only counts running write-capable agents rather than running_count() of all agents. Also make the worktree fallback tolerant of a non-git workspace (skip isolation instead of erroring) so read-only or non-repo parallel work keeps functioning.
Was this helpful? React with 👍 or 👎 to provide feedback.
| if crate::simple_worker::root_child_inherits_parent(runtime.spawn_depth) { | ||
| runtime.accept_edits = true; | ||
| runtime.accept_verification = true; | ||
| runtime.allow_shell = true; | ||
| runtime.worker_profile.permissions = crate::worker_profile::PermissionSet::full(); | ||
| runtime.worker_profile.shell = crate::worker_profile::ShellPolicy::Full; | ||
| } | ||
| } |
There was a problem hiding this comment.
🔍 Root spawns now get full permissions in every mode
apply_session_spawn_defaults previously delegated edits only when parent_mode == Operate; it now applies to any spawn_depth == 0 spawn and additionally forces allow_shell, permissions = full(), and shell = Full, overriding the parent profile rather than intersecting with it. The PR frames this as intentional inherit-parent behavior with Auto-Review as the remaining floor; confirm no restricted root posture relied on the old narrower baseline.
Was this helpful? React with 👍 or 👎 to provide feedback.
Plan is a user mode: children inherit its read-only contract. Work/Operate keep spawn(prompt). Wire the live first-prompt session namer. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Claude finished @Hmbown's task in 2m 6s —— View job Review: PR #5632 — One worker system; retire Keychain product path
This re-review covers the new commit Fixed since the last review
Still open
Minor (unchanged from last review, optional)
Provider/model/route safety: no issues — this commit doesn't touch route/model selection, and the new Nothing new introduced by |
* fix(secrets): stop account sessions from popping Keychain `secure_account_session_secrets` always used the OS keyring. On macOS every unsigned rebuild is a new ACL principal, so reading the leftover `deepseek` / `codewhale-cloud-auth-v1-*` item prompted on every `codewhale web` and TUI start. Account sessions now use the private 0600 file store. Provider keys were already file-backed. Extracted from the Keychain-retirement half of #5632. That PR stays unmerged (tests red; it also changes the worker model). Signed-off-by: CodeWhale Bot <bot@codewhale.net> * docs(secrets): sync tui changelog after Keychain session note Signed-off-by: CodeWhale Bot <bot@codewhale.net> --------- Signed-off-by: CodeWhale Bot <bot@codewhale.net> Co-authored-by: CodeWhale Bot <bot@codewhale.net>
|
Closing with the work preserved and tracked — this is a disposition, not a rejection.
The branch is preserved for the rebase-and-repair effort; reopen or reference it from #5718 when that work starts. |
Summary
spawn(prompt)inherits the parent. Roles are labels, not a permission matrix. No preset catalog.CODEWHALE_SECRET_BACKEND=system|keyringis a no-op. Account sessions and provider keys use~/.codewhale/secrets/(mode 0600), not world-readable files./mcp connect githubchains add+login. Docs describe the simple worker model.Test plan
cargo test -p codewhale-secrets(61 tests) includingsession_secrets_use_the_file_store_not_keychainandretired_keychain_env_diagnoses_the_file_storesimple_worker,prompt_only_spawn_inherits,root_operate_dispatchcodewhale doctordoes not mention KeychainCODEWHALE_SECRET_BACKEND=systemdoes not prompt KeychainCloses the founder ask on cwc#154 (CLI side): local keyring is not a parallel home.
Made with Cursor