Repository navigation
Start plain new-tab agent launches through the host's agent.launch - #26489
Conversation
Review, readiness and QA summary (head
|
Restack and re-QA on the final base (head
|
| row | main | this PR |
|---|---|---|
| "+" menu, Quick Launch (click and Enter), floating "+" and shortcut | PASS | PASS |
| Saved Quick Command prompt, marker once in argv, nothing extra typed | PASS | PASS |
| SSH container: connect, "+", Quick Launch, Quick Command (one remote agent per click, prompt once) | PASS | PASS |
| Close right after clicking: tab stays closed | PASS | PASS (see the close prompt below) |
| Never-ready Codex ("Resolve with AI"): gives up, "wasn't sent", 0 bytes typed | 20.25 s | 20.14 s, PASS |
| Never-ready OpenCode saved Quick Command: blind paste with Enter after the 20 s wait (main's existing fallback) | 6/6 | 6/6 |
| Time to first agent output (3 runs, median) | 254.6 ms | 134.4 ms |
| Tab visible (median) | 47.6 ms | 46.2 ms |
One user-visible difference, intended. The host now creates the new tab's terminal before the tab appears. Main's existing "Stop running command?" prompt therefore applies to every close of a just-launched agent tab. On main, a close within about 0.2 s of the click was silent because the tab had no terminal yet. After "Stop and Close" the tab closes, as before.
An earlier OpenCode give-up, explained. In the first OpenCode runs, this PR gave up once in 6 tries while main pasted. The stand-in's process was named node, so only the slowest readiness evidence could match. With a stand-in whose process is named opencode, both builds pasted 6 of 6 at the same time.
Not verified:
- Windows and WSL machines.
- Real (non-stand-in) agents.
- The dashboard spawn and a fresh unsent draft: no on-screen control produces them.
- Launching into a workspace you aren't viewing.
- The slow SSH login shell and the disconnected-host Quick Command: those passed on the previous base, but weren't rerun on this head.
Follow-up (phase 2): the click's terminal choice could use the host's existing internal terminal-only flag instead of reading the prompt shape.
Author: @BrennanKB5
The tab bar's + menu, Quick Launch, the floating panel and its shortcut, the new-agent shortcut and dashboard spawn now start a no-prompt agent through the host, the way main's AI-button launches already do, wherever that is main's own launch: chat default off, enabled agent, not an SSH workspace. Everything else keeps the window's startup queue.
On a Windows client a WSL-path workspace launches as Linux from the window, which the host does not infer, so it keeps the window's own launch.
849eb62 to
533d54c
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (13)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughFresh-tab launch requests can use the host route when the request and runtime conditions match. The host launch path supports background presentation and can create a tab without activating it. Dashboard, floating terminal, tab-bar, and terminal-create launch callers now request fresh tabs. Tests cover route selection, launch results, activation behavior, and fresh-tab launch outcomes. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The reviewed fresh-tab launch changes have no established issue requiring resolution before merge. Pre-merge checks |
|
Parity rebuild (head
|
| Row | Result |
|---|---|
| "+", Quick Launch, floating "+" and shortcut, ⌘⌥T | PASS, same as main |
| Saved Quick Command prompt | PASS, byte-identical |
| SSH | PASS, same as main |
| First terminal size | PASS, identical |
| Never-ready Codex (both routes) | PASS, same give-up time and notice |
| Reload mid-launch | PASS, same as main, including main's lost OpenCode Quick Command prompt |
| Close within about a quarter second of clicking | DIFFERS: the agent may start and main's "Stop running command?" appears, as main's AI-button launches do today. Labelled intended. Silent cancel for every host-route caller is the first follow-up fix |
| Time to first output | 502 ms vs main 664 ms |
Not verified: Windows/WSL machines, real agents, paired-phone view.
Author: @BrennanKB5
#27173) #26489 started no-prompt "+" launches through the host lane that is built for terminals no window shows, into a pane the window already owns. That lane differs from the window lane in start size, env, telemetry, failure handling and Windows runtime resolution. Restore main's window route until the two terminal lanes are converged, then move "+" onto the single lane. This reverts commit 7634bbf.
#27173) #26489 started no-prompt "+" launches through the host lane that is built for terminals no window shows, into a pane the window already owns. That lane differs from the window lane in start size, env, telemetry, failure handling and Windows runtime resolution. Restore main's window route until the two terminal lanes are converged, then move "+" onto the single lane. This reverts commit 7634bbf. (cherry picked from commit 0545841)
ELI5
When you pick an agent from the "+" menu, Quick Launch, the floating panel, the new-agent shortcut or a dashboard, the window has always started that agent itself, by queuing a command and typing it into the new terminal. The AI buttons already work differently: they ask Orca's launch service (the "host", the part of Orca that runs the workspace's terminals) to start the agent. This PR makes those plain new-tab launches use the same host launch the AI buttons use. You should see exactly the same tab, agent and folder as before.
What Changed
Problem. Desktop new-tab agent launches still ran in the window, not through the shared host launch (
agent.launch) that the AI buttons, CLI and phone already use. Two ways of starting the same agent means every launch fix has to land twice. This is the last caller group in phase 1 of launch unification, and Brennan asked for strict parity: move it with no user-visible change, then fix bugs after the move.User-facing change. None intended, apart from one small difference listed below. Same single new tab in the same group and pane, same agent, arguments, environment and working folder, same selection (a floating launch still leaves the main window alone). In tests the agent's first output appeared about 160 ms sooner.
Mechanism (renderer only, no host or wire changes).
launchAgentInNewTabsends such a launch through main's existinglaunchAgentThroughHost, the same route the AI buttons use, but only when that route already matches main's own launch:One user-visible difference (intended). If you close a just-launched agent tab within about a quarter second of clicking, main silently cancels the launch. Now the agent may still start, and main's usual "Stop running command?" prompt appears. That is exactly what main's AI-button launches do today, because this PR uses their route. "Stop and Close" keeps the tab closed with no leftover process.
Folded in. #26364 (host-side delivery of the first prompt) is closed; at strict parity it isn't needed, because the window keeps delivering prompts exactly as main does.
Why
Reusing the route main already runs for the AI buttons is the smallest move that gets these launches onto the host. The earlier version of this PR (and #26364, #26168, #26173) also changed how prompts are delivered and fixed several existing bugs along the way. Brennan asked to separate those: migrate at parity first, fix bugs after. So this version adds no new host behaviour, keeps every case where the host route still differs from the window on main's path, and leaves the fixes for follow-ups.
Linked Issue
Launch unification, phase 1 (last caller group). Replaces the earlier stacked version of this PR and #26364.
Visual Proof
Hidden test builds with a stand-in agent (it replays a recorded agent screen, so the path and banner text in the terminal come from the recording, not a real agent). Main
1a2ccb856e2vs this PR533d54c0e4b.Testing
Live QA, main
1a2ccb856e2(this PR's merge-base) vs this PR, same stand-in agents and steps on both:café ✓marker)Real config files were unchanged throughout. A fresh Claude review asked only "does anything here change behaviour vs main, or exist only to fix a bug?". It found nothing on the normal path. Its edge findings are below; the Windows WSL-path case it raised is now excluded.
Automated: 144 tests across 27 named files pass, including new coverage for which launches take the host route, the background launch and the no-prompt notice.
tc-gate pnpm tc:node,tc:webandtc:cliand all 22orca-ci-checkspass; CI green at533d54c0e4b.Not verified: Windows and WSL machines; real (non-stand-in) agents; what a paired phone shows when the host publishes the new terminal.
Review
Fresh parity review (no shared context with the author). No user-visible difference on the normal path; nothing in the diff exists only to fix a bug. Edge cases it found, all also true of main's existing AI-button host route, labelled below.
Agent skill upstream boundary
Notes
Author: @BrennanKB5
Checklist