A web run runs on the model it was started with (#1697) - #1714
Conversation
|
Dogfood on the live dashboard (daemon rebuilt from this branch, pid 53455; extension self-reloaded onto this branch's files), prefs temporarily
One earlier attempt (run Prefs and the page's remembered model are restored ( 🤖 automated · Fable 5, effort high |
|
The red 🤖 automated · Fable 5, effort high |
The model choice reached the cloud driver — agent.ts hands `model` to every driver's start — and stopped there: cloud.ts asked the daemon for a session with repo, branch and prompt only, so the session ran on whatever claude.ai defaults to while the dashboard showed the chosen model. The choice now travels /_web-start → start-queue → /_bridge/start → tf-drive, and content.js picks it in claude.ai's model menu before sending, reporting what it clicked like the repo and branch chips do. A menu that does not offer the model, or a page with no picker, fails the creation naming it, so the run stops with that note rather than running on the default. No model in the request leaves the picker untouched. Selectors from one live look on 2026-08-26: the trigger is a menu button reading the model, the menu radio items whose label sits beside a hidden shortcut digit and check glyph, and "More models" a submenu of older versions that opens on click; a plain click picks an entry and the pick survives a page load. Also: the options page shows the worker's last cycle — background.SPEC.md said the outcome is kept so the options page can state it, and the page never read it — live, so a reload the worker did because its files changed on disk is visible there. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
4cc1440 to
3955f4f
Compare
Fixes #1697 (option 1).
What
A run started with a model choice (
--model, the launcher's model, Settings) that lands on the web path now runs on that model. The choice travels the whole way —/_web-start→ the start-queue →/_bridge/start→ the Driver'stf-drive— andcontent.jspicks it in claude.ai's model menu before sending, reporting what it clicked the way the repo and branch chips do. A menu that does not offer the model, or a page with no picker, fails the creation naming it, so the run stops with that note instead of running on the page's default.Before this,
cloud.tsposted{repo, branch, prompt}althoughagent.tsalready handed itmodel; the dashboard then showed the chosen model on a web run that claude.ai was running on its own default.How
driver/cloud.ts: the request body carriesmodelfrom the start options when set; the "asked the browser extension…" notice names it.dashboard/web-start-endpoints.ts:model, when present, must be a string (400 otherwise).dashboard/bridge-starts.ts:modelstored trimmed on the request; blank is none; over 100 characters is refused (MAX_START_MODEL).dashboard/server.ts+bridge-endpoints.ts:/_bridge/starthands the extension the model.background.js: the claimed request'smodelrides thetf-drivestart.content.jscreateSession: after the branch chip is verified and before anything is filled — the model trigger (button[aria-haspopup="menu"]reading a model name, beside the effort button; not a combobox, so the chips' order is untouched) is read; if it does not read the model, its menu ([role="menuitemradio"]entries, label read without the hidden shortcut digit and check glyph) is opened and the entry clicked — exact label first, else the first entry carrying the model's word (opus→ "Opus 5", the newest), the "More models" submenu searched when the menu offers nothing — and the trigger is read again. Notes:model already Opus 5/model: clicked "Sonnet 5" via menu/model: the menu offered no "gpt-9" (6 entries: …)/no model picker on the page — not sending. Nomodelin the request → the picker is never touched.probeNewSessionreports the picker's text.lastCycleline —background.SPEC.mdsaid the outcome is kept so the options page can state it; the page never read it. Rendered on open and re-rendered fromchrome.storage.onChanged, so "reloading the extension: content.js changed on disk" is visible there.Selectors from one live look at claude.ai/code on 2026-08-26: trigger
button[aria-haspopup="menu"]"Opus 5"; menudiv[role="menu"]ofdiv[role="menuitemradio"][aria-checked]with the label in the firstspan, akbdshortcut in anaria-hiddenspan, and a check glyph on the current one;More modelsis amenuitem[aria-haspopup="menu"]that opens a submenu (Opus 4.8 / 4.7 / 4.6, Sonnet 4.6) on click; a plain.click()on an entry picks it, the trigger text becomes the label, and the pick survives a page load.Tests
cloud.test.ts: the model rides the POST body; absent when unset.web-start-endpoints.test.ts: string travels to the queue; non-string is 400.bridge-starts.test.ts: trimmed, blank dropped, cap refused.bridge-endpoints.test.ts:/_bridge/startcarries it.server.test.ts: end to end through a dashboard with the bridge on — run postsmodel, the extension's claim reads it (this one covers theserver.tswiring; broken on purpose, it fails).check.mjs: five new cases — picked, already reads it (picker not opened), found behind "More models", not offered (nothing sent, note names the model and the entries), no picker (nothing sent) — plus the no-model case asserting the picker is never opened. Each broken on purpose once: removing the entry click, the model-word filter on the trigger, or the read-back fails exactly the cases guarding it.Specs
content.SPEC.md,background.SPEC.md,options.SPEC.md, the extension'sSPEC.md,driver/cloud.SPEC.md,dashboard/web-start-endpoints.SPEC.md,dashboard/bridge-starts.SPEC.md,dashboard/bridge-endpoints.SPEC.md, andFEATURES-SPEC.md(the model on web runs; the options page's last-cycle line).Not done here: option 2's "don't offer a model pick for a web run" — moot once the pick is honoured.
🤖 automated · Fable 5, effort high