Skip to content

feat(claude-accounts): per-project Claude account (ask on launch, remember per project) - #23228

Open
Ethan-Rivas wants to merge 294 commits into
stablyai:mainfrom
Ethan-Rivas:feat/per-project-agent-account
Open

Ethan-Rivas wants to merge 294 commits into
stablyai:mainfrom
Ethan-Rivas:feat/per-project-agent-account

Conversation

@Ethan-Rivas

@Ethan-Rivas Ethan-Rivas commented Sep 26, 2026 •

Copy link
Copy Markdown

Builds on #22691's --account launch. The first 16 commits are #22691's. After main's per-account Claude folders landed (#24434, which removed credential replay), this branch rebuilt the pinned launch on those folders, so it no longer copies or refreshes any login. This PR's own changes start at 4f038e1; the rebuild is in the merge 8780cbc830.

ELI5

If you use Claude with more than one account (say work and personal), Orca today has one "active" account for everything, so you have to remember to switch before working in each project, and switching affects every project at once. This PR lets each project remember its Claude account. Optionally, Orca asks the first time you start Claude in a project and remembers your choice, so work repos always start on the work account and personal repos on the personal one, even side by side. If the saved account can't be used, Claude doesn't quietly start on a different account; the pane explains why and lets you start on the active account for that one launch.

What Changed

Before: one global Claude account per machine. Every Claude tab, workspace and resume used whichever account was selected when it started. #22691 adds --account for the CLI and RPC only; the desktop app's launches (new tab, ⌘⌥T, New Workspace, resume) can't use it.

After, for the user:

  • Settings → Repository → Claude Account (next to GitHub Account): Default · Ask every time · each signed-in Claude account. Disabled for SSH and WSL projects, with a note.
  • Settings → Accounts → "Ask which Claude account to use for each project", off by default. When it's on, projects without a saved account show a small prompt (account dropdown + "Remember for this project") when you start Claude from New Workspace, a new agent tab / ⌘⌥T, quick launch or the tab-bar menu.
  • A pinned tab's tooltip shows its account email.
  • If the saved account can't be used (it was removed, the project runs in WSL, or Orca couldn't confirm the account it prepared), the pane explains why, with Start on active account where that helps (restarts just that pane, this launch only). This includes agents whose prompt is pasted after they start; the retry puts that prompt back as an unsent draft.
  • Resume and restore bring a session back on the account it started on, not the project's current setting, including reopens from the AI vault, external conversations and paired clients.
  • Continue and the Source Control section's agent launches (also inside folder workspaces) use the project's saved account like every other launch.
  • Switching the selected account later doesn't move a pinned tab: it stays on its account.

