Skip to content

[Feature]: Per-project Claude account (ask on launch, remember per project) #23227

Open

Description

@Ethan-Rivas

Problem or use case

Summary: Let each project remember which managed Claude account its Claude sessions use. Optionally, Orca asks the first time and offers "Remember for this project"; after that, Claude in that project starts on that account automatically, even while other projects run on a different account at the same time.

I keep a work and a personal Claude subscription on one machine, both signed in as managed accounts in Orca. The active account is global per host, so before starting Claude in a work repo I have to remember to switch, and switching affects every project. When I forget, the session runs (and bills) on the wrong account, and nothing in the project shows it.

This is the per-project half of #5203 / #6921 (duplicates: #5635, #7782, #14254). #6921's implementation (#6963) stalled and was withdrawn, so today there's still no way to tie a project to an account.

Proposed solution

A GUI layer on top of the per-launch account primitive in #22691 (--account). It adds no new credential mechanism: every pinned launch goes through #22691's pinned path (its own config dir, Keychain scoping, single-owner refresh guards). The data shape follows #13664, which added a per-project GitHub account (Repo.ghAccount + a Settings → Repository section).

1. A saved account per project. Settings → Repository gets a "Claude Account" section next to "GitHub Account":
Default (today's behavior) · Ask every time · each Claude account signed in on this machine.
It's stored per agent (agentAccounts.claude) so other agents can be added once they have a per-launch account primitive.

2. An opt-in prompt. A global setting, off by default: "Ask which Claude account to use for each project." When it's on and a project has no saved account (or is set to "Ask every time"), starting Claude shows:

┌──────────────────────────────────────────────┐
│ Choose a Claude account                      │
│ Pick the Claude account to start in          │
│ acme-backend.                                │
│                                              │
│  Account                                     │
│  ┌────────────────────────────────────────┐  │
│  │ me@work.example · Work Org          ▾ │  │
│  └────────────────────────────────────────┘  │
│  ☑ Remember for this project                 │
│    You can change this in Settings → Repo.   │
│                                              │
│                        [Cancel]  [Start]     │
└──────────────────────────────────────────────┘
  • Remember checked: saved on the project. Later launches (new tabs, new workspaces, restarts) use it without asking.
  • Remember unchecked: this launch only.
  • It appears for launches the user starts (New Workspace, new agent tab / ⌘⌥T, quick launch, tab-bar menu), and only when 2+ accounts are signed in.

3. Every GUI launch honors it. The account is resolved in the main process for both spawn lanes (the renderer pty:spawn lane and #22691's runtime lane). Resumes and restores replay the account the session started on, not the project's current setting. A native-chat (structured) Claude launch in a project with a saved account runs as a terminal, so it can be pinned.

4. Visible, and never the wrong account silently. A pinned tab's tooltip shows the account email. If the saved account can't be used (removed, in use by terminals from when it was active, being switched…), Claude doesn't start on another account. The pane explains why and offers Start on active account (this launch only) or Retry.

Resolution order: explicit choice → the account the session started on (resume) → project setting → active account.

Expected behavior and edge cases

  • Users with one account, or who leave the global setting off and every project on Default, see no change.
  • SSH projects are never pinned, and the section is disabled there. WSL too, for now (feat(claude-accounts): launch a Claude agent on a specific managed account with --account #22691 doesn't pin WSL accounts yet); a WSL launch with a saved account is refused with an explanation rather than silently using another account.
  • Paired hosts: the account travels on terminal.createAgentSession / ensureAgentSession only to hosts that advertise the new capability, so older hosts keep working unchanged.

Known limitations

  • After splitting a tab whose pane was refused, the refusal message shows again once that pane is clicked (existing per-pane error behavior).
  • Older paired hosts without the capability can't honor a one-time pick. On a capable host, an agent-only launch that falls back to the legacy create path uses the project's saved account instead of a one-time pick.
  • The e2e spec runs on Linux CI and skips on macOS, where managed credentials live in the login Keychain that the e2e harness doesn't isolate.

Out of scope: per-worktree overrides, project-group inheritance (suggested on #6921), per-account usage bars, Codex and other agents.

Alternatives or additional context

Activity

  1. wayheming commented on Oct 27, 2026

    @wayheming

    Please add this +1

  2. facundopossee commented on Oct 27, 2026

    @facundopossee

    +1. Related use case: besides remembering the account per project, an account picker when launching a new Claude tab would let two sessions on different accounts (work + personal) run side by side.

  3. lucianolopezz commented on Nov 4, 2026

    @lucianolopezz

    Please add this +1

  4. CocoaBeans commented on Nov 7, 2026

    @CocoaBeans

    +1, with a use case and a suggestion for a smaller first step.

    Use case. I have a work and a personal Claude subscription, both signed in to Orca as managed accounts (Orca 1.4.251, macOS). My repositories each belong clearly to one of them. Since the active account is global, Claude in a repository runs on whichever account is active at launch. That includes resuming an Orca chat session: I've had one session move between my two accounts across resumes on the same day, as the active account changed in between. Nothing in the project shows which account a session is using, so it's easy to work (and bill) on the wrong one.

    A smaller first step, modeled on per-repository GitHub accounts. Orca already lets a repository bind a GitHub account (ghAccount): it's stored with the repository's settings, chosen from the signed-in gh accounts, validated, and applied to Orca's GitHub requests for that repository. The same shape would cover most of this request:

    1. A claudeAccount binding on the repository, stored and sanitized like ghAccount.
    2. A picker in the repository's settings listing the managed Claude accounts, plus "Use the active account" (the default, so nothing changes for anyone who doesn't set it).
    3. When Claude starts in that repository (a terminal tab, a native chat session, or a resume), use the bound account's profile (CLAUDE_CONFIG_DIR) if one is set, else the global active account as today.

    That would let a work repository and a personal one each run on their own account at the same time, without changing the global switcher. Things it would leave for later:

    For resumes, the simplest rule seems to be to resume on the bound account, since that's where the session's history lives once the repository is bound.

    I've seen #23228, which covers much more. This might work as a smaller piece that could land first, or a step on the way to it. If the maintainers think the design is right, I'd be glad to put together a PR along these lines.

  5. kiq7 commented on Nov 11, 2026

    @kiq7

    +1

  6. brinntomes commented on Nov 17, 2026

    @brinntomes

    +1, with a consultant use case. I build for several clients on their own Claude subscriptions, plus my own, all on one Orca host (soon a headless orca serve server I drive from my phone). Every repo belongs to exactly one account. Today I run orca account select before every launch, and one slip bills the wrong client.

    What would solve it:

    • A Claude account setting per project, inherited by its worktrees, used for every launch there: new chats, restored or resumed sessions, orchestration workers and automations.
    • Each open chat tab shows and keeps its own account, and the status bar shows the account of the focused tab, not only the global one.
    • As a first step: a warning before sending in a project whose usual account differs from the active one would already prevent most mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions