Skip to content

feat: add named Claude and Codex account profiles - #25066

Closed
dlgochan wants to merge 25 commits into
stablyai:mainfrom
dlgochan:feat/agent-profiles
Closed

dlgochan wants to merge 25 commits into
stablyai:mainfrom
dlgochan:feat/agent-profiles

Conversation

@dlgochan

@dlgochan dlgochan commented Oct 3, 2026 •

Copy link
Copy Markdown

Add named Claude and Codex account profiles

ELI5

Launch a work or personal Claude/Codex account from the new-tab menu without changing the account used by other conversations. Add a named profile in Settings → Agents by selecting an Orca account, signing into another one, or connecting an existing CLI configuration folder.

What Changed

  • One profile model and management UI for Claude and Codex, backed by their existing account services. Existing built-in launch entries remain available.
  • Existing-folder connection with a preview of the resolved runtime, folder and identity status. Simple literal home assignments and aliases can resolve a folder; unsupported shell expressions offer folder selection.
  • Profile ownership carried through terminal creation, structured sessions, persistence and recovery. An existing conversation keeps its captured account/home when defaults change or its launcher is renamed/unlinked. Normal runtime updates use the existing provider discovery path without rebinding the account.
  • Host-owned catalog validation and live ownership checks. Removing a launcher retains the account and external files; account removal remains a separate action.

Why

Orca already provides account enrollment and account switching. This PR adds named launch entries, connection to existing CLI configuration homes, and captured profile selection through launch and recovery, reusing the existing account services.

A launch command alone does not preserve account ownership through Orca's credential preparation, shell startup and session recovery. This change captures ownership once and validates it where the provider process is acquired. External configurations retain their own configuration and remain visibly unverified; they support fresh terminal launches. Managed accounts retain the existing provider-owned credential lifecycle.

Linked Issue

Fixes #25065

Related: #2284 (broader custom-agent and launch-argument support).

Visual Proof

Automated captures from the actual Electron app with synthetic data. Before/after means the same current app before and after adding four external profiles; it is not a separately built upstream baseline.

Before adding profiles After adding profiles
Agents with no profiles Agents with Claude and Codex profiles
Connection preview and dark launch menu

Claude connection preview

Dark launch menu

Testing

Latest integration e2a69230 merges official main b7521310, followed by 514ad91a to satisfy absolute file-length lint limits through cohesive extraction. The 19 conflict resolutions and 41 automatic overlaps reuse upstream registered-agent definitions, neutral resume handles and account-home representation while preserving captured profile authority. External Codex profile routes retain separate sync semantics across reload; canonical isolated Claude homes retain their own connector grants while legacy snapshots follow upstream stripping. Unsupported captured profile records cannot fall back to a selected-account model probe. The symlink-dependent PTY test block is skipped on Windows; portable tests remain enabled. Independent integration and fix reviews approved. Initial integration testing had 815 passes and two catalog failures; after correction, frozen affected suites passed 104/104 and 89/89, then the extraction follow-up passed 352/352 across 20 files (overlapping counts). Final Node/web types, raw hook-equivalent lint/format/React checks, exact-target quality and repository gates passed. The first final web typecheck timed out without diagnostics at 300 seconds; a same-resource retry passed in 153 seconds. Native/authenticated coverage limits below still apply.

Earlier upstream integration 4b10ab6e merges official main 40f9e7a3: eight launch/recovery conflicts and twenty automatic overlaps preserve request-based retry/coalescing, replacement ordering and captured profile authority. New regressions cover separate profiles sharing a request ID, renamed actions, profile-bound replacement/resume, independent pending launch rows, and real managed Codex preparation through post-shell environment deletion (external behavior preserved). Synthetic validation: 534/534 tests across 42 files, then 84/84 affected regression tests and a final 5/5 UI recheck; counts overlap. Final Node/web types, exact-target quality (263 source files), localization and relevant gates passed. The first Node typecheck hit its 300-second limit without diagnostics; one retry with unchanged resource limits passed in 133 seconds. Independent scoped review approved. The runtime-required locale file is byte-identical to this upstream target, including sendOutcomeLost; there is no remaining profile-only relocation. No dependency install was needed.

Earlier upstream integration 10eb079a merges official main 6c075700 and resolves the model-catalog conflict by retaining machine-owned listing/wait behavior alongside profile-bound account authority. The existing profile regression now covers both waiting and non-waiting reads; automatic RPC and locale overlaps preserve both parents. Independent scoped review approved. Synthetic Linux validation: 462/462 tests across 31 files; Node/web types, changed-code quality, localization, formatting and relevant repository gates passed. Exact new parser packages were integrity-verified and reconciled only into isolated dependencies, without lifecycle scripts or a fresh frozen install. Native authenticated and in-flight refresh limitations below remain unchanged.

Review follow-up a7f57401 / 036ed8bc: external Claude profiles sharing the canonical runtime-auth home now reserve pending ownership and transfer it into the existing live PTY gate in both execution paths. Relative runtime paths and symlink aliases are recognized; independent external homes remain independent, and ordinary legacy prelaunch refresh is preserved. Cancellation, adoption/reattachment, early exit and recovery regressions cover the ownership lifecycle. Synthetic Linux validation: 217/217 affected tests, then 79/79 focused tests after the relative-path correction (overlapping counts). Node types and repository gates passed on the initial repair; changed-code quality and formatting passed after the narrow correction. Independent review approved both changes. A refresh already in flight before ownership acquisition can still complete; this does not add full refresh/launch serialization. Native authenticated coverage limits below remain unchanged.

Upstream integration c05f42b0 merges official main ea6a6d60 without rewriting branch history. The two conflicts preserve both locale sections and combine upstream wrapped OpenCode prompt handling with profile ID propagation. Independent integration review found no blocking issues. Synthetic Linux validation: 569/569 tests across 39 files; Node/web types, quality across 260 PR files, localization and relevant repository gates passed. Existing isolated dependency copies were reconciled with the exact upstream parser patch using verified private-file replacements; this was not a fresh frozen install. Native authenticated coverage limits below remain unchanged.