Mechanism:

  • Repo.agentAccounts.claude = { mode: 'ask' } | { mode: 'account', accountId }, round-tripped like ghAccount (feat(github): bind projects to a specific gh account #13664): persistence, IPC, the repo.update schema (null clears).
  • SleepingAgentLaunchConfig.claudeAccountId carries a launch's account (or an "active this time" sentinel), so resume and restore replay it. A status row carries no account once its pane's process is gone (a sleeping Done row republished after a reload or restart), so a resume record rebuilt for the same conversation keeps the saved record's account instead of losing it.
  • One main-process resolver decides the pinned account in both spawn lanes: explicit choice → the launch's recorded account → project setting → selected account. SSH and reattached panes are never pinned.
  • A pinned launch runs from the account's own folder. For an account other than the selected one, prepareForClaudeLaunch(target, { accountId }) sets up that account's folder (claude-profiles/<id>/home, via the router's new prepareAccountLaunch) and points CLAUDE_CONFIG_DIR at it. The pane gets no which-account pointer, so main's claude shell function isn't defined there and a later switch can't redirect it. The selected account takes main's normal path. Because nothing is copied, there are no reservations, Keychain seeding, read-back or switch guards.
  • Refusals carry a trailing [claude_pinned:<code>] token (account-missing, provenance, unsupported-host) so the renderer can localize them; the CLI and mobile strip it from human output (--json keeps it).
  • A small registry records which PTY runs which pinned account (ids only, persisted so labels survive a restart). Main stamps an optional claudeAccountId onto agent-status rows from it, and the tab label reads that.
  • Paired hosts: terminal.createAgentSession / ensureAgentSession carry the account only to hosts advertising the new agent-session.claude-account.v1 capability (their params are strict, so older hosts would otherwise reject the launch).
  • Every renderer route decision goes through resolvePlannedRoute, including Continue's menu pick, so a pinned project gets a terminal. An in-place Source Control section launch is placed in its folder, so account lookups use its trustWorktreeId (the section's own worktree).
  • A launch pane (main plans the agent from the pane's agentLaunch) refused for its account reports the refusal itself instead of the generic pane-refused code, so the pane can offer the fix. Its retry carries replacesRefusedLaunch so the refusal recorded for that pane doesn't block it, and the host's plan keeps the retry's "active this time" choice.
  • Host-side structured (native chat) Claude launches for a project with a saved account run as a terminal (pinned_claude_account reason), and a structured → terminal handoff keeps the session's own account. A pinned launch also skips the new-tab wait for a host's agent list, since it is a terminal whatever the host answers.

Why

Linked Issue

Fixes #23227

Visual Proof

Before After
before-a1-settings-repository
Settings → Repository has no Claude account choice
a1-settings-repository-claude-account-options
New "Claude Account" section: Default / Ask every time / each account
before-b-new-claude-tab
"+ → Claude" starts on the global account with no choice
b-choose-claude-account-prompt
With "ask" on, a prompt picks the account (Remember for this project)
before-d-tab-tooltip
Tab tooltip shows no account
d-tab-tooltip-pinned-account
A pinned tab shows its account email
n/a (new) e1-refusal-toast-account-missing
If the saved account can't be used: explanation + Start on active account
n/a (new) e2-started-on-active-account
The refused pane restarted in place on the active account

Testing

  • I manually tested these changes locally

  • Automated tests added/updated

  • Unit and integration tests:

    • persistence and RPC round-trip;
    • the resolver's rule order;
    • the account service: a non-selected account runs from its own folder with no pointer, the selected account takes the normal path, a missing or WSL account is refused before any folder is touched;
    • both spawn lanes: pinning, the pinned pane never getting the selected account's pointer while an unpinned one does, non-Claude, SSH and reattach unchanged;
    • the pinned PTY registry: labels, persistence, and dropping restored PTYs the daemon no longer runs;
    • refusal codes and copy;
    • settings section, toggle and prompt, including over the New Workspace composer;
    • cold resume, sleep/wake and restart after daemon death, replaying the original account and keeping "active this time" unpinned;
    • paired-host capability negotiation;
    • main's credential-persistence ratchet, with the registry's id-only file added as a reviewed surface.
  • e2e: tests/e2e/per-project-claude-account.spec.ts runs the real app hidden, with fake managed accounts and a stand-in claude. It checks the settings options, the prompt, Remember, that the pinned CLAUDE_CONFIG_DIR is the account's own folder (set up on first use), no re-prompt plus the tab label, and a refusal restarting in place on the active account. It runs on Linux CI and skips on macOS and Windows. Screenshots are written only when ORCA_PER_PROJECT_CLAUDE_ACCOUNT_SCREENSHOT_DIR is set.

  • Manual: to re-run on the account-folder rebuild (the earlier manual runs were on the credential-copying design): two projects on two accounts at once with /status confirming each, a one-time pick versus Remember, the prompt over New Workspace and Cancel creating nothing, a refusal and in-place restart, switching the selected account while a pinned tab runs, and an app restart bringing pinned tabs back on their accounts with labels.

  • Platforms: macOS (manual, to re-run). Linux runs in CI (e2e). Windows: unit tests only; the e2e skips there (the stand-in claude is POSIX). WSL projects are deliberately not pinned. SSH projects are never pinned (covered by tests).

  • pnpm tc passes. pnpm check:changed passes except for the agent-hooks server suites (src/main/agent-hooks/server/testing/**), which fail with "unable to open database file" in this environment and also fail on a clean main.

AI Disclosure

Built with Claude Code (Claude Opus 5.5, with Sonnet 5 / Haiku 4.5 sub-agents for smaller tasks): design, implementation, tests and reviews, including the rebuild on main's account folders. Every change was reviewed and tested by me.

Review

AI review summary:

  • Cross-platform: path utilities only; logins live in main's account folders on every platform, and this PR adds no credential handling of its own; no platform-specific UI.
  • SSH / remote / local: SSH is never pinned, and the Settings section is disabled with a note. Remote runtimes and paired hosts get the account only through capability-gated optional fields. Older clients and hosts behave exactly as before.
  • Agents / integrations: Claude only. Storage is keyed per agent (agentAccounts.claude) for later agents. Non-Claude terminals take the same code path as before.
  • Performance: the resolver is one repo lookup per fresh local Claude spawn; an account folder is set up once, on first use; the prompt only fetches accounts when it will actually be shown.
  • Security: untrusted IPC, RPC and persisted ids resolve only to known managed accounts, never to a path. The "active this time" sentinel never pins. No login is copied, read back or written by this PR.
  • UI: shadcn Dialog/Select/Checkbox/Switch; strings through translate in all 5 locales; design-system lint clean on changed lines.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Known limitations

  • Split tabs: 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 silently runs on the project's saved account instead of a one-time pick.
  • WSL: WSL projects aren't pinned yet. Main now has WSL account folders, so this is a follow-up rather than a blocker.
  • Removing an account a pinned tab is using deletes its folder, as it does for the selected account on main.
  • Chat-only routes don't honor a saved account yet: CLI chat resume, the AI vault's "resume in chat" and native chat fork open a structured chat directly, which can't run on a pinned account. Whether these should refuse, become terminals or stay as they are is an open question.
  • Folder Source Control tabs: Claude runs on the project's account, but the tab tooltip can't show it, because the tab only knows its folder.

Related: #22893 (opt-in isolation from external agent config) is complementary: pinned sessions run in their account's own folder and never write to ~/.claude.

Follow-ups: WSL pinning on main's WSL account folders, per-worktree overrides, project-group inheritance (#6921 discussion), per-account usage bars, and Codex once it has a per-launch account primitive.

Checklist

  • This PR is small and focused. (Focused on one feature, but not small: it includes tests and 5-locale i18n, and the account-folder rebuild of feat(claude-accounts): launch a Claude agent on a specific managed account with --account #22691's pinned launch.)
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred) (pnpm check:changed runs lint, typecheck and tests on the changed files; the full pnpm build wasn't run locally, CI covers it)

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Minor suggestions only. The core pinning/resolution logic holds up under a line-by-line read and two independent passes over the reservation lifecycle and the __active__ sentinel — no reachable correctness or security defect found. Two small notes below.

Reviewed changes

This run reviewed the PR's authored delta only — the 15 commits from 4f038e1 onward. The first 16 commits belong to the stacked #22691 and were not re-reviewed.

  • Per-project preference: Repo.agentAccounts.claude = { mode: 'ask' } | { mode: 'account', accountId }, normalized at every persistence/IPC/RPC boundary and round-tripped like ghAccount; null clears.
  • Main-process resolver: resolveProjectClaudeAccount orders explicit pin → launch config → project setting, with the __active__ sentinel short-circuiting before the project setting so an "active this time" launch is never re-pinned on resume.
  • Both spawn lanes: renderer IPC and runtime resolve the pinned account and share claude-pinned-spawn.ts (reserve, provenance check, mark-first in commit, release on every exit). The structured → terminal downgrade is mirrored on the renderer plan and the host.
  • Status/label plumbing: main stamps claudeAccountId on agent-status rows from the pinned PTY registry (including the persisted-layout fallback before reattach); the renderer preserves it across local writes and shows it in the tab tooltip.
  • Paired hosts: the account rides optional agent-session RPC params, capability-gated by agent-session.claude-account.v1; refusal codes are tagged [claude_pinned:<code>] and stripped from CLI/mobile output.

ℹ️ Stacked base vs. target

The body says this is stacked on #22691 and that the first 16 commits are #22691's, but the pull request targets main. The resulting diff (220 files, ~9.8k additions) therefore carries #22691's commits, so merging as-is would land that work too and a reviewer cannot scope this feature from the PR files alone.

Technical details
# Stacked base vs. target

## Affected sites
- PR base is `main` (da6d483ab9); the authored delta starts at `4f038e17f1`, whose parent `87c9fe4acb` is the tip of #22691's branch.
- `pullfrog_checkout_pr` reports `base: main` and the 220-file `diffPath` includes #22691's files (e.g. `runtime-auth-pinned-launch.ts`, `claude-pinned-pty-registry.ts`).

## Required outcome
- Before merge, retarget the PR to #22691's branch, or land #22691 on `main` first and rebase, so the reviewed diff reflects only this feature.

## Open questions for the human
- Is #22691 close enough to landing that a rebase is preferable to retargeting?

ℹ️ Account roster fetched from the wrong host in the tab label

Every sibling that reads the Claude roster routes through the repo owner — RepositoryClaudeAccountSection.tsx:46-49 derives activeRuntimeEnvironmentId from getRepoOwnerRoutedSettings, and choose-claude-launch-account.ts:106 passes the routed settings — but useClaudeTabAccountLabel passes the raw settings. Since fetchProviderAccountsSnapshot resolves its target from settings.activeRuntimeEnvironmentId, a tab whose repo is owned by a non-active runtime environment is queried against the wrong host, claudeTabAccountLabel finds no matching account, and the account label silently never appears.

Technical details
# Account roster fetched from the wrong host in the tab label

## Affected sites
- `src/renderer/src/components/tab-bar/use-claude-tab-account-label.ts:43` — `fetchProviderAccountsSnapshot(settings)` uses the global `activeRuntimeEnvironmentId`, not the repo owner's.

## Required outcome
- The roster fetch must target the same runtime environment the settings section and the prompt use for this repo, so a remote-environment (non-SSH) project's pinned account resolves.

## Suggested approach (optional)
- `findLaunchRepo(s, { worktreeId: tab.worktreeId })` is already available in this file; select the repo once, then pass `getRepoOwnerRoutedSettings(settings, repo)` to `fetchProviderAccountsSnapshot` (add the `repo-runtime-owner` import), matching `choose-claude-launch-account.ts:106`.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The change adds per-project Claude account preferences, an optional account prompt, and account selection for CLI, worker, worktree, terminal, and agent-session launches. Account IDs flow through new launches, resumes, and restores. Host code adds pinned-account authentication, credential and PTY tracking, and coordination with account mutations and usage fetches. The renderer adds account labels, refusal messages, and recovery actions. Repository and launch schemas, settings, translations, and tests are also updated.

Severity of issue fixed: Medium

Merge Risk: Minimal · previous review 42dd5

Resumes and restores retain the session’s account, including after starting on the active account. No actionable merge-blocking risk was established.

Security architecture risk: Moderate · up to 6ce13

Account selection is checked before credentials are used, but a failure to save live terminal ownership could leave a surviving session unprotected after an application restart. Concurrent changes to a project’s saved account also need clearer ordering.

Retained concerns

  • Medium · security · inferred: A failed pinned-PTY registry write does not fail the spawn. If the application then restarts while that daemon PTY survives, startup may restore no ownership record, allowing account mutation or token activity without the live-session guard.
  • Medium · reliability · inferred: Project account writes have no persistence-level revision or expected-value check. A stale write from a separately sequenced caller can replace a newer preference and affect subsequent launches, though the inspected renderer store orders its own writes.
Security review details

Security Blast Radius

  • inferred — The identified ownership-recovery failure concerns a managed account on the local host and any surviving pinned sessions using it; the inspected path does not establish a remote attacker or cross-tenant reachability.

Security Findings and Attack Paths

  • inferred — If a registry write fails, the application restarts, and the daemon retains the PTY, a later credential mutation may proceed without recognizing that session. This is a conditional token-ownership path, not a verified credential compromise.

Trust Boundaries and Controls

  • observed — A supplied account ID is not itself credential authority: host launch-shape checks reject SSH and non-Claude use, and prepared managed-account provenance must match before a pinned launch proceeds.

Resilience and Maintainability Implications

  • observed — In memory, account reservations, host-mutation claims, and restored unconfirmed PTYs guard token ownership through spawn and restart; registry-write failure is the identified break in that continuity.

Hardening Proposals

  • proposed — Make a failed ownership write fail closed or reconstruct pinned ownership from surviving daemon sessions before permitting credential mutation; consider revision-checked writes for account-bearing project preferences.
Pre-merge checks: Passed 1 · Failed 1 · Inconclusive 2

Failed Failed checks: 1 warning · 2 inconclusive

Check name Status Explanation Resolution
Description check Warning The description follows the repository template and fills in every required section: ELI5, What Changed, Why, Linked Issue (Fixes #23227), Visual Proof (before/after table), Testing with platform note… Add a '## Risk' section that names the riskiest part of the change (for example, the pinned-launch routing in main or the new persisted registry files), states who would see a failure, names the saved data and settings affected (repo agentA…
Linked Issues check Inconclusive The linked issue assessment could not be completed. Retry the assessment when the required review evidence is available.
Out of Scope Changes check Inconclusive The linked issue assessment could not be completed. Retry the assessment when the required review evidence is available.
Passed Passed checks: 1 passed

Check name Status Explanation
Title check Passed The title names the feature (per-project Claude account selection with an ask-on-launch prompt and remembered choice). The changeset covers this: repo-level agentAccounts settings, a launch prompt, ac…
Full details: Title check

Explanation

The title names the feature (per-project Claude account selection with an ask-on-launch prompt and remembered choice). The changeset covers this: repo-level agentAccounts settings, a launch prompt, account pinning in main-process spawn paths, and related UI and tests. The title is specific and matches the main change.

Full details: Description check

Explanation

The description follows the repository template and fills in every required section: ELI5, What Changed, Why, Linked Issue (Fixes #23227), Visual Proof (before/after table), Testing with platform notes, Risk, Review, Agent skill upstream boundary, Notes, and Checklist. It explains the mechanism, the alternatives considered, and known limitations in detail. The Risk section is missing. The template requires a risk level and a rollback description, and the description has no 'Risk' heading. The AI Disclosure section is filled in. The manual test box is unchecked, but the testing notes say the manual run still needs to be repeated on the account-folder rebuild. The description also depends on a stacked PR (#22691) that is not yet merged.

Resolution

Add a '## Risk' section that names the riskiest part of the change (for example, the pinned-launch routing in main or the new persisted registry files), states who would see a failure, names the saved data and settings affected (repo agentAccounts, persisted pinned-PTY registry, claude-accounts files), and states how to back it out (plain revert, and what a revert would not undo, such as the persisted registry file and the per-account folders). Assign a Level of Low, Medium, or High. Either complete the pending manual test on the account-folder rebuild and check the box, or state explicitly why it is deferred. Note the dependency on #22691 landing first.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

ℹ️ Recent review info

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 1feac93c-bf36-4062-a37d-2937342ac051

📥 Commits

Reviewing files that changed from the base of the PR and between 6ce13cf and 42dd573.

📒 Files selected for processing (6)

  • src/renderer/src/components/terminal-pane/pty-connection/cold-restore-resume-startup.ts
  • src/renderer/src/lib/sleeping-agent-session-launch.ts
  • src/renderer/src/store/slices/agent-status-sleep-claude-account.test.ts
  • src/renderer/src/store/slices/agent-status-sleeping-records.ts
  • src/shared/agent-session-resume.ts
  • src/shared/workspace-session-sleeping-agents.ts
🚧 Files skipped from review as they are similar to previous changes (6)

  • src/shared/agent-session-resume.ts
  • src/renderer/src/lib/sleeping-agent-session-launch.ts
  • src/shared/workspace-session-sleeping-agents.ts
  • src/renderer/src/store/slices/agent-status-sleeping-records.ts
  • src/renderer/src/store/slices/agent-status-sleep-claude-account.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/cold-restore-resume-startup.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 4e596faa-af21-479e-8b00-32e946f9e178

📥 Commits

Reviewing files that changed from the base of the PR and between da6d483 and 2cd7c2d.

📒 Files selected for processing (220)
  • config/tsconfig.tc.web.json
  • docs/reference/agent-status-store.md
  • mobile/src/transport/rpc-acceptance-policies.test.ts
  • mobile/src/transport/rpc-acceptance-policies.ts
  • src/cli/cli-error-claude-pinned.test.ts
  • src/cli/cli-error.ts
  • src/cli/handlers/claude-launch-account-flag.ts
  • src/cli/handlers/orchestration-worker-account-cli.test.ts
  • src/cli/handlers/orchestration/worker-launch-handler.ts
  • src/cli/handlers/worktree.ts
  • src/cli/index-worktree-create-claude-account.test.ts
  • src/cli/specs/core.ts
  • src/cli/specs/orchestration-worker-specs.ts
  • src/main/agent-launch/agent-launch-executor.test.ts
  • src/main/agent-launch/agent-launch-executor.ts
  • src/main/agent-launch/agent-launch-mode.ts
  • src/main/claude-accounts/claude-account-host-mutation.ts
  • src/main/claude-accounts/claude-account-registration.ts
  • src/main/claude-accounts/claude-account-selection.ts
  • src/main/claude-accounts/claude-account-service-account-selection.test.ts
  • src/main/claude-accounts/claude-account-service-reauth-pinned.test.ts
  • src/main/claude-accounts/claude-host-pty-accounts.test.ts
  • src/main/claude-accounts/claude-host-pty-accounts.ts
  • src/main/claude-accounts/claude-launch-account.test.ts
  • src/main/claude-accounts/claude-launch-account.ts
  • src/main/claude-accounts/claude-pinned-config-dir.test.ts
  • src/main/claude-accounts/claude-pinned-config-dir.ts
  • src/main/claude-accounts/claude-pinned-credentials.ts
  • src/main/claude-accounts/claude-pinned-pty-registry.test.ts
  • src/main/claude-accounts/claude-pinned-pty-registry.ts
  • src/main/claude-accounts/environment.ts
  • src/main/claude-accounts/live-pty-gate.test.ts
  • src/main/claude-accounts/live-pty-gate.ts
  • src/main/claude-accounts/pinned-claude-pane-account.test.ts
  • src/main/claude-accounts/pinned-claude-pane-account.ts
  • src/main/claude-accounts/project-claude-account-resolution.test.ts
  • src/main/claude-accounts/project-claude-account-resolution.ts
  • src/main/claude-accounts/runtime-auth-service-pinned-launch.test.ts
  • src/main/claude-accounts/runtime-auth-service.ts
  • src/main/claude-accounts/runtime-auth/runtime-auth-pinned-launch.ts
  • src/main/claude-accounts/runtime-auth/runtime-auth-readback.ts
  • src/main/claude-accounts/runtime-auth/runtime-auth-sync.ts
  • src/main/claude-accounts/runtime-auth/runtime-auth-types.ts
  • src/main/daemon/daemon-provider-init.ts
  • src/main/ipc/agent-hooks.test.ts
  • src/main/ipc/agent-hooks.ts
  • src/main/ipc/pty-runtime-claude-account-spawn.test.ts
  • src/main/ipc/pty-spawn-env-terminal-basics.test.ts
  • src/main/ipc/pty/claude-pinned-spawn.test.ts
  • src/main/ipc/pty/claude-pinned-spawn.ts
  • src/main/ipc/pty/host-env/types.ts
  • src/main/ipc/pty/ipc/spawn-commit.ts
  • src/main/ipc/pty/ipc/spawn-env.ts
  • src/main/ipc/pty/ipc/spawn-preflight-claude-account.test.ts
  • src/main/ipc/pty/ipc/spawn-preflight.ts
  • src/main/ipc/pty/ipc/spawn-run-claude-pinned-release.test.ts
  • src/main/ipc/pty/ipc/spawn-run.ts
  • src/main/ipc/pty/runtime/spawn-claude-account.ts
  • src/main/ipc/pty/runtime/spawn-commit.ts
  • src/main/ipc/pty/runtime/spawn-preflight.ts
  • src/main/ipc/pty/runtime/spawn-state.ts
  • src/main/ipc/pty/runtime/spawn.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.test.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.ts
  • src/main/ipc/repos/repo-update-handler.ts
  • src/main/persistence-update-repo.test.ts
  • src/main/persistence/loading-store/repo-lifecycle-operations.ts
  • src/main/persistence/tracking-repos/repo-hydration.ts
  • src/main/persistence/tracking-repos/repo-sanitization.ts
  • src/main/persistence/tracking-repos/repo-update-operations.ts
  • src/main/rate-limits/claude-fetcher-managed-account-usage.test.ts
  • src/main/rate-limits/claude-managed-account-credentials.ts
  • src/main/rate-limits/claude-managed-account-usage.ts
  • src/main/runtime/orca-runtime-agent-session-operation.test.ts
  • src/main/runtime/orca-runtime-agent-teams-launch-plan.test.ts
  • src/main/runtime/orca-runtime-agent-teams-launch-plan.ts
  • src/main/runtime/orca-runtime-create-agent-session.ts
  • src/main/runtime/orca-runtime-create-managed-worktree.ts
  • src/main/runtime/orca-runtime-create-terminal-dependencies.ts
  • src/main/runtime/orca-runtime-create-terminal-desktop.ts
  • src/main/runtime/orca-runtime-create-terminal.ts
  • src/main/runtime/orca-runtime-get-agent-session-execution-namespace.ts
  • src/main/runtime/orca-runtime-tests/claude-account-agent-session-lanes.spec.ts
  • src/main/runtime/orca-runtime.test.ts
  • src/main/runtime/rpc/methods/orchestration-worker-start-mode.ts
  • src/main/runtime/rpc/methods/orchestration/worker/local-worker-start.ts
  • src/main/runtime/rpc/methods/orchestration/worker/worker-claude-account-placement.ts
  • src/main/runtime/rpc/methods/orchestration/worker/worker-claude-account.test.ts
  • src/main/runtime/rpc/methods/orchestration/worker/worker-launch-preferences.ts
  • src/main/runtime/rpc/methods/orchestration/worker/worker-start-agent-placement.ts
  • src/main/runtime/rpc/methods/orchestration/worker/worker-start-validation.ts
  • src/main/runtime/rpc/methods/orchestration/worker/worker-topology.ts
  • src/main/runtime/rpc/methods/orchestration/worker/worker-worktree-creation.ts
  • src/main/runtime/rpc/methods/orchestration/worker/workers.ts
  • src/main/runtime/rpc/methods/repo.test.ts
  • src/main/runtime/rpc/methods/worktree-create-args.ts
  • src/main/runtime/rpc/methods/worktree-create-claude-account-args.test.ts
  • src/main/runtime/runtime-agent-launch-resolution.ts
  • src/main/runtime/runtime-folder-worktree-create.ts
  • src/main/runtime/runtime-local-worktree-terminal-startup.test.ts
  • src/main/runtime/runtime-local-worktree-terminal-startup.ts
  • src/main/runtime/runtime-managed-worktree-create-types.ts
  • src/main/runtime/runtime-pty-controller-contract.ts
  • src/main/runtime/runtime-repository-settings-controller.ts
  • src/main/runtime/runtime-terminal-contracts.ts
  • src/main/runtime/runtime-worktree-startup-claude-account.test.ts
  • src/main/runtime/runtime-worktree-startup-claude-account.ts
  • src/main/startup/main-process-account-services.ts
  • src/main/startup/main-process-ready-foundation.ts
  • src/main/startup/main-process-runtime-launch.ts
  • src/main/startup/main-process-runtime-service.ts
  • src/main/startup/main-window-agent-status.ts
  • src/main/startup/main-window-core-services.ts
  • src/main/window/attach-main-window-services.ts
  • src/preload/api/repository-api.ts
  • src/renderer/src/App.tsx
  • src/renderer/src/components/claude-account-prompt/ClaudeAccountPromptDialog.test.tsx
  • src/renderer/src/components/claude-account-prompt/ClaudeAccountPromptDialog.tsx
  • src/renderer/src/components/claude-account-prompt/choose-claude-launch-account.test.ts
  • src/renderer/src/components/claude-account-prompt/choose-claude-launch-account.ts
  • src/renderer/src/components/claude-account-prompt/claude-account-prompt-state.ts
  • src/renderer/src/components/settings/RepositoryClaudeAccountSection.test.tsx
  • src/renderer/src/components/settings/RepositoryClaudeAccountSection.tsx
  • src/renderer/src/components/settings/RepositoryPane.tsx
  • src/renderer/src/components/settings/RepositoryProjectSettingsSections.tsx
  • src/renderer/src/components/settings/accounts-pane-claude-section.test.tsx
  • src/renderer/src/components/settings/accounts-pane-claude-section.tsx
  • src/renderer/src/components/settings/accounts-search.test.ts
  • src/renderer/src/components/settings/accounts-search.ts
  • src/renderer/src/components/settings/repository-claude-account.ts
  • src/renderer/src/components/settings/repository-search-claude-account.test.ts
  • src/renderer/src/components/settings/repository-search.ts
  • src/renderer/src/components/tab-bar/QuickLaunchButton.tsx
  • src/renderer/src/components/tab-bar/SortableTab.tsx
  • src/renderer/src/components/tab-bar/use-claude-tab-account-label.ts
  • src/renderer/src/components/tab-bar/use-tab-bar-create-menu-controller.ts
  • src/renderer/src/components/terminal-pane/TerminalErrorToast.test.ts
  • src/renderer/src/components/terminal-pane/TerminalErrorToast.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneSurface.tsx
  • src/renderer/src/components/terminal-pane/claude-pinned-launch-error-copy.test.ts
  • src/renderer/src/components/terminal-pane/claude-pinned-launch-error-copy.ts
  • src/renderer/src/components/terminal-pane/pty-connection-types.ts
  • src/renderer/src/components/terminal-pane/pty-connection/cold-restore-claude-account.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/cold-restore-resume-startup.ts
  • src/renderer/src/components/terminal-pane/pty-connection/run-deferred-connect.ts
  • src/renderer/src/components/terminal-pane/pty-connection/transport-output-callbacks.ts
  • src/renderer/src/components/terminal-pane/refused-claude-launch-recovery.test.ts
  • src/renderer/src/components/terminal-pane/refused-claude-launch-recovery.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-host-session-launch.test.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-lifecycle-types.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-manager-options.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-process-exit-actions.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-title-state.ts
  • src/renderer/src/components/use-terminal-create-actions.ts
  • src/renderer/src/hooks/composer-state/quick-creation-execution.ts
  • src/renderer/src/hooks/composer-state/quick-startup-plan.ts
  • src/renderer/src/hooks/ipc-events/agent-status-event-applicator.ts
  • src/renderer/src/hooks/ipc-events/normalize-agent-status-event.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/agent-launch-caller-profile-census.test.ts
  • src/renderer/src/lib/agent-launch-caller-profiles-test-harness.ts
  • src/renderer/src/lib/agent-launch-routing-caller-census.test.ts
  • src/renderer/src/lib/agent-session-launch-plan.test.ts
  • src/renderer/src/lib/agent-session-launch-plan.ts
  • src/renderer/src/lib/claude-launch-account.test.ts
  • src/renderer/src/lib/claude-launch-account.ts
  • src/renderer/src/lib/claude-tab-account-label.test.ts
  • src/renderer/src/lib/claude-tab-account-label.ts
  • src/renderer/src/lib/launch-agent-in-new-tab-claude-account.test.ts
  • src/renderer/src/lib/launch-agent-in-new-tab.ts
  • src/renderer/src/lib/launch-agent-web-host-tab-claude-account.test.ts
  • src/renderer/src/lib/launch-agent-web-host-tab.ts
  • src/renderer/src/lib/runtime-agent-background-create.ts
  • src/renderer/src/lib/sleeping-agent-session-launch-claude-account.test.ts
  • src/renderer/src/lib/sleeping-agent-session-launch.ts
  • src/renderer/src/runtime/agent-session-launch-options.test.ts
  • src/renderer/src/runtime/agent-session-launch-options.ts
  • src/renderer/src/runtime/web-runtime-terminal-create-operation.ts
  • src/renderer/src/store/repos/repo-state.ts
  • src/renderer/src/store/repos/repo-update.ts
  • src/renderer/src/store/slices/agent-status-claude-account.test.ts
  • src/renderer/src/store/slices/agent-status-claude-account.ts
  • src/renderer/src/store/slices/agent-status-contract.ts
  • src/renderer/src/store/slices/agent-status-live-entry-builder.ts
  • src/renderer/src/store/slices/agent-status-live-entry-history.ts
  • src/renderer/src/store/slices/agent-status-recovery-equivalence.ts
  • src/renderer/src/store/slices/agent-status-sleep-claude-account.test.ts
  • src/renderer/src/store/slices/agent-status-sleeping-records.test.ts
  • src/renderer/src/store/slices/agent-status-sleeping-records.ts
  • src/shared/agent-launch-intent.ts
  • src/shared/agent-session-host-authority.ts
  • src/shared/agent-session-resume.ts
  • src/shared/agent-status-ipc-payload.ts
  • src/shared/agent-status-types.ts
  • src/shared/claude/claude-pinned-launch-error.test.ts
  • src/shared/claude/claude-pinned-launch-error.ts
  • src/shared/claude/project-claude-account-preference.test.ts
  • src/shared/claude/project-claude-account-preference.ts
  • src/shared/global-settings-types.ts
  • src/shared/launch-config-claude-account-schemas.test.ts
  • src/shared/protocol-version.ts
  • src/shared/repo-types.ts
  • src/shared/rpc-contract/agent-session-params.ts
  • src/shared/rpc-contract/client-settings-params.ts
  • src/shared/rpc-contract/orchestration-worker-start-params.ts
  • src/shared/rpc-contract/repo-update-params.ts
  • src/shared/rpc-contract/terminal-unary-params.ts
  • src/shared/rpc-contract/worktree-create-params.ts
  • src/shared/sleeping-agent-launch-config.ts
  • src/shared/tui-agent-resume-startup.ts
  • src/shared/workspace-session-sleeping-agents.ts
  • tests/e2e/fixtures/per-project-claude-account/claude
  • tests/e2e/per-project-claude-account.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread src/main/ipc/pty/ipc/spawn-preflight.ts Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new code to review — the rebase replayed the same 15 commits.

Reviewed changes

The branch was rebased between reviews: every PR-authored commit SHA changed (4f038e1..6ff581f → c730a07..2cd7c2d), but pullfrog_checkout_pr returned incrementalDiffPath: null and the two diffPath payloads are byte-identical. No PR-authored file changed, so the prior review stands and there is nothing new to flag.

The two minor suggestions from the previous review remain open and are unaffected by the rebase: the owner-routed roster fetch in use-claude-tab-account-label.ts, and the explicitAccountId sentinel guard in resolveProjectClaudeAccount.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The new WSL path launches unpinned, but the renderer still records and displays the project's saved account for those tabs.

Reviewed changes

This run reviewed the two commits that landed since the prior pullfrog review (2cd7c2d7a44):

  • Merged origin/main (2783aaf77e8), resolving 13 conflicts: kept the branch's --account CLI note and pinned-spawn mark-first/release alongside main's zcode docs, workspacePath launch-mode field, the persistPtyIpcSpawnCommit/publishPtyIpcSpawnCommit split, and main's removal of the activate launch arg.
  • Guarded the explicit sentinel in resolveProjectClaudeAccount, so an explicit __active__ never falls through to the project default (prior review item).
  • Routed the tab tooltip's account roster through getRepoOwnerRoutedSettings(settings, repo), matching the settings section and launch prompt (prior review item).
  • Made WSL launches resolve unpinned: the resolver returns undefined for a WSL target (recorded and saved defaults are ignored; explicit --account still resolves), and both spawn lanes now resolve the account after the terminal target is known.

ℹ️ WSL now falls back to the active account instead of refusing

The new commit reverses the earlier WSL behavior: a project with a saved account no longer refuses, it launches unpinned on the active account. That is a deliberate, documented choice (WSL cannot pin), but it contradicts the PR's "a refusal never falls back to another account silently" principle, and the description still lists WSL among the cases that show a refusal with "Start on active account".

Technical details
# WSL silently falls back to the active account

## Affected sites
- `src/main/claude-accounts/project-claude-account-resolution.ts:24` — a WSL target short-circuits recorded and saved defaults to `undefined`.
- `src/main/ipc/pty/ipc/spawn-preflight.ts:226` and `src/main/ipc/pty/runtime/spawn-preflight.ts:132` — both lanes resolve the account after the terminal target, so no refusal fires for a WSL default.

## Required outcome
- Confirm the silent fallback is intended for WSL, and update the PR description (and the `unsupported-host` copy's scope, now reachable only via an explicit `--account`) so the documented behavior matches the code.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed the single commit since the prior pullfrog review (442fcb6). The rest of the PR was covered in earlier runs and is unchanged.

  • Stopped recording a saved account where it cannot be pinned: stampClaudeLaunchAccount now skips the project's saved default for an SSH or WSL repo (via claudeAccountPinningUnsupportedReasonInState), while still recording an explicit pick so main refuses it with its own message.
  • Hid the tab account label for every unpinnable repo: claudeTabAccountLabel takes pinningUnsupported instead of isSshRepo, and useClaudeTabAccountLabel derives it from the same helper the settings section and launch prompt already use. This closes the false label for WSL tabs, where main launches unpinned on the active account.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 21821d13-d394-4c0b-90e9-358ae1c6e365

📥 Commits

Reviewing files that changed from the base of the PR and between 2cd7c2d and 1baf9cc.

📒 Files selected for processing (49)
  • docs/reference/agent-status-store.md
  • src/cli/specs/orchestration-worker-specs.ts
  • src/main/agent-launch/agent-launch-executor.ts
  • src/main/agent-launch/agent-launch-mode.ts
  • src/main/claude-accounts/claude-pty-account-registries-startup.ts
  • src/main/claude-accounts/project-claude-account-resolution.test.ts
  • src/main/claude-accounts/project-claude-account-resolution.ts
  • src/main/codex/codex-persistent-command-retention.test.ts
  • src/main/ipc/pty/ipc/spawn-commit.ts
  • src/main/ipc/pty/ipc/spawn-preflight.ts
  • src/main/ipc/pty/ipc/spawn-run.ts
  • src/main/ipc/pty/runtime/spawn-claude-account.ts
  • src/main/ipc/pty/runtime/spawn-commit.ts
  • src/main/ipc/pty/runtime/spawn-preflight.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.test.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.ts
  • src/main/native-chat/agent-session-wire/agent-session-empty-delta-retention.test.ts
  • src/main/persistence/loading-store/profile-state-sqlite-authority.test.ts
  • src/main/persistence/profile-state/profile-state-authority-bootstrap.test.ts
  • src/main/persistence/profile-state/profile-state-live-store-factory.test.ts
  • src/main/runtime/orca-runtime-get-agent-session-execution-namespace.ts
  • src/main/runtime/orca-runtime-tests/claude-account-agent-session-lanes.spec.ts
  • src/main/runtime/rpc/methods/orchestration/worker/local-worker-start.ts
  • src/main/runtime/rpc/methods/orchestration/worker/workers.ts
  • src/main/startup/main-process-ready-foundation.ts
  • src/main/window/attach-main-window-services.ts
  • src/renderer/src/components/tab-bar/use-claude-tab-account-label.ts
  • src/renderer/src/components/terminal-pane/TerminalPaneSurface.tsx
  • src/renderer/src/components/terminal-pane/pty-connection-types.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-process-exit-actions.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/agent-launch-caller-profiles-test-harness.ts
  • src/renderer/src/lib/claude-launch-account.test.ts
  • src/renderer/src/lib/claude-launch-account.ts
  • src/renderer/src/lib/claude-tab-account-label.test.ts
  • src/renderer/src/lib/claude-tab-account-label.ts
  • src/renderer/src/lib/launch-agent-in-new-tab.ts
  • src/renderer/src/lib/launch-agent-web-host-tab.ts
  • src/renderer/src/store/slices/agent-status-claude-account.test.ts
  • src/renderer/src/store/slices/agent-status-live-entry-builder.ts
  • src/shared/agent-launch-intent.ts
  • src/shared/agent-session-resume.ts
  • src/shared/agent-status-types.ts
  • src/shared/protocol-version.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • docs/reference/agent-status-store.md
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/en.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread src/renderer/src/i18n/locales/ko.json Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed what landed since the prior pullfrog review (1baf9ccc34): one i18n commit and a fresh origin/main merge with four conflict resolutions. Both pnpm tc:node and pnpm tc:web pass, and the PR's tests for every file touched by a conflict resolution are green (71 tests).

  • Merge of origin/main (6ce13cfe4d, main at aedb9305cd), four conflicts resolved as unions:
    • TerminalErrorToast.tsx — kept the branch's describeClaudePinnedLaunchError short-circuit ahead of main's new localizeTerminalSpawnHints, and main's withoutTerminalSpawnIssueRequest is still consumed by displayError.
    • en.json / es.json — main's ptyAllocationLimit / terminalProcessLimit strings unioned with the branch's ClaudePinnedLaunch block; both files parse and carry a single ClaudePinnedLaunch key.
    • agent-status-sleeping-records.ts — branch's claudeAccountId carrier survives (copyLaunchConfig, withMainPinnedClaudeAccount) alongside main's agentVerdictFields / agentTurnEndedUncleanly verdict plumbing.
  • Korean remember label reworded to a complete phrase (i18n only).

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 6b60d13a-672e-4bb9-b9ac-b2b430a74d36

📥 Commits

Reviewing files that changed from the base of the PR and between f3a5f83 and 6ce13cf.

📒 Files selected for processing (21)
  • docs/reference/agent-status-store.md
  • src/main/ipc/pty/runtime/spawn-commit.ts
  • src/main/persistence-update-repo.test.ts
  • src/main/persistence/tracking-repos/repo-update-operations.ts
  • src/main/runtime/orca-runtime-create-terminal.ts
  • src/main/runtime/runtime-pty-controller-contract.ts
  • src/main/runtime/runtime-terminal-contracts.ts
  • src/main/startup/main-process-ready-foundation.ts
  • src/renderer/src/components/terminal-pane/TerminalErrorToast.test.ts
  • src/renderer/src/components/terminal-pane/TerminalErrorToast.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/store/slices/agent-status-recovery-equivalence.ts
  • src/renderer/src/store/slices/agent-status-sleeping-records.ts
  • src/shared/agent-session-resume.ts
  • src/shared/protocol-version.ts
  • src/shared/workspace-session-sleeping-agents.ts
🚧 Files skipped from review as they are similar to previous changes (7)
  • docs/reference/agent-status-store.md
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/zh.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — the fix reads correctly; one rough edge in the new record shape inline.

Reviewed changes

This run reviewed the single commit since the prior pullfrog review (6ce13cfe4d). All prior pullfrog threads were already resolved and are unaffected.

  • Stopped synthesizing a launch config to carry main's pinned account — when a restarted Claude pane has no renderer launch record, sleepingRecordFromEntry no longer builds a launchConfig out of today's agentArgs/agentEnv; the account now rides the record, so resume no longer presents current settings as the session's original launch options.
  • Added a record-level claudeAccountId — new optional field on SleepingAgentSessionRecord and the workspace-session schema, set top-level when no launch config exists and still merged into launchConfig.claudeAccountId when one does.
  • Both resume issuers fall back to it — cold restore (cold-restore-resume-startup.ts:100) and the generic resume path (sleeping-agent-session-launch.ts:88) resolve launchConfig?.claudeAccountId ?? record.claudeAccountId.
  • Test updated to assert the account lands on the record rather than the launch config.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed the single commit since the prior pullfrog review (42dd573c9d). It closes the one open item from that review, and no new concerns surfaced.

  • Compared the record-level pinned account in both capture-equivalence predicates — sleepingRecordsEquivalentIgnoringCaptureTime and recoveryRecordMatches now also require existing.claudeAccountId === next.claudeAccountId, so a record whose account changed after a restart is no longer treated as unchanged and the stale account is replaced on capture. The comparison is consistent with launchConfigsEqual, which already covers launchConfig.claudeAccountId; a record-level vs. launch-config-level mismatch still compares unequal.
  • Added a regression test — agent-status-sleep-claude-account.test.ts asserts that two records differing only in their record-level claudeAccountId (no launchConfig) are unequal under both predicates, and that a copy is equal.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@greptile-apps

greptile-apps Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge based on the findings established in this review.

Summary

The PR adds per-project Claude account selection and pinned launches, including persistence, prompts, restore behavior, and refusal handling. Changes since the previous review also include CI, mobile localization, relay queue, and Windows uninstall work. No new actionable finding was established. All three previous Greptile threads are manually resolved.

Reviews (13) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed what landed since the prior pullfrog review (573ff1d): a single origin/main merge whose only conflict was one renderer transport file. pnpm tc:node, pnpm tc:web, and pnpm tc:cli are clean, and the three renderer tests over the touched file pass (26 tests).

  • Merged origin/main (b9d05c0, main at d0db35c), resolving one conflict in remote-runtime-pty-transport.ts as a clean union: kept main's #23701 reattach input buffer — the withRemoteReattachInputBuffer import and wrapper, the connectForRecovery indirection, and the setConnectForRecovery method — alongside the branch's createAgentSessionLaunchOptions, which carries the launch config's Claude account to a capable host.

The resolution holds up under a two-way check: the diff against the first parent shows exactly main's side, and the diff against the second parent shows exactly the branch's side. No PR-authored line was lost and no main change was dropped.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed the one commit since the prior pullfrog review (b9d05c0).

  • Fail closed when a crashed pinned read-back is deferred — reconcilePinnedKeychainCredentials now returns 'reconciled' | 'deferred', and doSyncForCurrentSelection throws the existing "Unlock the Keychain and retry." error when the scoped Keychain item of a crashed pinned session cannot be read, instead of materializing the possibly-spent managed credentials onto the host. The two non-strict callers (reconcilePinnedAccountCredentials, revalidatePinnedSeedMarkers) keep ignoring the result, and the marker survives so the next launch or startup retries.

Verified: pnpm tc:node clean, the full src/main/claude-accounts suite green (284 tests), and the added test asserts the runtime credentials file is left byte-identical with the seed marker intact — it fails without the fix.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed the single commit since the prior pullfrog review (fc4d926): an ask-on-launch project now fails closed when its Claude account roster can't load, instead of silently starting on the active account.

  • Cancelled the launch when the roster fails to load — both { kind: 'default' } fallbacks in chooseClaudeLaunchAccountForWorkspace (the failedProviders.includes('claude') branch and the catch) now call a new cancelForUnavailableAccounts(), which shows an error toast and returns { kind: 'cancelled' }. All three consumers already treat cancellation as "do not launch": launchWithClaudeAccountChoice returns without calling launch, chooseClaudeLaunchAccountIdForRepo returns null, and quick-creation-execution.ts:133 aborts the submit.
  • Added the localized message — auto.components.ClaudeAccountPromptDialog.accountsUnavailable in all six locales.
  • Added a regression test — mocks the roster client to throw and asserts the workspace choice resolves to { kind: 'cancelled' } with exactly one toast.error; the assertion holds even though shouldPromptForClaudeAccount would decline a single-account prompt, because the account-count gate is only reached after a successful fetch.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed what landed since the prior pullfrog review (29c7bf41): a single origin/main merge whose four conflicts all resolved as unions, plus one small refactor. pnpm tc:node, tc:cli, and tc:web are clean, and the tests over every conflict-resolved file plus the agent-launch and worktree-startup lanes pass.

  • Merged origin/main (6cb85c2, main at a5ce8251e3, #23697 "Agent launches carry the surface that started them"), resolving four conflicts as unions so neither side is dropped:
    • src/cli/handlers/worktree.ts — main's launchSource: 'cli' rides alongside the branch's startupClaudeAccount.
    • worker-worktree-creation.ts — main's startupLaunchSource: 'orchestration' and the branch's startupClaudeAccount both stay inside the withAgentTerminal branch.
    • worktree-create-args.ts — both params.startupClaudeAccount and params.launchSource are mapped onto the runtime create args.
    • worktree-create-params.ts — the branch's startupClaudeAccount field and its requires startupAgent claude superRefine sit next to main's launchSource param.
  • Extracted the account resolver into OrcaRuntimeWithGetWorktreeTerminalProvisioningHost.resolveStartupClaudeAccount(request, createRouteKind), which create-managed-worktree.ts now calls; it is behavior-identical to the inline resolveWorktreeStartupClaudeAccount call it replaces.

The merge holds under a two-way check: git diff a5ce8251e3 6cb85c2 over the touched files contains only the branch's additions, so no main change was dropped and no branch line was lost. All prior pullfrog threads were already resolved.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Merging origin/main added empty-workspace-default-chat to AGENT_LAUNCH_CALLER_PROFILES without bumping the census count, so agent-launch-caller-profile-census.test.ts fails on the branch (expected 14 to be 13). The fix is a one-line count bump; the detail is inline on the harness profile below.

Reviewed changes

This run reviewed the single commit since the prior pullfrog review (6cb85c2): a fresh origin/main merge (4858006, main at f4829f0). The 13 files both parents touched all resolved as unions, and pnpm tc:node, tc:web, and tc:cli are clean.

  • Merged origin/main and resolved every both-parents file as a union, so no branch line and no main change was dropped:
    • spawn-commit.ts — main's createTerminalSessionStateSaveFailureMessage(error) calls alongside the branch's relocated markRuntimeClaudePtySpawned.
    • TerminalPaneSurface.tsx / use-terminal-pane-title-state.ts — main's sessionStateSaveFailureMessage rename alongside the branch's refused-launch recovery wiring.
    • agent-launch-caller-profiles-test-harness.ts / agent-launch-routing-caller-census.test.ts — main's empty-workspace-default-chat entry alongside the branch's terminal-pane-start-on-active-account.
    • launch-agent-in-new-tab.ts — main's pendingActivationSpawn alongside the branch's claudeAccountId / stampClaudeLaunchAccount.
    • Six locale JSONs and en-runtime-required.json — main's TerminalSessionStateSaveFailureDialog / terminal.sessionSaveFailure keys alongside the branch's Claude-account strings; no duplicate keys and all files parse.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed the single commit since the prior pullfrog review (4858006). It is a test-only fix for the caller-census failure that review raised.

  • Fixed the merged caller-census count — agent-launch-caller-profile-census.test.ts:36 now asserts 14 profiles. The merged AGENT_LAUNCH_CALLER_PROFILES table carries both main's empty-workspace-default-chat and this branch's terminal-pane-start-on-active-account, so the stale 13 failed on the branch. Verified the census test passes (32 tests).

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

…t-account

# Conflicts:
#	src/renderer/src/lib/agent-launch-caller-profile-census.test.ts
#	src/renderer/src/lib/agent-launch-routing-caller-census.test.ts

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed the single commit since the prior pullfrog review (fb34204): a fresh origin/main merge (aa7ec46, main at 6e1b7e7, #23815 "remove junk tests that assert source text"). Only two files conflicted; pnpm tc:node, tc:web, and tc:cli are clean.

  • Merged origin/main, resolving both conflicts by deletion — main removed the two caller-census test files (agent-launch-caller-profile-census.test.ts, agent-launch-routing-caller-census.test.ts), so dropping them here (and the prior commit's count bump with them) matches main's repo-wide cleanup of source-text assertions. No dangling references remain.
  • Kept the branch's caller profile through main's harness cleanup — agent-launch-caller-profiles-test-harness.ts adopted main's trimmed shape (sourceMarkers / passes* / readsBack gone) while retaining the branch's terminal-pane-start-on-active-account profile; the four it.each caller suites still exercise all 14 profiles (308 tests green).
  • Preserved claudeAccountId through main's subagent refactor — the field survives on AgentStatusEntry after main split subagent normalization into agent-status-subagent-snapshot.ts, and stays out of pickParsedAgentStatusPayload exactly as before.
  • Unioned the locale keys — main's new strings sit alongside the branch's ClaudePinnedLaunch block in all six locales plus en-runtime-required.json; all files parse, no duplicate keys, no conflict markers anywhere in src/.

Verified locally: src/main/claude-accounts suite (283 tests) and the four caller-profile suites (308 tests) pass.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

…t-account

# Conflicts:
#	src/main/runtime/orca-runtime-agent-session-operation.test.ts
#	src/main/runtime/orca-runtime-create-managed-worktree.ts
#	src/shared/global-settings-types.ts

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed the single commit since the prior pullfrog review (aa7ec46): a fresh origin/main merge (7eea324faf, main tip a57863ba16). Its three conflicts all resolved as clean unions, and pnpm tc:node, tc:web, and tc:cli are clean.

  • Merged origin/main and resolved all three conflicts as unions — each verified two ways (git diff 7eea324 a57863b over the conflict files contains only the branch's added lines, so no main change was dropped):
    • orca-runtime-agent-session-operation.test.ts — main's file plus the branch's two Claude-account tests; #23744 reworked trust into the spawn-time hook (agent-workspace-trust-spawn.ts) and dropped registerAgentTrustHandlers, so the branch correctly no longer registers it.
    • orca-runtime-create-managed-worktree.ts — main's version plus the branch's two startupClaudeAccountId lines; #23744's sshConnectionId / markTrusted plumbing is gone with it, matching main.
    • global-settings-types.ts — the branch's askClaudeAccountPerProject sits alongside main's agentWorkspaceTrustEnabled.
  • Kept the feature scope intact through the merge — the set of files changed versus the base is identical before and after (219 files, none dropped or gained), and no conflict markers remain anywhere in src/.
  • Verified the new cross-feature integration — main's #23744 trust hook now lives in ipc/pty/{ipc,runtime}/spawn-options.ts and runs after the branch's preparePinnableClaudeAuth in spawn-preflight.ts, so a pinned launch still writes folder trust into its own pinned config dir. The src/main/claude-accounts suite (283 tests) and the agent-workspace-trust plus pinned-spawn tests (104 tests) are green.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed the single commit since the prior pullfrog review (7eea324faf): a fresh origin/main merge (c5d64ed, main at 0b79720). Its 32 conflict resolutions all read as clean unions, and pnpm tc:node, tc:web, and tc:cli are clean.

  • Merged origin/main and resolved every both-parents file as a union, verified two ways (git diff 0b79720 c5d64ed over the conflict files contains only branch additions, so no main line was dropped; git diff 7eea324 c5d64ed contains only main's changes, so no branch line was lost):
    • agent-hooks.ts / register-core-handlers.ts — main's new agentStatus:hasVerifiableAgentProcess handler and ensureStructuredAgentSessionHostUnlessRefused sit alongside the branch's withPinnedClaudeAccount roster stamping and getPersistedTerminalLayouts lookup.
    • orca-runtime-create-terminal.ts / local-worker-start.ts / main-process-account-services.ts / attach-main-window-services.ts / main-process-runtime-service.ts — main's paired viewer colours, invalidateAuthorizedRootsCacheForRepo, dispatch-capability removal, and real-home hooks reader ride alongside the branch's claudeAccountId launch threading.
    • SortableTab.tsx — main's useTabStripSlotProps / TAB_CONTAINER_WIDTH_CLASSES alongside the branch's useClaudeTabAccountLabel and tooltip account suffix.
    • docs/reference/agent-status-store.md and the seven locale JSONs — main's agent-verdict and native-chat rewrites unioned with the branch's pinned-Claude-account section and strings; every file parses with no duplicate keys.
    • accounts-pane-claude-section.test.tsx — the branch-only test model picked up main's new miniMaxApiKeyProtection / miniMaxCookieProtection fields so it still type-checks.

Verified locally: no conflict markers anywhere in src/, pnpm tc:node / tc:web / tc:cli all clean, src/main/claude-accounts (283 tests), the tab-bar suites (565 tests), and the tests over every conflict-resolved file pass. All prior pullfrog threads are [RESOLVED].

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

…t-account

# Conflicts:
#	src/main/window/attach-main-window-services.ts
…t-account

# Conflicts:
#	src/main/agent-launch/agent-launch-mode.ts
…t-account

# Conflicts:
#	src/shared/agent-session/lifecycle/agent-session-resume.ts
#	src/shared/agent-session/lifecycle/resume/agent-resume-record-from-status.ts
#	src/shared/agent-session/lifecycle/resume/sleeping-agent-launch-config.ts
…t-account

# Conflicts:
#	src/main/runtime/session-lifecycle/projection/claude-running-pane-account-move.ts
…t-account

# Conflicts:
#	src/shared/rpc-contract/client-ui/client-settings-params.ts
#	src/shared/rpc-contract/orchestration/orchestration-worker-start-params.ts
#	src/shared/rpc-contract/terminal/agent-session-params.ts
#	src/shared/rpc-contract/workspaces/worktree-create-params.ts
…t-account

# Conflicts:
#	src/shared/workspace-session/workspace-session-sleeping-agents.ts
…t-account

# Conflicts:
#	src/main/runtime/rpc/methods/orchestration/worker/follow-up/worker-earlier-work.ts
…t-account

# Conflicts:
#	src/cli/orchestration/workers/worker-launch-handler.ts
…t-account

# Conflicts:
#	src/main/runtime/rpc/methods/orchestration/worker/start/local-worker-start.ts
#	src/main/runtime/rpc/methods/orchestration/worker/worker-start-method.ts
…chema lazily

Main's zod-prefer-lazy-ratchet refuses eager top-level Zod schemas; the branch's TerminalLaunchConfigParam now uses lazyZodSchema like the rest of the RPC contract.
…restarts and cold restore

orcad never seeded the pinned-PTY registry, so after a restart its surviving --account panes looked unpinned and an account switch could move them; it now seeds from its own data folder before the backend starts.

Cold restore of a live pane read the pinned account only from the live launch config or the sleep record's top level, missing a record that carries it inside its launchConfig.
…ndow account switches

Switching the Claude account in the window restarted every local pane on the
outgoing account, pinned ones included, which moved a pinned pane off its
account. The host path already skips pinned panes; the renderer scan now does
too, using the same pin source the tab label reads (status row, then launch
config, honouring SSH/WSL and the active sentinel). Pinned panes are left out
of the move and the cannot-move list: they are not stranded, they are working
as pinned.

Account-restart resume startups for Claude also carry the pinned account id,
as cold restore does, so a restart from another path keeps the pin.
…e pane unpinned on account restart

A pane started on the active account carries ACTIVE_CLAUDE_ACCOUNT; dropping it let the restart fall through to the project's saved account instead of the one the window switched to.
…kspace in a pinned project up front

The pinned-account refusal only looked at an existing workspace, so a chat worker
creating a new workspace in a pinned repo created the worktree first and then
silently became a terminal. A repoSelector place now resolves its repo through
showRepo and reads the saved account through the same resolver, so the refusal
happens before anything is created. An unresolvable selector stays unrefused;
the post-creation re-check still covers it.
…lacement cannot honor

A follow-up keeps the account its worker started on. A reused terminal or
chat, a reopened chat, a reopened terminal and a fresh start with an earlier
account all ignore or overwrite the caller's --account without a word. Refuse
it right after placement, comparing resolved ids so an email of the same
account still passes, and still allow it on a fresh start whose earlier
worker had no account.
No path can send a follow-up with a caller --account: the only follow-up start (send and settled follow-through) builds its own params without one, so the guard was dead code.
…er test for what happens

A worker preflight has no settlement context, so the pinned project turns the chat into a terminal before the workspace is created rather than refusing it.
…t-account

# Conflicts:
#	src/main/runtime/rpc/methods/orchestration/worker/follow-up/worker-earlier-work.ts
#	src/main/runtime/rpc/methods/orchestration/worker/start/local-worker-start.ts
…t-account

# Conflicts:
#	src/main/runtime/session-lifecycle/projection/restart-agent-pane-in-place.ts
#	src/shared/rpc-contract/terminal/terminal-unary-params.ts
…t-account

# Conflicts:
#	src/main/ipc/register-core-handlers/register-core-handlers.ts
#	src/renderer/src/components/terminal-pane/errors/TerminalErrorToast.tsx
#	src/renderer/src/i18n/locales/en.json
#	src/renderer/src/i18n/locales/ko.json
#	src/renderer/src/i18n/locales/zh.json
…t-account

# Conflicts:
#	src/main/ipc/register-core-handlers/register-core-handlers.ts
#	src/renderer/src/components/terminal-pane/controller/TerminalPaneSurface.tsx
…t-account

# Conflicts:
#	src/renderer/src/components/agent/launch-menu/AgentMenuItems.tsx
…t-account

# Conflicts:
#	src/renderer/src/components/agent/launch-menu/use-tab-agent-menu-launch.ts
…t-account

# Conflicts:
#	src/renderer/src/i18n/locales/ko.json
…t-account

# Conflicts:
#	src/main/runtime/workspaces/startup/workspace-terminal-provisioning.ts
…t-account

# Conflicts:
#	src/main/window/attach-main-window-services.ts
…t-account

# Conflicts:
#	src/renderer/src/i18n/locales/ja.json
… active account across restarts

A pane started on the active account recorded nothing in the main pinned-PTY registry, so after Orca restarted (always on Windows, where the renderer's launch config does not survive) restart-in-place fell back to the project's saved account. Spawns that chose the active account now record ACTIVE_CLAUDE_ACCOUNT per PTY. The pinned lookup still reports these panes as unpinned for labels and account moves; only restart-in-place reads the recorded choice.
…t-account

# Conflicts:
#	src/main/agent-launch/agent-launch-mode-wording.ts
#	src/main/agent-launch/agent-launch-mode.ts
#	src/main/runtime/construction/orca-runtime-terminal-worker-restart-resume.ts
#	src/main/runtime/session-lifecycle/projection/restart-agent-pane-in-place.ts
#	src/main/startup/runtime-startup/main-process-runtime-launch.ts
#	src/renderer/src/App.tsx
#	src/renderer/src/components/settings/accounts/claude/accounts-pane-claude-section.tsx
#	src/renderer/src/i18n/locales/es.json
#	src/shared/agent-launch/contracts/agent-launch-intent.ts
#	src/shared/remote-runtime/protocol/account-runtime-capabilities.ts
…t-account

# Conflicts:
#	src/cli/specs/worktree-create.ts

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants