Repository navigation
fix(cli): honor Chat UI setting for worktree agent creation - #27796
Conversation
e806c62 to
cd44086
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to No confirmed issue prevents merging. Agent launches remain in the background unless a revealing option is selected. Pre-merge checks |
|
|
Review: Fixed two issues before merge: mixed-version hosts with incomplete launch capabilities now use the legacy path, and parent-context warnings remain visible. Follow-up correctness and post-rebase reviews found no new issue. The separate terminal creation timeout from the original handoff remains outside this PR. Validation on commit GitHub PR Checks passed, including static analysis, typecheck, five test shards, relay integration, cross-version compatibility, and macOS and Windows packaging. One unchanged Claude sign-in test failed on the first attempt after reporting an unexpected fixture link, then passed on the failed-job rerun. Local Merged as |
Only src/cli/bundled-skill-guides.ts conflicted; it is generated, so it was regenerated rather than hand-resolved. Upstream's guidance changes land around this branch's edits without touching them: the circuit-breaker and retry-release paragraphs in references/recovery-and-cleanup.md (stablyai#27795), and the orca-cli launch-flag note in the kernel's role table (stablyai#27794, stablyai#27796). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011nnNsG3p4Do9eiyfXGr2rB




ELI5
orca worktree create --agent codexalways opened the new agent in a terminal, even when Chat UI was enabled. The command used worktree creation's startup-terminal path, which never consults that setting. It now opens a structured chat when the execution host supports one and the user's setting chooses it; otherwise it opens a terminal and reports why.What Changed
--retry-launchusing the same operation ID, without creating a second worktree or sending the prompt twice. The command still reports setup refusals and parentage warnings.Why
worktree.createpromises a startup terminal handle to existing clients. Changing its answer to a chat would break that contract. The host's agent-launch path already chooses chat or terminal from the execution host's setting and handles first-prompt delivery, so the CLI uses that path for agent-backed creates. Worktree creation without--agentstays on the existing path.Linked Issue
Part 2 of STA-10160, for custom-model handoffs that bypassed the Chat UI preference. The existing-workspace command landed in #27794; this PR covers creation of a new worktree.
Visual Proof
Exact new-worktree flow on the pushed commit, in a hidden macOS Electron renderer with real agents:
Testing
M4Air macOS: built the branch CLI and launched the branch app in an isolated background profile.
worktree create --agent codex --prompt ...opened a structured chat with Chat UI on;worktree create --agent claude --prompt ...opened a terminal with it off. The rendered views showed the agents' exact requested replies. Both QA child worktrees were clean and removed.Focused local tests after rebasing: 135 passed across seven CLI, launch, setup, and transport files. Remote QA also ran 56 focused tests.
Local
orca-ci-checks: 23 of 24 checks passed, including the native typecheck. Its Bun CI typecheck could not start because this machine has Bun 1.3.14, which lacks thebun checkcommand expected by the repository's Bun 1.4.3 setup. GitHub CI passed its static analysis and typecheck. One unchanged Claude sign-in test failed on the first attempt after reporting an unexpected test link, consistent with a partial read of its directly written fixture. It passed on the failed-job rerun, and the full PR Checks run succeeded.Linux, Windows, WSL, and SSH UI flows were not manually exercised for this PR.
I manually tested this exact new-worktree CLI flow in Electron
Automated tests added/updated
Review
Review found and fixed two regressions: a mixed-version host could reject a create it used to support, and the new route could hide a parent-context warning. A second review and a post-rebase review found no new issue. The readiness pass found no proven security, compatibility, performance, or cross-platform defect in the final diff.
Agent skill upstream boundary
Notes
The command's
--modeland--effortflags support the custom-model handoff in STA-10160. Hosts that cannot honor either option refuse it before worktree creation. An older host without the new launch capabilities keeps terminal startup. The separate terminal creation timeout observed in the original handoff remains outside this PR.Checklist