First review follow-up aa7334f1: default external Claude homes preserve default credential semantics and resist shell HOME/config-home overrides; Codex forced workspace restrictions and raw CR/LF/NUL suffixes are refused; POSIX-only tests have selective Windows guards. The sign-in suggestion was checked with mounted regression tests and required no production change. Focused synthetic Linux run: 135/135 passed, followed by 49/49 targeted tests after an additional trailing-space path regression. Counts overlap. Final Node types, changed-code quality and relevant repository gates passed. Native Windows and authenticated macOS Keychain execution remain untested.

  • Automated regression tests added/updated.
  • Human manual native-account testing: not performed; automated isolated Electron evidence is described below.

At final fix commit 4244dc7c:

  • One relevant regression run exercised 977 tests across 85 files: 974 passed; three stale fixtures were corrected and all affected suites passed a targeted 85/85 recheck. Counts overlap and are not additive. This includes real canonical identity changes, preserved token rotation, settings authority refusal, paired RPC admission, both wrapped root-cwd guards, and CLI downgrade refusal.
  • Final production Node types, changed-file quality (27 files), RPC catalog, README links, maximum-line/suppression checks, and the runtime/Electron boundary gate passed. The baseline for the last gate is unchanged.
  • Main static build passed using the existing static guard with its daemon execution deferred. The original daemon smoke and actual structured runtime import/managed-root ownership checks passed under plain Node in a disposable Linux container.

Earlier checkpoint 4d85169d, for unchanged surfaces:

  • 646 relevant regressions passed. Two automated Electron scenarios passed in light/Git-workspace and dark/folder-workspace configurations. Real IPC drives preview/save/unlink/launch; synthetic CLIs record argv/environment. Coverage includes aliases/folders, loading/errors/cancel, menu synchronization, concurrent homes after shell startup exports, rename/unlink and retained external files/running-session ownership.
  • 16 protocol/authority tests passed, including a disposable actual Codex 0.158.0 app-server probe using an empty home, no login and no model turn. These tests overlap other runs. The guard accepts its originless built-in endpoint, rejects explicit origin/layer overrides, and reaches the expected logged-out refusal.
  • Production Node, renderer and CLI typechecks passed; whole-contribution changed-file quality passed across 247 files against 995715b1, along with localization and related required gates. Renderer/CLI production code is unchanged by the final fix wave.

The additional E2E integration typecheck fails on an unchanged upstream Window.__paneManagers declaration collision, reproduced with only the existing declarations. This is separate from the passing production typechecks. Full repository pnpm lint, pnpm test and pnpm build are not claimed as blanket passes.

Native OAuth login and macOS Keychain behavior have not been tested with real accounts. Account/UI runtime tests use isolated synthetic Linux homes and credentials. Static builds/types run on macOS. The upstream main-build guard also invoked its empty-argv daemon load smoke once on macOS; it exited with the expected Usage error. A static import audit found no personal-home access before refusal, but no syscall trace was collected. Subsequent runtime smoke and application checks run in the isolated container.

AI Disclosure

Implemented and reviewed with Codex and GPT-6-family agents, including independent GPT-6 Astra task reviews. The submitting GitHub account is dlgochan. X handle not provided.

Review

Independent whole-contribution review followed by a scoped review found all six material findings addressed at 4244dc7c: effective Claude settings authority, canonical identity drift, paired structured admission, wrapped root-cwd guards, per-acquisition CLI compatibility, and the plain-Node/Electron boundary. Review covered default-launch compatibility, local/remote refusal, provider-specific ownership, cleanup, bounded preflight cost, current light/dark UI evidence and credential/command safety. Native authenticated behavior remains unverified.

Profile actions currently support local macOS/Linux; Windows, WSL, SSH and paired-runtime profile actions are explicitly unavailable. Existing non-profile paths retain their routing. Account/profile secrets are not stored in profile snapshots, and command discovery never sources or evaluates shell startup files.

Managed Codex authority inspection uses its app-server config/account interfaces before launch. Provider startup can consult authentication/policy stores or write its owned home before replying; this is not a filesystem-read-only or Keychain-isolation guarantee. Effective configuration can change between inspection and child execution. Managed Claude checks canonical identity and observable settings before acquisition; opaque cached remote/MDM/helper policy sources are conservatively refused. These checks preserve benign settings and same-account token rotation, but are not atomic attestation of a mutable provider environment.

The post-publication repair also received independent scoped approval at aa7334f1; all four inline findings were addressed and the sign-in disposition was verified.

Agent skill upstream boundary

  • Not applicable: this change does not copy upstream skill-installer material.

Notes

The change spans the existing terminal, structured-session, persistence and renderer boundaries to preserve the same account binding throughout launch and recovery. It does not implement the full custom-agent proposal in #2284.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • Before/after screenshots attached
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path impact considered
  • Exact local check results and limitations recorded; repository-wide CI remains to run

Wire common profile acquisition through desktop and runtime spawns, pin execution authority, retain captured bindings, and protect live account ownership. Focused Docker suites passed; final full typecheck and changed-quality completion remain limited by bounded host checks.
@coderabbitai

coderabbitai Bot commented Oct 3, 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
📝 Walkthrough

Walkthrough

This change adds named Claude and Codex profiles. It introduces profile validation, host and command discovery, external-home handling, managed-account preparation, identity and launch-authority checks, and account-ownership guards. Profiles now flow through IPC, preload, terminal, structured-session, persistence, recovery, and renderer launch paths. The renderer adds profile settings, account enrollment, launch-menu entries, validation messages, and synchronization tests. Additional tests cover cleanup, credential isolation, recovery, local-host restrictions, and end-to-end profile launches.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to 4b10a

Production behavior is unaffected; add a Windows skip to the symlink-based profile spawn tests so Windows CI does not fail.

Security Architecture Review

Security architecture risk: 🟡 Moderate · up to 4b10a

