Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Linked Issues check | Issue #36594 is the only active directly linked issue, so its coding requirements apply. Desktop requirements are met at head 7f6a96e. In src/renderer/src/lib/empty-workspace-default-agent-chat.ts, de… |
Establish whether the mobile workspace-creation picker preselects an agent from catalog order when defaultTuiAgent is null, and whether that preselection can start an agent without an explicit user confirmation. Read mobile/src/tasks/worksp… |

Passed checks: 4 passed
-
Full details: Description check
-
Explanation
The description follows the required template and explains the user-visible behavior, implementation, rationale, linked issue, visual proof, testing, scope, and checklist status. It also documents that full lint, typecheck, test, and build commands were not run locally but are expected to be covered by CI.
Full details: Out of Scope Changes check
-
Explanation
The PR changes two files: src/renderer/src/lib/empty-workspace-default-agent-chat.ts (about +3/-5 lines) and src/renderer/src/lib/empty-workspace-default-agent-chat.test.ts (+11 lines). Both files directly serve
#36594. The source change adds the unset-default condition to defaultChatDetectionTarget, which gates the empty-workspace launch and the detection wait. The added tests cover the no-launch and no-wait cases for Auto. The saved-agent fallback, blank-terminal, and SSH detection tests cover behavior the issue requires preserved. No unrelated file or hunk appears in the PR summary. The file list comes from the PR summary and the head file contents, because the diff tool could not read the changed blobs; this limits confidence in completeness but shows no unrelated change.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.
-
Full details: Linked Issues check
-
Explanation
Issue
#36594is the only active directly linked issue, so its coding requirements apply. Desktop requirements are met at head 7f6a96e. In src/renderer/src/lib/empty-workspace-default-agent-chat.ts, defaultChatDetectionTarget returns undefined when defaultTuiAgent is null, so openDefaultAgentChatInEmptyWorkspace returns null and the workspace seeds a shell. A saved agent still opens a chat through pickTuiAgent, and 'blank' still opens a shell. The three exports all use this helper, so the wait for detection is also skipped for Auto. The test file adds 'starts no agent when no default agent was saved', which asserts that launchAgentInNewTab is never called, and a waiting test that covers defaultTuiAgent null. Mobile is not established. The issue acceptance criteria name mobile: the mobile workspace-agent selection falls back to catalog order when the default is unset, including while detection is unresolved, and the issue asks for an explicit, stable choice there. The PR states that mobile is unchanged and that its picker requires confirmation before launch. That claim was not verified: mobile/src/tasks/workspace-agent-selection.ts was not read, and the inspection budget was spent. The diff tool also could not read the changed blobs, so the base-to-head change set rests on the PR summary and the head file contents.Resolution
Establish whether the mobile workspace-creation picker preselects an agent from catalog order when defaultTuiAgent is null, and whether that preselection can start an agent without an explicit user confirmation. Read mobile/src/tasks/workspace-agent-selection.ts at head, together with its caller, for that question. If mobile preselects an agent without a choice, the mobile acceptance criterion in
#36594is unmet and the change needs a matching mobile fix or a documented scope decision by the issue owner. If the picker requires a user confirmation before any launch, record that evidence and this check can pass.
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
ELI5
If you never picked a default agent (the Default Agent setting is still on "Auto"), opening an empty workspace started a chat with whichever agent comes first in Orca's list, which is Claude. Someone who meant to use Codex got a Claude tab they never asked for. Now an empty workspace opens a plain shell until you save a default agent. A saved agent or Blank Terminal default works exactly as before.
What Changed
When you open a workspace with no tabs,
ensureWorktreeHasInitialTerminalcallsopenDefaultAgentChatInEmptyWorkspace. That function passessettings.defaultTuiAgenttopickTuiAgent, and withnullit falls back to the first agent detected, inTUI_AGENT_AUTO_PICK_ORDERorder. Claude is first in that list, so a Claude chat started without any click.defaultChatDetectionTargetnow returnsundefinedunless a real agent is saved as the default. Before, it only did this for'blank'. All three exports in the file go through it, so with Auto:openDefaultAgentChatInEmptyWorkspacereturnsnulland the seeding step creates its usual shell.emptyWorkspaceDefaultChatAwaitsDetectionandloadEmptyWorkspaceDefaultChatDetectionno longer hold the workspace for up to 5 s waiting on agent detection that could no longer open anything.What stays the same:
Why
This empty-workspace path is the only one that starts an agent without a click. #23693 made it opt-in so it "can never start an unrequested agent". A default you never picked isn't a choice to act on. The onboarding folder path (
onboardingFolderDefaultAgent) already treats an unset default as no agent; this makes the empty-workspace path agree.Rejected alternatives:
pickTuiAgentor the pick order: that would change every click-driven launch where Auto picking an agent is the point.Linked Issue
Fixes #36594
Visual Proof
Default agent left on Auto, Claude and Codex detected, empty workspace opened from the sidebar. Captured on macOS from a hidden Electron run.
Before (main): a Claude Chat tab opens without being asked for.

After: the workspace opens a plain shell (Terminal 1).

Testing
I reproduced the bug on
upstream/mainfirst. WithgetDefaultSettings()(defaultTuiAgent: null) andclaudeandcodexboth detected,openDefaultAgentChatInEmptyWorkspacelaunchedclaude.I added two checks in
empty-workspace-default-agent-chat.test.ts:launchAgentInNewTabis never called. The test asserts no launch at all, not just "not Claude", so a fix that only reorders the list still fails it.Both fail with the fix reverted and pass with it.
Commands run:
pnpm testonempty-workspace-default-agent-chat.test.tsandworktree-activation-default-agent-chat.test.ts(21/21)pnpm tc:weboxlintandoxfmt --checkon the changed filescheck:code-quality:changed(0 new findings)Hidden-Electron e2e run on macOS, same steps on main and on this branch: Claude Chat before, Terminal 1 after.
Ran on macOS only. I didn't run it by hand on Linux, Windows or a real SSH host; the SSH wait is covered by the unit test.
AI Disclosure
Review
Agent skill upstream boundary
Notes
Mobile isn't changed. Its create-workspace picker shows the preselected agent and you confirm it before anything starts, so nothing launches silently. No setting is migrated and nothing between client and host changes, so mixed versions are unaffected.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)