feat(orchestration): accept Muse model and effort for supervised workers - #22383
Conversation
`worker-start --agent muse` already launched, but `--model` was refused because Muse had no session-option catalog. Add one that maps worker preferences to `muse --model <id>` and `--reasoning-effort <level>`; it seeds no models, so native-chat surfaces show no picker. opencode stays without `--model`: the opencode 2 TUI (now shipped as `opencode`) rejects the flag, so the refusal now tells callers to rely on the agent's own config. Help, skill guide, and docs list valid `--agent` ids and the agents that accept `--model`. Refs stablyai#19823
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe change adds and registers a Muse session-option catalog with model and reasoning-effort selections. Tests cover Muse preference handling and reject unsupported effort values and opencode model selection. The unsupported-model error now advises users to run the model from the agent's own configuration. Orchestration specifications and guides document Muse model selection and explain that other agents use their own configured model. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Muse model and effort options map to the launch command, and invalid or effort-only requests are rejected. No material merge risk remains. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation Issue ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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.
Important
src/shared/agent-session-option-catalog-muse.ts is a new module in the mobile session route's static import graph, so the pinned module count in config/scripts/mobile-web-app-session-terminal-closure.test.mjs is now one short. That job does not run on this PR (it is path-gated to mobile/** and specific config scripts), so it stays green here and fails later on main unless the pin is re-measured and bumped.
Reviewed changes
- Muse launch-preference catalog — new
src/shared/agent-session-option-catalog-muse.tsmaps--modeland--reasoning-effortand is registered inCATALOGS, opting Muse intoworker-startmodel/effort overrides with an empty model seed (no picker) and a shared effort ladder. - opencode guidance — the refusal in
worker-launch-preferences.tsnow appends "Omit--modelto run the model from its own config." - Tests — Muse pass-through, invalid-effort rejection, opencode refusal, and the Muse launch command (including replacing a
--modelthe user put in Muse's own arguments). - Docs and CLI help —
orchestration.mdx, the orchestration skill guide (and its generatedbundled-skill-guides.ts), and theworker-startspec notes now list Antigravity and Muse.
⚠️ Mobile web app session-route module census is now off by one
The new catalog module is statically imported by agent-session-option-catalog.ts, which the mobile session route reaches through its native-chat and structured-session-options hooks. The closure therefore gains exactly one module, but the pin was not updated. Because the mobile_web_app job is gated on MOBILE_WEB_APP_PREFIXES (which has no src/shared/** entry), this PR never runs the census — the drift lands on main and fails the next time that job runs, exactly as the file's own comment records for #22299.
Technical details
# Mobile web app session-route module census is now off by one
## Affected sites
- `config/scripts/mobile-web-app-session-terminal-closure.test.mjs:416` — `SESSION_ROUTE_MODULES = 4214`; line 482 asserts `modules` has exactly that length.
- `src/shared/agent-session-option-catalog-muse.ts` (new) — statically imported by `src/shared/agent-session-option-catalog.ts:13`.
- `mobile/src/session/use-mobile-native-chat-session-options.ts:10` and `mobile/src/session/use-mobile-structured-agent-options.ts:3` — value-import `getAgentSessionOptionCatalog`, so the catalog and everything it imports are in the session route closure.
## Required outcome
- Re-measure the closure with all postinstall generators run first and bump `SESSION_ROUTE_MODULES` by the measured delta — expected `4214 -> 4215` (`local modules 1028 -> 1029`). The same +1 is what the file records for Antigravity at lines 297-303.
## Suggested approach (optional)
- The module only adds `hasFlag`/`removeAgentArgOption` imports that are already in the closure, so the delta is exactly one. Re-pin and add the convention's short explanatory paragraph. The suite is skipped without `mobile/node_modules/react-native-web`, so it must be run in the `mobile_web_app` job (or locally after `install-mobile-dependencies`).DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Addressed review feedback:
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Re-pinned the mobile session-route census — commit
4b263d9ad4bumpsSESSION_ROUTE_MODULESfrom4214to4215(local1028 -> 1029) inconfig/scripts/mobile-web-app-session-terminal-closure.test.mjs, with the convention's explanatory paragraph, addressing the prior review's finding. The +1 is correct:agent-session-option-catalog-muse.tsonly adds imports (agent-cli-flag-detection,agent-session-option-agent-args,agent-session-option-catalog-types) that other catalogs already place in the closure.
The only other commit in the range is a main merge (3734e39938), which introduced no net change to the branch-vs-base diff.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
references/coordinator-loop.md conflicted in the Launch preferences section this branch rewrote. Resolved as a union: this branch's defaults policy keeps its shape, and upstream's additions are absorbed — the expanded agent list from stablyai#21705 and stablyai#22383 (Antigravity, Muse), the Muse override example, and the opencode paragraph in the position upstream placed it. The final mechanics paragraph keeps this branch's terminal-reuse clause. src/cli/bundled-skill-guides.ts is generated and was regenerated, not resolved. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011nnNsG3p4Do9eiyfXGr2rB

ELI5
Orca orchestration can now start Muse Code workers on a chosen Muse model and reasoning effort, the same way it already could for Claude, Codex and Cursor. That lets a coordinator hand tasks to Muse Spark workers.
What Changed
orca orchestration worker-start --agent musewas already accepted and launched Muse's default model. Adding--modelfailed with "does not support launch-time model selection". For opencode,--modelfailed with the same generic error.worker-start --agent muse --model muse-spark-1.3 --effort minimallaunchesmuse --trust-workspace --model muse-spark-1.3 --reasoning-effort minimal.--effortacceptsminimal,low,medium,high,xhigh,maxorultra.--modelis still refused, but the error now tells you to leave out--modeland use the model from opencode's own config.src/shared/agent-session-option-catalog-muse.ts) maps the worker's model and effort to Muse's launch flags, the same way Antigravity's does. It lists no models because Muse model ids depend on the account and Muse has no command that lists them, so no model picker appears in the UI.worker-start --helpnow lists the valid--agentids and which agents accept--model. The orchestration skill guide and the docs site page are updated too.Why
Issue #19823 asks for Muse Spark workers under Orca orchestration. Muse is now a first-class agent (#22216): Orca knows when it's ready and gets its working/waiting/done status from hooks, and workers settle through
worker_donewhatever the agent is. Once the host accepts the model and effort, the whole flow works.opencode
--modelisn't enabled. The installed opencode 2.x terminal UI exits withUnrecognized flag: --model; onlyopencode runaccepts-m. Passing it through would break every opencode 2 user. Picking an opencode model would have to go through itsOPENCODE_CONFIG_CONTENTenvironment variable, and worker launch preferences can't set environment variables today, so that's left as a follow-up.Linked Issue
Fixes #19823 for Muse. The issue's opencode + Muse Spark case can use
--agent musedirectly; opencode--modelis left out for the reasons above.Visual Proof
Before (
main):worker-start --agent muse --model muse-spark-1.3is rejected, so Muse workers always run the account default model:After: the same command launches Muse with the requested model and effort. The worker's footer reads
muse-spark-1.3 · minimal, it createdhello.txtand it sentworker_done, all in a fresh app:Launch receipt:
opencode now explains how to get a different model:
(That screenshot was taken with #22384 also applied. Without it, the very first worker in a freshly started app can hit a readiness timeout.)
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Manual test (macOS, Muse 1.3.0): I ran a dev build with a coordinator terminal and ran
worker-start --task <id> --agent muse --model muse-spark-1.3 --effort minimal.muse-spark-1.3 · minimal.orca orchestration send --type worker_done, and the task becamecompleted.opencode:
--agent opencode --model xreturns the new message and leaves no task behind.Automated tests: they cover Muse model/effort pass-through, rejecting an invalid effort, refusing opencode
--model, and the Muse launch command, which replaces any--modelthe user put in their own Muse arguments. The worker, shared, native-chat, CLI spec and skill-guide suites pass, as dotc:node,tc:cliand the changed-code quality gate.Found during testing, fixed separately: in a freshly started app, a worker created before any worktree had been opened got no replies to terminal queries, so Muse exited at startup. That's fixed in fix(runtime): answer startup terminal queries for background-created terminals #22384, because it affects every background-created terminal.
AI Disclosure
Anthropic Claude assisted with implementation, validation, and this pull request description.
Review
Follows the per-agent session-option catalog pattern that Antigravity workers use (#21705). The earlier community work for adding worker agents (#16228) was also reviewed.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
--agent muse --model …with its existing "does not support launch-time model selection" error.--yolo, which came from Orca's existing Muse permission setting. Without it, Muse's default approval prompt may stop the worker'sworker_doneshell command, as it would for any agent in approval mode.worker-releasereturnsrelease_unknownfor Muse workers. The logs show Muse exits about 3 s after its terminal closes, but the daemon kill request times out at 2 s (Request kill timed out after 2000ms) and nothing re-checks after the session exits. That timeout is general, not Muse-specific, and is tracked as a follow-up.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (typecheck and focused suites pass locally; CI covers the rest)