Repository navigation
fix(providers): preserve claude keychain login in shadow homes - #724
Merged
Merged
Conversation
nixuuu
added a commit
that referenced
this pull request
Nov 14, 2026
Claude, Codex and Grok device-login instances now use the terminal's live credential store while retaining isolated agent configuration. Web, desktop and mobile can sign in and sign out through the official CLIs; own-login instances mutate only their isolated store. Claude uses `CLAUDE_SECURESTORAGE_CONFIG_DIR` for both keychain and file storage, including bots and text generation. Codex keeps a refreshable link instead of a stale copy; Windows can use a hard link when symlinks are unavailable. Grok retains `GROK_AUTH_PATH` and reports saved credentials without claiming their validity. Auth commands require strict worker ownership, reject platform workers and linked peers, share one flight per credential store, and keep outcomes tied to a specific login. Confirmations name the computer and explain terminal effects. The additive `provider_cli_auth_v1` capability protects old workers. Authorization codes remain transient and CLI output is never logged or forwarded. Related: #696, #724. Validation: - Review regressions covered: custom `GROK_AUTH_PATH` makes the device instance available while isolated homes remain separate; removing or disabling a sibling during Claude sign-in still publishes that login's completion. ConfigApplied also queues a fresh account read after an older in-flight report. - Install, gen:check, typecheck, lint, format:check, web build and both mobile exports passed. - Focused gateway↔worker tests cover start/complete/failure, logout, ownership/platform/linked refusals, single-flight, own-login isolation and refreshed source credentials. Codex link and bot/Grok text-generation coverage passed. - Native fingerprints match base dev: iOS `138e0c6b171c82b4933e86808cdfef56da73b8c6`; Android `906dc944f94eb8333fa384ed9f198834fdd30d13`. - Browser review passed on an isolated stack with fake CLIs: light/dark, desktop/phone, named-computer confirmations, Claude code submission, Grok device code, completion/failure and sign-out status refresh. The review found and fixed long computer names stretching the status table. Browser console: no errors or warnings. - Real accounts and native macOS/Windows sessions were not exercised. Only the release workflow publishes OTA after merge into dev; this PR does not publish updates, builds, tags or releases. Copy audit (§8): | Before → after | Reason | | --- | --- | | Codex-only sign-in → “Sign in”, “Sign out” for native instances | Imperative actions, same words across web and mobile. | | Terminal-only Claude/Grok guidance → named-computer confirmation and explicit terminal effects | Explains the affected login before mutation; own-login copy names the isolated instance. | | ChatGPT-only device instructions → browser code or Claude code-paste instructions | One action per sentence; password entry clears after submission. | | Unknown Grok account → “Login saved” / “Not signed in” | Reports file presence without claiming a verified account. | | Raw CLI errors → short actionable failure/update message plus named-computer terminal fallback | No token, diagnostic output or protocol jargon on the surface. | All changed copy uses sentence case, action verbs and text cues independent of colour. No empty states or personality copy were added. Reviewed desktop/phone widths, both themes and short, typical and long computer names; confirmations retain full names while the status label truncates.
This was referenced Nov 16, 2026
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.
Claude device logins stored in macOS Keychain appeared as Not signed in because Canopy changed
CLAUDE_CONFIG_DIRto its shadow home. Claude scopes its keychain service by that directory; linking.credentials.jsoncannot share a login that has no file. The existing JSON parser already accepts the reported 2.1.325 response.Select the login separately with Claude's
CLAUDE_SECURESTORAGE_CONFIG_DIRfor both account probes and instance turns. Preserve the empty value for the default, unhashed keychain service, and preserve explicit config directories for scoped logins. Sessions, settings, hooks and plugins remain in the isolated home. Own-login instances and workers with device login disabled keep their isolated credential store. Reserve this environment variable against profile overrides; no tokens are read or exported by Canopy.Evidence
login_revisiondoes not create a signed-out state; rejected-login marks produceexpired, and usage reports stay separate. This predates those changes. Desktop already preservesHOME,USERandLOGNAME.serviceEnvironment()allowlist and the worker's process-governor spawn path.auth status --jsonand the sanitized desktop-like environment reportedloggedIn:falsein that SSH session, so a live GUI-session keychain login and real model turn remain unverified. No keychain tokens were read and no inference was requested.Validation
Run with
nice -n 10andTMPDIR=/var/tmp:bun install,bun run gen:check, whole-repobun run typecheck,bun run lint,bun run format:check: passed. The integration typecheck was repeated after the final test edits.provider-account-status,provider-accounts.integration,provider-sign-in-expired,provider-usage,provider-usage-bots, and profile environment validation.Related: #125
Related: #696
Related: #697