Repository navigation
Conversation
… from the "+" menu The new-tab "+" menu gets a "Claude on account" submenu listing the saved host Claude accounts. Picking one opens a Claude terminal on that account without changing the selected account; other tabs and later launches keep using it. - The launch carries ORCA_CLAUDE_PINNED_ACCOUNT_ID in the tab's startup env. - Main routes that pane to the account's own folder: CLAUDE_CONFIG_DIR plus a per-account pointer file, so a `claude` typed again in the pane stays on it. A direct `claude` spawn prepares that account's folder the same way the selected account's launches do. - Account switches no longer offer to restart tabs pinned this way. - SSH, web-runtime and WSL workspaces refuse the choice with a toast instead of silently starting on another account. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBT3FxGf5UPAtT84wR2n6D
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.
Requested by aden · project thread
ELI5
The "+" (new tab) menu now has a Claude on account ▸ submenu listing your saved Claude accounts. Pick one and a Claude terminal opens on that account. The selected account doesn't change, so other tabs and later launches keep using it.
What Changed
Before: every Claude launch from the "+" menu used the one selected account. Running two accounts side by side meant switching back and forth, and a switch offered to restart running sessions.
After:
ClaudeAccountLaunchSubmenusits under the agent rows in the "+" menu. It shows when Claude can start in a terminal here and at least one host (non-WSL) Claude account is saved. The selected account has a check mark.launchAgentInNewTab({ agent: 'claude', requestedSurface: 'terminal', claudeAccountId }). That putsORCA_CLAUDE_PINNED_ACCOUNT_IDin the tab's startup env.claude-profile-pinned-launch.ts): when the spawn env carries that id,withClaudeProfileTerminalEnvsends the pane to the account's own folder instead of the selected one. It setsCLAUDE_CONFIG_DIRandORCA_CLAUDE_INJECTED_CONFIG_DIR, and adds a per-account pointer file (claude-profiles/<id>/pinned-pointer). Because of the pointer, aclaudetyped again in that pane stays on the same account. A directclaudespawn (isClaudeLaunch) sets up that account's folder before launch, just like launches on the selected account (preparePinnedClaudeLaunchAuthin both spawn preflights).localClaudePanesskips them).Why
People with a work account and a personal account want to choose per launch without switching globally. Several upstream PRs are close: stablyai#23228 (per-project, ask on launch), stablyai#38581 (pin a project's account), stablyai#22691 (CLI
--account). None is merged. stablyai#23228 is built on 16 commits from stablyai#22691. This change is small and only covers one launch. It reuses main's existing per-account Claude folders, so nothing about logins is copied or swapped.Linked Issue
Related upstream: stablyai#23227, stablyai#9496
Visual Proof
Not captured. The UI is a new submenu in the "+" menu, and I couldn't run the Electron app in this environment.
Testing
claude-profile-pinned-launch.test.ts(env routing, the realclaudeshell function re-reading the pinned pointer, the fallback for unknown or WSL accounts, auth prep) andlaunch-agent-in-new-tab-claude-account.test.ts(startup env and pin on a local terminal, refusal on SSH).Passing locally: web typecheck, a typecheck of the changed main files, oxlint, changed-code quality gate, import boundaries, localization extraction and catalogs, the max-lines and e2e ratchets, and 1791 tests across the account, pty-spawn, tab-bar and launch suites. Two
claude-profile-history.test.tscases fail onmaintoo in this sandbox, so they're unrelated.Risk
Level: Medium. The change touches pty spawn env assembly for Claude panes. Without the pin env var, behaviour is unchanged.
To back it out, a plain revert works. The only things left on disk are the
pinned-pointerfiles.Review
Look closest at
claude-profile-pinned-launch.ts, the twospawn-preflight.tshooks, and the refusal paths inlaunch-agent-in-new-tab.ts.Agent skill upstream boundary
Checklist
pnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (partial runs locally, as listed above)Generated by Claude Code