Repository navigation
Conversation
A project can set the Claude account every terminal opened in it uses, so `claude` started by Orca or typed by hand there runs on that account whatever is selected in Settings. A pinned launch still wins over the project's account, which wins over the selection. A removed or signed-out project account falls back to the selection so the project's shells still open, and an account switch leaves the project's sessions where they are. Set it in Settings > Repository > Claude Account or with `orca repo set --claude-account`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…panes A typed `claude` in a project's new terminals follows the project's account again: only a pin from a launch's env waits for a Claude launch, while the project account applies to every fresh spawn and skips re-adopted panes. The repository settings row reads accounts only for projects on this computer. Co-Authored-By: Claude Opus 5.5 <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.
ELI5
If you use one Claude account for work and another for personal projects, you have to remember to switch accounts in Settings before working in each project. Switching moves every project at once.
With this PR, a project can remember its Claude account. Work repos always start Claude on the work account and personal repos on the personal one, side by side, whatever is selected in Settings. That includes
claudeyou type yourself in that project's terminals.What Changed
Before: every Claude session in every project uses the account selected in Settings.
After, for the user:
orca repo set --claude-account <id>, where--claude-account=clears it.claudetyped by hand in the project's terminals.Mechanism:
Repo.claudeAccountIdis a new optional field. It's sanitized and trimmed on write;nullor blank clears it.projectClaudeAccountIdForWorktree) and, if no pin is present, resolves it through the same per-account folder routing PR 1 uses for pins. This also applies to plain shells, so a typedclaudefollows it.Why
The account usually belongs to the project: a client repo bills the client's account. Making it a project setting means you choose once, with no prompts and no global switch.
Alternatives considered:
Linked Issue
Fixes stablyai#5203
Visual Proof
Testing
Platforms actually exercised: macOS (local). Not run on Windows or Linux.
Automated:
claudeuses the project account. A re-attached pane is left as it was.nullor blank, and survive a reload. Also the CLIrepo set --claude-account.Commands:
pnpm tc✅ · targetedpnpm test(claude-accounts, repository settings, automation field, account switch, PTY preflight: 75 files) ✅ · broad scoped run andcheck:code-quality:changed: pending re-run.src/cli/account-add-process.test.tsfails on unmodifiedmaintoo; this PR doesn't touch it.Risk
Level: Medium
claudeAccountIdon repos is ignored by builds without this change.AI Disclosure
Written with Claude Opus 5.5 through Claude Code, directed and reviewed by me.
Review
Agent skill upstream boundary
Notes
Checked for: security (the account id is matched against known accounts before it reaches a path), cross-platform, Remote SSH (hidden, never read remotely), mobile (doesn't write the field), backwards compatibility, and performance (no extra await on spawns without an account).
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)🤖 Generated with Claude Code