The change affects which account credentials a conversation uses, including after restart. Local-only restrictions and live identity checks limit exposure, but credential ownership and failure recovery introduce consequential state transitions whose exceptional paths are not fully established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The reviewed profile path affects accounts and configuration homes accessible to the local execution host, including shared Claude credential refresh state. Its account-selection consequences can span concurrent conversations, but named-profile inputs are rejected at the inspected paired terminal-create boundary.

Trust Boundaries and Controls

  • observed — Caller-supplied snapshot structure is validated and its host must match the execution host. Managed binding inspection obtains the account's current home and identity through the provider adapter; supplied executable and identity metadata are not simply accepted as launch authority.

Resilience and Maintainability Implications

  • observed — Ownership transfer excludes reattachments, adopted sessions, and replies already marked exited. Account-deletion checks reject managed launcher references and structured execution whose ownership is live or uncertain, preserving credential homes needed by active execution.

Hardening Proposals

  • proposed — Establish an explicit terminal-state guarantee for exceptions after physical spawn but before publication: either discard the exact fresh incarnation or retain a discoverable recovery owner. Keep credential protection until process death is proven, and validate repeated cleanup and interrupted recovery without releasing ownership of a surviving process.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 13.22% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 121 functions across 97 files. (1 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed [#25065] The PR adds named Claude/Codex profiles for managed accounts and external CLI homes, with preview, save, unlink, and launch-menu support. Captured profile bindings flow through terminal and s…
Out of Scope Changes check ✅ Passed The whole-PR summary ties the changes to profile creation, account authority, launch, persistence, recovery, validation, and tests. The earlier sendOutcomeLost localization relocation is absent from…
Title check ✅ Passed The title clearly summarizes the main change: named profiles for Claude and Codex.
Description check ✅ Passed The description covers the required sections, links issue #25065, includes visual proof, and explains the changes, rationale, testing, review, and known limitations. It also states that native manual …
Full details: Docstring Coverage

Explanation

Docstring coverage is 13.22% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 121 functions across 97 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
  • Autopilot · 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

Comment @coderabbitai help to get the list of available commands.

@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

🧹 Nitpick comments (1)
src/renderer/src/components/settings/AgentProfileForm.tsx (1)

114-125: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Compute newly added accounts from the latest state, not the render closure.

signIn compares result against accounts captured when signIn was created. This works for one sign-in per render. If a second sign-in completes before a re-render, accounts is stale and added can contain more than one account. The selection then falls back to an empty account. Snapshot the account IDs before you call signInProfileAccount.

Proposed fix
   const signIn = () =>
     run('login', async (current) => {
+      const before = new Set(accounts.map((account) => account.id))
       const result = await signInProfileAccount(agent)
       if (!current()) {
         return
       }
       setAccounts(result)
-      const added = result.filter(
-        (account) => !accounts.some((existing) => existing.id === account.id)
-      )
+      const added = result.filter((account) => !before.has(account.id))

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 10f6b7d8-5388-43e6-97ee-275231818c4b
📥 Commits

Reviewing files that changed from the base of the PR and between 752871b and 4244dc7.

📒 Files selected for processing (281)
  • config/scripts/ci-unit-files.mjs
  • src/main/agent-profile-discovery/README.md
  • src/main/agent-profile-discovery/command.test.ts
  • src/main/agent-profile-discovery/command.ts
  • src/main/agent-profile-discovery/existing-home.test.ts
  • src/main/agent-profile-discovery/existing-home.ts
  • src/main/agent-profile-discovery/literal-alias.test.ts
  • src/main/agent-profile-discovery/literal-alias.ts
  • src/main/agent-profiles/README.md
  • src/main/agent-profiles/account-removal.test.ts
  • src/main/agent-profiles/account-removal.ts
  • src/main/agent-profiles/connection-command.test.ts
  • src/main/agent-profiles/connection-contracts.ts
  • src/main/agent-profiles/connection-service.test.ts
  • src/main/agent-profiles/connection-service.ts
  • src/main/agent-profiles/host-discovery.test.ts
  • src/main/agent-profiles/host-discovery.ts
  • src/main/agent-profiles/launch-authority.ts
  • src/main/agent-profiles/managed-provider-bindings.ts
  • src/main/agent-profiles/preparation-error.ts
  • src/main/agent-profiles/profile-root-cwd.test.ts
  • src/main/agent-profiles/provider-adapters.ts
  • src/main/agent-profiles/runtime-composition.test.ts
  • src/main/agent-profiles/runtime-composition.ts
  • src/main/agent-profiles/snapshot-resolution.ts
  • src/main/agent-profiles/terminal-command.test.ts
  • src/main/agent-profiles/terminal-command.ts
  • src/main/claude-accounts/README.md
  • src/main/claude-accounts/account-credential-mutation.test.ts
  • src/main/claude-accounts/account-credential-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-add-account.test.ts
  • src/main/claude-accounts/claude-account-service-config-dir-capture.test.ts
  • src/main/claude-accounts/claude-account-service-credential-capture.test.ts
  • src/main/claude-accounts/claude-account-service-login-process.test.ts
  • src/main/claude-accounts/claude-account-service-reauth-rollback.test.ts
  • src/main/claude-accounts/claude-auth-capture.ts
  • src/main/claude-accounts/claude-managed-auth-storage.ts
  • src/main/claude-accounts/claude-profile-cli.test.ts
  • src/main/claude-accounts/claude-profile-cli.ts
  • src/main/claude-accounts/claude-profile-environment.ts
  • src/main/claude-accounts/claude-profile-shell.test.ts
  • src/main/claude-accounts/claude-structured-auth-policy.ts
  • src/main/claude-accounts/isolated-account-auth.test.ts
  • src/main/claude-accounts/isolated-account-auth.ts
  • src/main/claude-accounts/live-pty-gate.ts
  • src/main/claude-accounts/managed-auth-path.ts
  • src/main/claude-accounts/profile-identity.ts
  • src/main/claude-accounts/profile-launch-preflight.test.ts
  • src/main/claude-accounts/profile-launch-preflight.ts
  • src/main/claude-accounts/runtime-auth-service-profiles.test.ts
  • src/main/claude-accounts/runtime-auth-service-test-harness.ts
  • src/main/claude-accounts/runtime-auth-service.ts
  • src/main/claude-accounts/runtime-auth/runtime-auth-managed-credentials.ts
  • src/main/claude-accounts/runtime-auth/runtime-auth-preparation.ts
  • src/main/claude-accounts/runtime-auth/runtime-auth-state.ts
  • src/main/claude-accounts/runtime-auth/runtime-auth-sync.ts
  • src/main/claude-accounts/runtime-auth/runtime-auth-types.ts
  • src/main/claude/README.md
  • src/main/claude/claude-child-process-environment.test.ts
  • src/main/claude/claude-child-process-environment.ts
  • src/main/claude/claude-profile-resume-resolution.test.ts
  • src/main/claude/claude-stream-json-connection.ts
  • src/main/claude/claude-structured-acquisition-launch.ts
  • src/main/claude/claude-structured-launch-resolution.ts
  • src/main/claude/claude-structured-profile-acquisition.test.ts
  • src/main/claude/claude-structured-session-acquisition.ts
  • src/main/claude/claude-structured-session-adapter.test.ts
  • src/main/claude/claude-structured-session-state.ts
  • src/main/codex-accounts/README.md
  • src/main/codex-accounts/codex-account-registration.ts
  • src/main/codex-accounts/codex-account-selection.ts
  • src/main/codex-accounts/codex-account-service-types.ts
  • src/main/codex-accounts/independent-profile-home.ts
  • src/main/codex-accounts/managed-codex-auth-readiness.ts
  • src/main/codex-accounts/profile-config-authority.ts
  • src/main/codex-accounts/profile-launch-authority.real-cli.test.ts
  • src/main/codex-accounts/profile-launch-authority.test.ts
  • src/main/codex-accounts/profile-launch-authority.ts
  • src/main/codex-accounts/profile-launch-preflight.ts
  • src/main/codex-accounts/registration-independent.test.ts
  • src/main/codex-accounts/runtime-home-profile.test.ts
  • src/main/codex-accounts/runtime-home-service.ts
  • src/main/codex/README.md
  • src/main/codex/codex-app-server-session.test.ts
  • src/main/codex/codex-app-server-session.ts
  • src/main/codex/codex-pane-account-registry-mutations.ts
  • src/main/codex/codex-pane-account-registry-types.ts
  • src/main/codex/codex-pane-account-registry.ts
  • src/main/codex/codex-profile-account-owners.ts
  • src/main/codex/codex-structured-launch-resolution.ts
  • src/main/codex/codex-structured-session-acquire.ts
  • src/main/codex/codex-structured-session-adapter.test.ts
  • src/main/codex/codex-structured-session-state.ts
  • src/main/daemon/pty-subprocess/shell-launch-plan.ts
  • src/main/ipc/README.md
  • src/main/ipc/agent-profiles.test.ts
  • src/main/ipc/agent-profiles.ts
  • src/main/ipc/pty/host-env/README.md
  • src/main/ipc/pty/host-env/agent-profile-launch.ts
  • src/main/ipc/pty/host-env/agent-profile-ownership.ts
  • src/main/ipc/pty/host-env/claude-launch-auth.test.ts
  • src/main/ipc/pty/host-env/claude-launch-auth.ts
  • src/main/ipc/pty/host-env/codex-home.ts
  • src/main/ipc/pty/host-env/types.ts
  • src/main/ipc/pty/ipc/spawn-commit-persist.ts
  • src/main/ipc/pty/ipc/spawn-commit.ts
  • src/main/ipc/pty/ipc/spawn-env-codex.ts
  • src/main/ipc/pty/ipc/spawn-env.ts
  • src/main/ipc/pty/ipc/spawn-execute.ts
  • src/main/ipc/pty/ipc/spawn-options.ts
  • src/main/ipc/pty/ipc/spawn-preflight.ts
  • src/main/ipc/pty/ipc/spawn-run.ts
  • src/main/ipc/pty/ipc/spawn-state.ts
  • src/main/ipc/pty/ipc/spawn-types.ts
  • src/main/ipc/pty/profile-spawn.test.ts
  • src/main/ipc/pty/register-handlers.ts
  • src/main/ipc/pty/register-headless-runtime.ts
  • src/main/ipc/pty/runtime/README.md
  • src/main/ipc/pty/runtime/controller-deps.ts
  • src/main/ipc/pty/runtime/spawn-claude-auth.ts
  • src/main/ipc/pty/runtime/spawn-commit.ts
  • src/main/ipc/pty/runtime/spawn-early.ts
  • src/main/ipc/pty/runtime/spawn-execute.ts
  • src/main/ipc/pty/runtime/spawn-options.ts
  • src/main/ipc/pty/runtime/spawn-preflight.ts
  • src/main/ipc/pty/runtime/spawn-profile.ts
  • src/main/ipc/pty/runtime/spawn-state.ts
  • src/main/ipc/pty/runtime/spawn.ts
  • src/main/ipc/pty/session.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.ts
  • src/main/ipc/runtime-environment-transport-routing.ts
  • src/main/ipc/settings.test.ts
  • src/main/ipc/settings.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service.ts
  • src/main/native-chat/claude-structured-managed-account-support.ts
  • src/main/native-chat/structured-agent-session-create-support.test.ts
  • src/main/native-chat/structured-agent-session-create-support.ts
  • src/main/persistence/applying-settings/settings-update-agent-launch-profiles.test.ts
  • src/main/persistence/applying-settings/settings-update.ts
  • src/main/persistence/applying-settings/terminal-settings-migrations.ts
  • src/main/persistence/loading-store/normalize-loaded-global-settings.test.ts
  • src/main/persistence/loading-store/normalize-loaded-global-settings.ts
  • src/main/providers/local-pty-launch-plan.ts
  • src/main/providers/local-pty-provider-spawn-cwd-safety.test.ts
  • src/main/pty/codex-no-daemon-launch-command.test.ts
  • src/main/pty/codex-no-daemon-launch-command.ts
  • src/main/rate-limits/claude-cli-usage-fetch.ts
  • src/main/rate-limits/claude-managed-account-credentials.ts
  • src/main/rate-limits/claude-managed-account-usage.ts
  • src/main/runtime/README.md
  • src/main/runtime/agent-profile-terminal-binding.test.ts
  • src/main/runtime/agent-session-record-founding.ts
  • src/main/runtime/agent-session-reservation-admission.ts
  • src/main/runtime/orca-runtime-create-terminal-desktop.ts
  • src/main/runtime/orca-runtime-create-terminal.ts
  • src/main/runtime/orca-runtime-get-structured-agent-session-create-support.ts
  • src/main/runtime/orca-runtime-get-worktree-ps.ts
  • src/main/runtime/orca-runtime-restore-structured-agent-session-tabs-once.ts
  • src/main/runtime/orca-runtime-state-fields.ts
  • src/main/runtime/rpc/methods/README.md
  • src/main/runtime/rpc/methods/client-ui.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session-admission.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session-create.ts
  • src/main/runtime/rpc/methods/structured-agent-session-gate.ts
  • src/main/runtime/rpc/methods/structured-agent-session-profile-fingerprint.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session.ts
  • src/main/runtime/rpc/methods/terminal/terminal-lifecycle-methods.ts
  • src/main/runtime/runtime-agent-launch-resolution.ts
  • src/main/runtime/runtime-pty-controller-contract.ts
  • src/main/runtime/runtime-terminal-contracts.ts
  • src/main/runtime/structured-agent-profile-scripted-runtime.test.ts
  • src/main/runtime/structured-agent-profile.test.ts
  • src/main/runtime/structured-agent-profile.ts
  • src/main/runtime/structured-agent-session-create-adoption.ts
  • src/main/runtime/structured-agent-session-runtime.ts
  • src/main/runtime/structured-claude-runtime-adapter.ts
  • src/main/runtime/structured-claude-scripted-runtime-test-support.ts
  • src/main/startup/main-process-account-services.ts
  • src/main/startup/main-process-runtime-launch.ts
  • src/main/startup/main-process-runtime-service.ts
  • src/main/startup/main-process-state.ts
  • src/main/startup/main-window-core-services.ts
  • src/main/window/attach-main-window-services.ts
  • src/preload/api-types.ts
  • src/preload/api/README.md
  • src/preload/api/agent-account-api.ts
  • src/preload/api/agent-profiles-bridge.ts
  • src/preload/api/codex-accounts-bridge.ts
  • src/preload/api/pty-api.ts
  • src/preload/api/pty-bridge-session-control.ts
  • src/preload/api/ui-bridge-terminal-and-session-tabs.ts
  • src/preload/api/ui-command-event-api.ts
  • src/preload/index.ts
  • src/renderer/src/components/settings/AgentCatalogRow.tsx
  • src/renderer/src/components/settings/AgentLaunchProfiles.test.tsx
  • src/renderer/src/components/settings/AgentLaunchProfiles.tsx
  • src/renderer/src/components/settings/AgentProfileForm.tsx
  • src/renderer/src/components/settings/AgentsPane.tsx
  • src/renderer/src/components/settings/README.md
  • src/renderer/src/components/settings/agent-profile-accounts.ts
  • src/renderer/src/components/tab-bar/AgentProfileMenuItem.test.tsx
  • src/renderer/src/components/tab-bar/AgentProfileMenuItem.tsx
  • src/renderer/src/components/tab-bar/QuickLaunchButton.tsx
  • src/renderer/src/components/tab-bar/README.md
  • src/renderer/src/components/terminal-pane/ipc-pty-spawn-request.ts
  • src/renderer/src/components/terminal-pane/pty-connection-cold-restore-agent-resume.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-runtime-owner-spawn-routing.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection-types.ts
  • src/renderer/src/components/terminal-pane/pty-connection/cold-restore-resume-startup.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pty-input-recovery.ts
  • src/renderer/src/components/terminal-pane/pty-transport-types.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport-create-handoff.test.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.ts
  • src/renderer/src/hooks/README.md
  • src/renderer/src/hooks/ipc-events-terminal-create-scenario-types.ts
  • src/renderer/src/hooks/ipc-events-terminal-create-test-harness.ts
  • src/renderer/src/hooks/ipc-events-terminal-create-window-test-fixtures.ts
  • src/renderer/src/hooks/ipc-events/terminal-presentation-ipc-bridge.ts
  • src/renderer/src/hooks/ipc-events/terminal-request-ipc-bridge.ts
  • src/renderer/src/hooks/useIpcEvents-agent-profile-transport.test.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/README.md
  • src/renderer/src/lib/agent-profile-structured-identity.test.ts
  • src/renderer/src/lib/agent-profile-workspace-selection.ts
  • src/renderer/src/lib/agent-session-launch-plan.ts
  • src/renderer/src/lib/launch-agent-in-new-tab-host-resolution.test.ts
  • src/renderer/src/lib/launch-agent-in-new-tab.ts
  • src/renderer/src/lib/launch-structured-agent-session.ts
  • src/renderer/src/lib/sleeping-agent-session-launch.ts
  • src/renderer/src/lib/structured-agent-launch-cancel.ts
  • src/renderer/src/lib/structured-agent-launch-identity.ts
  • src/renderer/src/lib/structured-agent-session-host-admission.ts
  • src/renderer/src/lib/structured-agent-session-launch-callers.ts
  • src/renderer/src/lib/structured-agent-session-launch-persistence.ts
  • src/renderer/src/lib/structured-agent-session-launch-registry.ts
  • src/renderer/src/lib/structured-agent-session-launch-reload.ts
  • src/renderer/src/lib/structured-agent-session-launch-resume-identity.test.ts
  • src/renderer/src/lib/structured-agent-session-launch-status.ts
  • src/renderer/src/lib/structured-agent-session-launch.test.ts
  • src/renderer/src/lib/structured-agent-session-launch.ts
  • src/renderer/src/lib/structured-agent-session-provisional-tab.ts
  • src/renderer/src/runtime/runtime-rpc-client.ts
  • src/renderer/src/store/slices/README.md
  • src/renderer/src/store/slices/agent-status-recovery-equivalence.ts
  • src/renderer/src/store/slices/agent-status-sleeping-records.ts
  • src/renderer/src/store/terminals/terminal-actions.ts
  • src/renderer/src/store/terminals/terminal-state.ts
  • src/shared/README.md
  • src/shared/agent-launch-profile-name.ts
  • src/shared/agent-launch-profile.test.ts
  • src/shared/agent-launch-profile.ts
  • src/shared/agent-profile-capabilities.ts
  • src/shared/agent-profile-connection.ts
  • src/shared/agent-session-account-home.ts
  • src/shared/agent-session-record.ts
  • src/shared/agent-session-resume.ts
  • src/shared/global-settings-types.ts
  • src/shared/rpc-contract/structured-agent-session-params.ts
  • src/shared/rpc-contract/terminal-unary-params.ts
  • src/shared/runtime-terminal-contracts.ts
  • src/shared/sleeping-agent-launch-config-types.ts
  • src/shared/sleeping-agent-launch-config.ts
  • src/shared/structured-agent-session-create.ts
  • src/shared/structured-agent-session-mutation.ts
  • src/shared/terminal-profile-routing.ts
  • src/shared/tui-agent-resume-startup.ts
  • src/shared/tui-agent-startup.ts
  • src/shared/workspace-session-sleeping-agents.ts
  • src/shared/worktree/launch-types.ts
  • tests/e2e/README.md
  • tests/e2e/agent-launch-profiles.spec.ts
  • tests/e2e/agent-profile-settings-sync.unit.test.tsx
  • tests/e2e/fixtures/profile-agent.cjs
  • tests/e2e/helpers/agent-profile-fixture.ts
  • tests/e2e/sleeping-agent-profile-recovery.unit.test.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.

@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

Two gaps in the new launch paths are worth addressing before merge: external Claude profiles pinned at the CLI's default ~/.claude home emit CLAUDE_CONFIG_DIR and (on macOS) land on a different Keychain item; and managed Codex authority does not reject forced_chatgpt_workspace_id. A third, minor gap in the new Claude command pin is inline too.

Reviewed changes

  • Host-owned profile model (src/shared/agent-launch-profile.ts, agent-profile-connection.ts, agent-session-account-home.ts): a {managed,accountId} / {external,home} binding with frozen snapshots, bounded-name validation, and an immutable durable account home that refuses unverified identities for resume.
  • Connection/discovery (src/main/agent-profile-discovery/, src/main/agent-profiles/): literal-only alias parsing, realpath-canonicalized external homes, executable detection, and a serialized preview/save/unlink service.
  • Claude profile plumbing (src/main/claude-accounts/): isolated-auth marker + scoped Keychain, canonical identity verification, settings/policy preflight, and command pinning.
  • Codex profile plumbing (src/main/codex-accounts/): static config.toml scan, app-server effective-config/layer/requirements/account probe, and owned-home re-checks around spawn.
  • Terminal + structured integration (src/main/ipc/pty/**, src/main/runtime/**): profile preparation before launch planning, ownership commits, structured-session snapshot admission/resume, and paired-client refusal for profile ids.
  • Renderer + preload (src/renderer/src/**, src/preload/**): settings profile form/list, tab-bar menu, launch routing, and the preload bridge.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@dlgochan

dlgochan commented Oct 3, 2026

Copy link
Copy Markdown
Author

Regarding the sign-in selection suggestion in the CodeRabbit review: The proposed Set reads the same captured immutable accounts array, so it does not change freshness. run() already synchronously guards duplicate requests with operation.current.pending. Added mounted Claude/Codex tests proving same-render clicks start one enrollment and sequential A then A+B results select B, while existing cancellation/revision coverage remains passing. Kept the production code unchanged.

The new regressions are included in aa7334f. The four inline findings are addressed and replied to in their threads. Scoped validation: 135 tests passed, then 49 targeted tests passed after an additional canonical-path regression; final Node types, changed quality and relevant gates pass. Native Windows and authenticated macOS Keychain behavior remain outside this synthetic validation.

@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. The three prior findings are addressed at aa7334f1 and the incremental changes hold up.

Reviewed changes

The delta since the prior pullfrog review (4244dc7c → aa7334f1, 15 files) is a focused fix commit:

  • External Claude default home keeps default credential semantics — connection-service.ts now compares the resolved home against the canonical ~/.claude (via validateExternalProfileHome) and, on a match, routes through claudeConfigDirEnvPatch, yielding envPatch: { HOME: host.home } with envToDelete: ['CLAUDE_CONFIG_DIR']; custom homes and Codex stay explicitly pinned.
  • Every patched key is now override-proof — assertAgentProfileEnvironment folds Object.keys(envPatch) into its forbidden set, so a launch HOME override on a default-home profile is refused.
  • Codex forced_chatgpt_workspace_id is refused — rejected in the effective config, active original layers, assertRequirements (both field spellings), and the static TOML structured-key scan, matching the verified workspace identity subject.
  • Claude command pin gains the CR/LF/NUL guard — pinClaudeProfileTerminalCommand now rejects /[\r\n\0]/ before probing and before re-emitting the raw suffix.
  • Tests hardened — POSIX-only symlink/permission cases gained skipIf(win32) guards; added managed Codex same-account token-rotation coverage, renderer sign-in coalescing, and per-control-character pin tests.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Preserve profile launch bindings while integrating OpenCode startup prompt
ownership and wrapped run-command arguments. Keep both English catalog sections.

@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

The delta since the prior pullfrog review (aa7334f1 → c05f42b0) is a single upstream-integration merge (Merge main into feat/agent-profiles); the net PR-side change is the conflict resolution — upstream main is now the base, so its changes sit outside the PR diff.

  • OpenCode startup-prompt integration keeps profile binding — src/shared/tui-agent-startup.ts routes the flag-prompt mode through upstream's buildFlagPromptStartupPlan and re-attaches agentProfileId on top of the returned plan, so profile ownership survives the integration.
  • Spawn path combines OpenCode launch with profile command prep — src/main/ipc/pty/runtime/spawn-options.ts runs upstream's prepareOpenCodePtyLaunch before the PR's prepareRuntimeProfileCommand, keeping codex --no-daemon planning and profile env binding after the OpenCode command/env rewrite.
  • English catalog keeps both sections — upstream additions (fileSearch.failed, notification and CSV keys) coexist with the profile messages; the file parses as JSON.
  • Prior findings untouched — the external default-home CLAUDE_CONFIG_DIR route, the Codex forced_chatgpt_workspace_id refusal, and the Claude CR/LF/NUL pin guard are not modified by the merge.

Verified locally: en.json parses; src/shared/tui-agent-startup.test.ts and src/shared/opencode-startup-prompt.test.ts pass (75 tests). The three prior pullfrog threads are resolved, so no additional retire actions were needed.

Pullfrog  | View workflow run | Using deepseek-v4.1-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: 2


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 682f1fe7-a5ef-4fe9-8c76-e93ba71681fc
📥 Commits

Reviewing files that changed from the base of the PR and between aa7334f and c05f42b.

📒 Files selected for processing (9)
  • src/main/codex/codex-structured-session-adapter.test.ts
  • src/main/ipc/pty/ipc/spawn-commit.ts
  • src/main/ipc/pty/ipc/spawn-options.ts
  • src/main/ipc/pty/runtime/spawn-commit.ts
  • src/main/ipc/pty/runtime/spawn-options.ts
  • src/main/window/attach-main-window-services.ts
  • src/renderer/src/components/terminal-pane/pty-connection-types.ts
  • src/renderer/src/i18n/locales/en.json
  • src/shared/tui-agent-startup.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • 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/main/ipc/pty/ipc/spawn-commit.ts Resolved
Track canonical shared external homes through the existing pending and live ownership gate. Preserve managed isolation and ordinary prelaunch refresh, and release deferred ownership on cancellation or exit.

Cover both terminal pipelines, home aliases, refresh recovery, reattach and adoption, and early exit. Synthetic Docker suite: 217 tests passed; node types, changed code quality, formatting, and repository gates passed.
Interpret inherited relative runtime homes against process cwd before canonical validation, preserving symlink traversal before parent segments. Keep the shared resolver and external absolute-input validator unchanged.

Synthetic Docker regressions verify pending and live refresh deferral, refresh after exit, and independent homes. Five affected test files pass 79 tests; changed type-aware quality and formatting checks pass.

@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

The delta since the prior pullfrog review (c05f42b0 → 036ed8bc, 13 files, 2 commits) is a focused fix that brings external Claude profiles bound to the canonical runtime-auth home into the existing live/refresh gate and cleans up how profile PTYs are marked.

  • External shared-home profiles reserve pending ownership — prepareTerminalProfileLaunch now calls reserveAgentProfilePtyOwnership, which takes a reserveClaudeCredentialOwner(false, { deferRuntimeRefresh: true }) lease when a Claude external profile's realpath'd resolvedHome equals ClaudeRuntimePathResolver().getRuntimePaths().configDir; independent external homes and managed Claude are handled separately.
  • Pending ownership transfers into the live gate — commitAgentProfilePtyOwnership marks Claude live only when claudeCredentialIsolation is defined, and now skips reattaches, exits before the spawn reply, and adopted processes, so an adopted process is not attributed to a newly prepared profile.
  • Refresh gate understands pending owners — live-pty-gate.ts stores { isolated, deferRuntimeRefresh }, adds shouldDeferClaudeRuntimeRefresh(), and fires the drain notification off hasClaudeCredentialOwners(); runtime-auth-sync.ts uses the new predicate so a pending shared external lease defers the managed refresh.
  • Spawn-commit marking simplified — profile launches are marked in commit and the non-profile branch is now gated on !ctx.agentProfile, removing the previous double-mark for managed profiles.
  • Regressions added — desktop and runtime shared/independent-home ownership, provider refusal, early exit, reattach, adoption, cancellation, and default/alias/relative home resolution are covered.

Verified locally: the three affected suites pass (61/61 tests) and pnpm tc:node passes. The three prior pullfrog findings (aa7334f1) remain addressed and their threads resolved, so no retire actions were needed.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Retain upstream cold-listing joins and waitForListing signaling while keeping profile-bound catalogs populated by their owning sessions. Cover both waiting and non-waiting profile reads.

Validation: 462 focused Docker tests, Node and web types, changed-code quality, localization union and runtime/RPC ratchets pass.

@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

The delta since the prior pullfrog review (036ed8bc → 10eb079, one upstream-integration merge) is a conflict resolution plus the upstream main changes that now sit in the base. git show --remerge-diff confirms the merge's only PR-authored content is the model-catalog service and its test.

  • Profile authority preserved through the upstream catalog join — src/main/native-chat/agent-model-catalog/agent-model-catalog-service.ts now keeps upstream's cold-listing waitForListing / listingInProgress / hasActiveFailure behavior and the PR's scoped?.accountHome.agentProfile ? undefined : deps.probes?.[params.agent] gate in the same listing expression, so a bound session's catalog is still populated only by its owning live child and never by the session-less probe.
  • Regression covers both read shapes — agent-model-catalog-service.test.ts turns the profile test into it.each([false, true]), asserting a profile-bound read answers unknown for both waiting and non-waiting reads, never calls the probe or resolveAccountHome, then answers from the recorded live listing and lets a session-less read probe the selected home.

Verified locally: agent-model-catalog-service.test.ts passes (17/17). The three prior pullfrog findings remain addressed and their threads are resolved, so no retire actions were needed.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@dlgochan

dlgochan commented Oct 5, 2026

Copy link
Copy Markdown
Author

Follow-up on the architecture and localization notes in the summary, now checked through 4b10ab6e:

The managed Codex environment-retention premise does not match the composed execution path. The empty callback deletion list is combined with the Codex adapter’s API-key and routing list in AgentProfileConnectionService.prepare. Both terminal paths apply that final list through /usr/bin/env -u after shell startup and launch planning. Structured execution filters the same list and deletes it again after the final process-environment merge. Explicit managed overrides are rejected; external profiles retain their separate unverified behavior.

Added a synthetic regression using the real Codex adapter and preparation service followed by an actual shell/child: startup-exported OPENAI_API_KEY, CODEX_API_KEY and OPENAI_BASE_URL are absent for the managed profile; pinned home and an unrelated sentinel remain. External Codex retains the sentinels. This proves the tested environment handoff, not provider-specific auth precedence or native authenticated behavior. Existing post-preflight file/config mutation and already-in-flight refresh limitations remain disclosed.

The merged en-runtime-required.json is byte-identical to upstream 40f9e7a3 (blob cc4ab94202a55bb40e0c21fc920522f9dd511240). The sendOutcomeLost relocation is upstream-owned; no profile-only relocation remains. Docstrings remain guided by repository conventions rather than padding functions to meet the advisory percentage.

Integration validation: 534/534 tests, then 84/84 affected tests and final 5/5 UI recheck (overlapping counts); final Node/web types, exact-target quality and repository gates passed. Independent scoped review approved all eight conflict resolutions and twenty automatic overlaps. No native-account testing is claimed.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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: 45acc172-58ac-446f-96bb-06d903aef918
📥 Commits

Reviewing files that changed from the base of the PR and between 10eb079 and 4b10ab6.

📒 Files selected for processing (28)
  • src/main/agent-profiles/connection-service.test.ts
  • src/main/ipc/pty/host-env/types.ts
  • src/main/ipc/pty/ipc/spawn-commit-persist.ts
  • src/main/ipc/pty/ipc/spawn-env-codex.ts
  • src/main/ipc/pty/ipc/spawn-execute.ts
  • src/main/ipc/pty/ipc/spawn-run.ts
  • src/main/ipc/pty/ipc/spawn-state.ts
  • src/main/ipc/pty/profile-spawn.test.ts
  • src/main/runtime/orca-runtime-create-terminal.ts
  • src/main/runtime/rpc/methods/client-ui.test.ts
  • src/main/runtime/runtime-terminal-contracts.ts
  • src/renderer/src/components/tab-bar/QuickLaunchButton.launch-status.test.tsx
  • src/renderer/src/components/tab-bar/QuickLaunchButton.tsx
  • src/renderer/src/components/terminal-pane/ipc-pty-spawn-request.ts
  • src/renderer/src/components/terminal-pane/pty-transport-types.ts
  • src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/agent-session-launch-plan.ts
  • src/renderer/src/lib/launch-agent-in-new-tab-host-resolution.test.ts
  • src/renderer/src/lib/launch-agent-in-new-tab.ts
  • src/renderer/src/lib/structured-agent-session-launch-callers.ts
  • src/renderer/src/lib/structured-agent-session-launch-registry.ts
  • src/renderer/src/lib/structured-agent-session-launch-reload.ts
  • src/renderer/src/lib/structured-agent-session-launch-resume-identity.test.ts
  • src/renderer/src/lib/structured-agent-session-launch-status.ts
  • src/renderer/src/lib/structured-agent-session-launch.test.ts
  • src/renderer/src/lib/structured-agent-session-launch.ts
  • src/renderer/src/lib/structured-agent-session-provisional-tab.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • 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/main/ipc/pty/profile-spawn.test.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 issues found.

Reviewed changes

The delta since the prior pullfrog review (10eb079a → 4b10ab6e, one upstream-integration merge) is the conflict resolution that folds upstream's per-action requestId launch model into the PR's profile ownership. git show --remerge-diff confirms the merge's only PR-authored content is the resolutions below plus their tests; upstream main 40f9e7a3 now sits in the base and outside the PR diff.

  • Codex resume keeps both behaviors — spawn-env-codex.ts retains the PR's preAdoptedStablePane || profileAttachOnly || agentProfile ? null : prepareCodexResumeHome(...) guard and adds upstream's ...(args.replacesPtyId ? { useSelectedAccount: true } : {}), so profile launches still skip selected-home preparation while an ordinary resume keeps the account switch.
  • Quick-launch menu merges profile and request gating — QuickLaunchButton.tsx drops the per-agent pending spinner (generic rows gate only on the disabled prop) while profile rows stay gated by disabled || (managed && !account) plus their own per-profile status; runLaunch mints a fresh requestId per pick and still forwards agentProfileId.
  • Profile-aware launch status — structured-agent-session-launch-status.ts splits into getStructuredAgentLaunchStatus (profile keying, resume-prefix matching only for non-profiles) and a correctly three-argument useStructuredAgentLaunchStatus, fixing the prior bogus extra useSyncExternalStore argument.
  • Structured launch uses the upstream join — structured-agent-session-launch.ts keeps the assertStructuredAgentProfileWorkspace precheck, then delegates to getJoinableStructuredLaunchState / joinStructuredLaunchState; identities, reload, and launch-plan wiring thread both agentProfile and the required requestId.
  • launch-agent-in-new-tab request/plan union — plan selection now distinguishes a missing requestId with no profile (reuse the preflighted plan) from a profile launch, borrowing the preflighted plan's requestId; the union makes the fallback agentSessionLaunchPlan.requestId non-optional at that point.
  • Regressions updated — resume-identity now covers a second action opening its own chat, QuickLaunchButton covers independent per-profile pending rows and per-pick request IDs, and profile-spawn/connection-service cover the useSelectedAccount and managed-Codex deletion composition.

Verified locally on the checked-out head: renderer launch suites (structured-agent-session-launch, resume-identity, QuickLaunchButton.launch-status, host-resolution, agent-profile-structured-identity) and main-process suites (profile-spawn, connection-service) pass (122 tests), and no conflict markers remain. All prior pullfrog threads are resolved, so no retire actions were needed.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@dlgochan

Copy link
Copy Markdown
Author

Closing this; I'm not planning to continue it. The broader request stays tracked in #2284.

@dlgochan dlgochan closed this Nov 11, 2026
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]: Named Claude and Codex account profiles

2 participants