Repository navigation
Conversation
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.
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis 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 Production behavior is unaffected; add a Windows skip to the symlink-based profile spawn tests so Windows CI does not fail. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to 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 Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation 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.)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/renderer/src/components/settings/AgentProfileForm.tsx (1)
114-125: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueCompute newly added accounts from the latest state, not the render closure.
signIncomparesresultagainstaccountscaptured whensignInwas created. This works for one sign-in per render. If a second sign-in completes before a re-render,accountsis stale andaddedcan contain more than one account. The selection then falls back to an empty account. Snapshot the account IDs before you callsignInProfileAccount.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
📒 Files selected for processing (281)
config/scripts/ci-unit-files.mjssrc/main/agent-profile-discovery/README.mdsrc/main/agent-profile-discovery/command.test.tssrc/main/agent-profile-discovery/command.tssrc/main/agent-profile-discovery/existing-home.test.tssrc/main/agent-profile-discovery/existing-home.tssrc/main/agent-profile-discovery/literal-alias.test.tssrc/main/agent-profile-discovery/literal-alias.tssrc/main/agent-profiles/README.mdsrc/main/agent-profiles/account-removal.test.tssrc/main/agent-profiles/account-removal.tssrc/main/agent-profiles/connection-command.test.tssrc/main/agent-profiles/connection-contracts.tssrc/main/agent-profiles/connection-service.test.tssrc/main/agent-profiles/connection-service.tssrc/main/agent-profiles/host-discovery.test.tssrc/main/agent-profiles/host-discovery.tssrc/main/agent-profiles/launch-authority.tssrc/main/agent-profiles/managed-provider-bindings.tssrc/main/agent-profiles/preparation-error.tssrc/main/agent-profiles/profile-root-cwd.test.tssrc/main/agent-profiles/provider-adapters.tssrc/main/agent-profiles/runtime-composition.test.tssrc/main/agent-profiles/runtime-composition.tssrc/main/agent-profiles/snapshot-resolution.tssrc/main/agent-profiles/terminal-command.test.tssrc/main/agent-profiles/terminal-command.tssrc/main/claude-accounts/README.mdsrc/main/claude-accounts/account-credential-mutation.test.tssrc/main/claude-accounts/account-credential-mutation.tssrc/main/claude-accounts/claude-account-registration.tssrc/main/claude-accounts/claude-account-selection.tssrc/main/claude-accounts/claude-account-service-account-selection.test.tssrc/main/claude-accounts/claude-account-service-add-account.test.tssrc/main/claude-accounts/claude-account-service-config-dir-capture.test.tssrc/main/claude-accounts/claude-account-service-credential-capture.test.tssrc/main/claude-accounts/claude-account-service-login-process.test.tssrc/main/claude-accounts/claude-account-service-reauth-rollback.test.tssrc/main/claude-accounts/claude-auth-capture.tssrc/main/claude-accounts/claude-managed-auth-storage.tssrc/main/claude-accounts/claude-profile-cli.test.tssrc/main/claude-accounts/claude-profile-cli.tssrc/main/claude-accounts/claude-profile-environment.tssrc/main/claude-accounts/claude-profile-shell.test.tssrc/main/claude-accounts/claude-structured-auth-policy.tssrc/main/claude-accounts/isolated-account-auth.test.tssrc/main/claude-accounts/isolated-account-auth.tssrc/main/claude-accounts/live-pty-gate.tssrc/main/claude-accounts/managed-auth-path.tssrc/main/claude-accounts/profile-identity.tssrc/main/claude-accounts/profile-launch-preflight.test.tssrc/main/claude-accounts/profile-launch-preflight.tssrc/main/claude-accounts/runtime-auth-service-profiles.test.tssrc/main/claude-accounts/runtime-auth-service-test-harness.tssrc/main/claude-accounts/runtime-auth-service.tssrc/main/claude-accounts/runtime-auth/runtime-auth-managed-credentials.tssrc/main/claude-accounts/runtime-auth/runtime-auth-preparation.tssrc/main/claude-accounts/runtime-auth/runtime-auth-state.tssrc/main/claude-accounts/runtime-auth/runtime-auth-sync.tssrc/main/claude-accounts/runtime-auth/runtime-auth-types.tssrc/main/claude/README.mdsrc/main/claude/claude-child-process-environment.test.tssrc/main/claude/claude-child-process-environment.tssrc/main/claude/claude-profile-resume-resolution.test.tssrc/main/claude/claude-stream-json-connection.tssrc/main/claude/claude-structured-acquisition-launch.tssrc/main/claude/claude-structured-launch-resolution.tssrc/main/claude/claude-structured-profile-acquisition.test.tssrc/main/claude/claude-structured-session-acquisition.tssrc/main/claude/claude-structured-session-adapter.test.tssrc/main/claude/claude-structured-session-state.tssrc/main/codex-accounts/README.mdsrc/main/codex-accounts/codex-account-registration.tssrc/main/codex-accounts/codex-account-selection.tssrc/main/codex-accounts/codex-account-service-types.tssrc/main/codex-accounts/independent-profile-home.tssrc/main/codex-accounts/managed-codex-auth-readiness.tssrc/main/codex-accounts/profile-config-authority.tssrc/main/codex-accounts/profile-launch-authority.real-cli.test.tssrc/main/codex-accounts/profile-launch-authority.test.tssrc/main/codex-accounts/profile-launch-authority.tssrc/main/codex-accounts/profile-launch-preflight.tssrc/main/codex-accounts/registration-independent.test.tssrc/main/codex-accounts/runtime-home-profile.test.tssrc/main/codex-accounts/runtime-home-service.tssrc/main/codex/README.mdsrc/main/codex/codex-app-server-session.test.tssrc/main/codex/codex-app-server-session.tssrc/main/codex/codex-pane-account-registry-mutations.tssrc/main/codex/codex-pane-account-registry-types.tssrc/main/codex/codex-pane-account-registry.tssrc/main/codex/codex-profile-account-owners.tssrc/main/codex/codex-structured-launch-resolution.tssrc/main/codex/codex-structured-session-acquire.tssrc/main/codex/codex-structured-session-adapter.test.tssrc/main/codex/codex-structured-session-state.tssrc/main/daemon/pty-subprocess/shell-launch-plan.tssrc/main/ipc/README.mdsrc/main/ipc/agent-profiles.test.tssrc/main/ipc/agent-profiles.tssrc/main/ipc/pty/host-env/README.mdsrc/main/ipc/pty/host-env/agent-profile-launch.tssrc/main/ipc/pty/host-env/agent-profile-ownership.tssrc/main/ipc/pty/host-env/claude-launch-auth.test.tssrc/main/ipc/pty/host-env/claude-launch-auth.tssrc/main/ipc/pty/host-env/codex-home.tssrc/main/ipc/pty/host-env/types.tssrc/main/ipc/pty/ipc/spawn-commit-persist.tssrc/main/ipc/pty/ipc/spawn-commit.tssrc/main/ipc/pty/ipc/spawn-env-codex.tssrc/main/ipc/pty/ipc/spawn-env.tssrc/main/ipc/pty/ipc/spawn-execute.tssrc/main/ipc/pty/ipc/spawn-options.tssrc/main/ipc/pty/ipc/spawn-preflight.tssrc/main/ipc/pty/ipc/spawn-run.tssrc/main/ipc/pty/ipc/spawn-state.tssrc/main/ipc/pty/ipc/spawn-types.tssrc/main/ipc/pty/profile-spawn.test.tssrc/main/ipc/pty/register-handlers.tssrc/main/ipc/pty/register-headless-runtime.tssrc/main/ipc/pty/runtime/README.mdsrc/main/ipc/pty/runtime/controller-deps.tssrc/main/ipc/pty/runtime/spawn-claude-auth.tssrc/main/ipc/pty/runtime/spawn-commit.tssrc/main/ipc/pty/runtime/spawn-early.tssrc/main/ipc/pty/runtime/spawn-execute.tssrc/main/ipc/pty/runtime/spawn-options.tssrc/main/ipc/pty/runtime/spawn-preflight.tssrc/main/ipc/pty/runtime/spawn-profile.tssrc/main/ipc/pty/runtime/spawn-state.tssrc/main/ipc/pty/runtime/spawn.tssrc/main/ipc/pty/session.tssrc/main/ipc/register-core-handlers/register-core-handlers.tssrc/main/ipc/runtime-environment-transport-routing.tssrc/main/ipc/settings.test.tssrc/main/ipc/settings.tssrc/main/native-chat/agent-model-catalog/agent-model-catalog-service.test.tssrc/main/native-chat/agent-model-catalog/agent-model-catalog-service.tssrc/main/native-chat/claude-structured-managed-account-support.tssrc/main/native-chat/structured-agent-session-create-support.test.tssrc/main/native-chat/structured-agent-session-create-support.tssrc/main/persistence/applying-settings/settings-update-agent-launch-profiles.test.tssrc/main/persistence/applying-settings/settings-update.tssrc/main/persistence/applying-settings/terminal-settings-migrations.tssrc/main/persistence/loading-store/normalize-loaded-global-settings.test.tssrc/main/persistence/loading-store/normalize-loaded-global-settings.tssrc/main/providers/local-pty-launch-plan.tssrc/main/providers/local-pty-provider-spawn-cwd-safety.test.tssrc/main/pty/codex-no-daemon-launch-command.test.tssrc/main/pty/codex-no-daemon-launch-command.tssrc/main/rate-limits/claude-cli-usage-fetch.tssrc/main/rate-limits/claude-managed-account-credentials.tssrc/main/rate-limits/claude-managed-account-usage.tssrc/main/runtime/README.mdsrc/main/runtime/agent-profile-terminal-binding.test.tssrc/main/runtime/agent-session-record-founding.tssrc/main/runtime/agent-session-reservation-admission.tssrc/main/runtime/orca-runtime-create-terminal-desktop.tssrc/main/runtime/orca-runtime-create-terminal.tssrc/main/runtime/orca-runtime-get-structured-agent-session-create-support.tssrc/main/runtime/orca-runtime-get-worktree-ps.tssrc/main/runtime/orca-runtime-restore-structured-agent-session-tabs-once.tssrc/main/runtime/orca-runtime-state-fields.tssrc/main/runtime/rpc/methods/README.mdsrc/main/runtime/rpc/methods/client-ui.test.tssrc/main/runtime/rpc/methods/structured-agent-session-admission.test.tssrc/main/runtime/rpc/methods/structured-agent-session-create.tssrc/main/runtime/rpc/methods/structured-agent-session-gate.tssrc/main/runtime/rpc/methods/structured-agent-session-profile-fingerprint.test.tssrc/main/runtime/rpc/methods/structured-agent-session.test.tssrc/main/runtime/rpc/methods/structured-agent-session.tssrc/main/runtime/rpc/methods/terminal/terminal-lifecycle-methods.tssrc/main/runtime/runtime-agent-launch-resolution.tssrc/main/runtime/runtime-pty-controller-contract.tssrc/main/runtime/runtime-terminal-contracts.tssrc/main/runtime/structured-agent-profile-scripted-runtime.test.tssrc/main/runtime/structured-agent-profile.test.tssrc/main/runtime/structured-agent-profile.tssrc/main/runtime/structured-agent-session-create-adoption.tssrc/main/runtime/structured-agent-session-runtime.tssrc/main/runtime/structured-claude-runtime-adapter.tssrc/main/runtime/structured-claude-scripted-runtime-test-support.tssrc/main/startup/main-process-account-services.tssrc/main/startup/main-process-runtime-launch.tssrc/main/startup/main-process-runtime-service.tssrc/main/startup/main-process-state.tssrc/main/startup/main-window-core-services.tssrc/main/window/attach-main-window-services.tssrc/preload/api-types.tssrc/preload/api/README.mdsrc/preload/api/agent-account-api.tssrc/preload/api/agent-profiles-bridge.tssrc/preload/api/codex-accounts-bridge.tssrc/preload/api/pty-api.tssrc/preload/api/pty-bridge-session-control.tssrc/preload/api/ui-bridge-terminal-and-session-tabs.tssrc/preload/api/ui-command-event-api.tssrc/preload/index.tssrc/renderer/src/components/settings/AgentCatalogRow.tsxsrc/renderer/src/components/settings/AgentLaunchProfiles.test.tsxsrc/renderer/src/components/settings/AgentLaunchProfiles.tsxsrc/renderer/src/components/settings/AgentProfileForm.tsxsrc/renderer/src/components/settings/AgentsPane.tsxsrc/renderer/src/components/settings/README.mdsrc/renderer/src/components/settings/agent-profile-accounts.tssrc/renderer/src/components/tab-bar/AgentProfileMenuItem.test.tsxsrc/renderer/src/components/tab-bar/AgentProfileMenuItem.tsxsrc/renderer/src/components/tab-bar/QuickLaunchButton.tsxsrc/renderer/src/components/tab-bar/README.mdsrc/renderer/src/components/terminal-pane/ipc-pty-spawn-request.tssrc/renderer/src/components/terminal-pane/pty-connection-cold-restore-agent-resume.test.tssrc/renderer/src/components/terminal-pane/pty-connection-runtime-owner-spawn-routing.test.tssrc/renderer/src/components/terminal-pane/pty-connection-types.tssrc/renderer/src/components/terminal-pane/pty-connection/cold-restore-resume-startup.tssrc/renderer/src/components/terminal-pane/pty-connection/pty-input-recovery.tssrc/renderer/src/components/terminal-pane/pty-transport-types.tssrc/renderer/src/components/terminal-pane/remote-runtime-pty-transport-create-handoff.test.tssrc/renderer/src/components/terminal-pane/remote-runtime-pty-transport.tssrc/renderer/src/hooks/README.mdsrc/renderer/src/hooks/ipc-events-terminal-create-scenario-types.tssrc/renderer/src/hooks/ipc-events-terminal-create-test-harness.tssrc/renderer/src/hooks/ipc-events-terminal-create-window-test-fixtures.tssrc/renderer/src/hooks/ipc-events/terminal-presentation-ipc-bridge.tssrc/renderer/src/hooks/ipc-events/terminal-request-ipc-bridge.tssrc/renderer/src/hooks/useIpcEvents-agent-profile-transport.test.tssrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/README.mdsrc/renderer/src/lib/agent-profile-structured-identity.test.tssrc/renderer/src/lib/agent-profile-workspace-selection.tssrc/renderer/src/lib/agent-session-launch-plan.tssrc/renderer/src/lib/launch-agent-in-new-tab-host-resolution.test.tssrc/renderer/src/lib/launch-agent-in-new-tab.tssrc/renderer/src/lib/launch-structured-agent-session.tssrc/renderer/src/lib/sleeping-agent-session-launch.tssrc/renderer/src/lib/structured-agent-launch-cancel.tssrc/renderer/src/lib/structured-agent-launch-identity.tssrc/renderer/src/lib/structured-agent-session-host-admission.tssrc/renderer/src/lib/structured-agent-session-launch-callers.tssrc/renderer/src/lib/structured-agent-session-launch-persistence.tssrc/renderer/src/lib/structured-agent-session-launch-registry.tssrc/renderer/src/lib/structured-agent-session-launch-reload.tssrc/renderer/src/lib/structured-agent-session-launch-resume-identity.test.tssrc/renderer/src/lib/structured-agent-session-launch-status.tssrc/renderer/src/lib/structured-agent-session-launch.test.tssrc/renderer/src/lib/structured-agent-session-launch.tssrc/renderer/src/lib/structured-agent-session-provisional-tab.tssrc/renderer/src/runtime/runtime-rpc-client.tssrc/renderer/src/store/slices/README.mdsrc/renderer/src/store/slices/agent-status-recovery-equivalence.tssrc/renderer/src/store/slices/agent-status-sleeping-records.tssrc/renderer/src/store/terminals/terminal-actions.tssrc/renderer/src/store/terminals/terminal-state.tssrc/shared/README.mdsrc/shared/agent-launch-profile-name.tssrc/shared/agent-launch-profile.test.tssrc/shared/agent-launch-profile.tssrc/shared/agent-profile-capabilities.tssrc/shared/agent-profile-connection.tssrc/shared/agent-session-account-home.tssrc/shared/agent-session-record.tssrc/shared/agent-session-resume.tssrc/shared/global-settings-types.tssrc/shared/rpc-contract/structured-agent-session-params.tssrc/shared/rpc-contract/terminal-unary-params.tssrc/shared/runtime-terminal-contracts.tssrc/shared/sleeping-agent-launch-config-types.tssrc/shared/sleeping-agent-launch-config.tssrc/shared/structured-agent-session-create.tssrc/shared/structured-agent-session-mutation.tssrc/shared/terminal-profile-routing.tssrc/shared/tui-agent-resume-startup.tssrc/shared/tui-agent-startup.tssrc/shared/workspace-session-sleeping-agents.tssrc/shared/worktree/launch-types.tstests/e2e/README.mdtests/e2e/agent-launch-profiles.spec.tstests/e2e/agent-profile-settings-sync.unit.test.tsxtests/e2e/fixtures/profile-agent.cjstests/e2e/helpers/agent-profile-fixture.tstests/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.
There was a problem hiding this comment.
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/): staticconfig.tomlscan, 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.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
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. 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. |
There was a problem hiding this comment.
✅ No new issues found. The three prior findings are addressed at
aa7334f1and 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.tsnow compares the resolved home against the canonical~/.claude(viavalidateExternalProfileHome) and, on a match, routes throughclaudeConfigDirEnvPatch, yieldingenvPatch: { HOME: host.home }withenvToDelete: ['CLAUDE_CONFIG_DIR']; custom homes and Codex stay explicitly pinned. - Every patched key is now override-proof —
assertAgentProfileEnvironmentfoldsObject.keys(envPatch)into its forbidden set, so a launchHOMEoverride on a default-home profile is refused. - Codex
forced_chatgpt_workspace_idis 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 —
pinClaudeProfileTerminalCommandnow 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.
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.
There was a problem hiding this comment.
✅ 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.tsroutes theflag-promptmode through upstream'sbuildFlagPromptStartupPlanand re-attachesagentProfileIdon 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.tsruns upstream'sprepareOpenCodePtyLaunchbefore the PR'sprepareRuntimeProfileCommand, keeping codex--no-daemonplanning 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_DIRroute, the Codexforced_chatgpt_workspace_idrefusal, 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.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
682f1fe7-a5ef-4fe9-8c76-e93ba71681fc
📒 Files selected for processing (9)
src/main/codex/codex-structured-session-adapter.test.tssrc/main/ipc/pty/ipc/spawn-commit.tssrc/main/ipc/pty/ipc/spawn-options.tssrc/main/ipc/pty/runtime/spawn-commit.tssrc/main/ipc/pty/runtime/spawn-options.tssrc/main/window/attach-main-window-services.tssrc/renderer/src/components/terminal-pane/pty-connection-types.tssrc/renderer/src/i18n/locales/en.jsonsrc/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.
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.
There was a problem hiding this comment.
✅ 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 —
prepareTerminalProfileLaunchnow callsreserveAgentProfilePtyOwnership, which takes areserveClaudeCredentialOwner(false, { deferRuntimeRefresh: true })lease when a Claude external profile's realpath'dresolvedHomeequalsClaudeRuntimePathResolver().getRuntimePaths().configDir; independent external homes and managed Claude are handled separately. - Pending ownership transfers into the live gate —
commitAgentProfilePtyOwnershipmarks Claude live only whenclaudeCredentialIsolationis 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.tsstores{ isolated, deferRuntimeRefresh }, addsshouldDeferClaudeRuntimeRefresh(), and fires the drain notification offhasClaudeCredentialOwners();runtime-auth-sync.tsuses 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.
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.
There was a problem hiding this comment.
✅ 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.tsnow keeps upstream's cold-listingwaitForListing/listingInProgress/hasActiveFailurebehavior and the PR'sscoped?.accountHome.agentProfile ? undefined : deps.probes?.[params.agent]gate in the samelistingexpression, 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.tsturns the profile test intoit.each([false, true]), asserting a profile-bound read answersunknownfor both waiting and non-waiting reads, never calls the probe orresolveAccountHome, 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.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
Follow-up on the architecture and localization notes in the summary, now checked through 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 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 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 |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
45acc172-58ac-446f-96bb-06d903aef918
📒 Files selected for processing (28)
src/main/agent-profiles/connection-service.test.tssrc/main/ipc/pty/host-env/types.tssrc/main/ipc/pty/ipc/spawn-commit-persist.tssrc/main/ipc/pty/ipc/spawn-env-codex.tssrc/main/ipc/pty/ipc/spawn-execute.tssrc/main/ipc/pty/ipc/spawn-run.tssrc/main/ipc/pty/ipc/spawn-state.tssrc/main/ipc/pty/profile-spawn.test.tssrc/main/runtime/orca-runtime-create-terminal.tssrc/main/runtime/rpc/methods/client-ui.test.tssrc/main/runtime/runtime-terminal-contracts.tssrc/renderer/src/components/tab-bar/QuickLaunchButton.launch-status.test.tsxsrc/renderer/src/components/tab-bar/QuickLaunchButton.tsxsrc/renderer/src/components/terminal-pane/ipc-pty-spawn-request.tssrc/renderer/src/components/terminal-pane/pty-transport-types.tssrc/renderer/src/components/terminal-pane/remote-runtime-pty-transport.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/agent-session-launch-plan.tssrc/renderer/src/lib/launch-agent-in-new-tab-host-resolution.test.tssrc/renderer/src/lib/launch-agent-in-new-tab.tssrc/renderer/src/lib/structured-agent-session-launch-callers.tssrc/renderer/src/lib/structured-agent-session-launch-registry.tssrc/renderer/src/lib/structured-agent-session-launch-reload.tssrc/renderer/src/lib/structured-agent-session-launch-resume-identity.test.tssrc/renderer/src/lib/structured-agent-session-launch-status.tssrc/renderer/src/lib/structured-agent-session-launch.test.tssrc/renderer/src/lib/structured-agent-session-launch.tssrc/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.
There was a problem hiding this comment.
✅ 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.tsretains the PR'spreAdoptedStablePane || 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.tsxdrops the per-agent pending spinner (generic rows gate only on thedisabledprop) while profile rows stay gated bydisabled || (managed && !account)plus their own per-profile status;runLaunchmints a freshrequestIdper pick and still forwardsagentProfileId. - Profile-aware launch status —
structured-agent-session-launch-status.tssplits intogetStructuredAgentLaunchStatus(profile keying, resume-prefix matching only for non-profiles) and a correctly three-argumentuseStructuredAgentLaunchStatus, fixing the prior bogus extrauseSyncExternalStoreargument. - Structured launch uses the upstream join —
structured-agent-session-launch.tskeeps theassertStructuredAgentProfileWorkspaceprecheck, then delegates togetJoinableStructuredLaunchState/joinStructuredLaunchState; identities, reload, and launch-plan wiring thread bothagentProfileand the requiredrequestId. launch-agent-in-new-tabrequest/plan union — plan selection now distinguishes a missingrequestIdwith no profile (reuse the preflighted plan) from a profile launch, borrowing the preflighted plan'srequestId; the union makes the fallbackagentSessionLaunchPlan.requestIdnon-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-servicecover theuseSelectedAccountand 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.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
Closing this; I'm not planning to continue it. The broader request stays tracked in #2284. |

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
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.
Connection preview and dark launch menu
Testing
Latest integration
e2a69230merges official mainb7521310, followed by514ad91ato 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
4b10ab6emerges official main40f9e7a3: 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, includingsendOutcomeLost; there is no remaining profile-only relocation. No dependency install was needed.Earlier upstream integration
10eb079amerges official main6c075700and 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
c05f42b0merges official mainea6a6d60without 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.At final fix commit
4244dc7c:Earlier checkpoint
4d85169d, for unchanged surfaces: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.__paneManagersdeclaration collision, reproduced with only the existing declarations. This is separate from the passing production typechecks. Full repositorypnpm lint,pnpm testandpnpm buildare 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
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