Workflow tool's agent({model: 'opus'}) silently inherits the session's 1M-context toggle instead of a stable default
The Workflow tool's agent() function accepts opts.model as a family string ('opus', 'sonnet', etc.), documented as an override "for this agent call." In practice, passing model: 'opus' does not resolve to a fixed default — it inherits whichever Opus context-window variant (200K vs 1M) was last selected via /model earlier in the session, with no way to specify or override that independently from inside the script.
Reproduction:
- Run
/model→ select "Opus 5 (1M context)" - Later in the same session, run
/model→ select "Sonnet 5" (making Sonnet the active default) - Invoke
Workflowwith a script whoseagent()calls passmodel: 'opus' - Every spawned agent runs on the 1M-context variant — not a fixed/default Opus, and independent of whatever the session's current default model is
Impact: The tool's own documentation instructs the caller to reason about whether a task needs the larger context window (it explicitly discusses budget/scale tradeoffs), implying that choice is actionable per-call. It isn't — there's no model-id or parameter that distinguishes the two variants, so a deliberate "this doesn't need 1M" judgment has no way to take effect once the account has selected 1M at any earlier point in the session.
Suggested fix: either expose the context-window variant as an explicit, independent value in opts.model (e.g. distinguish it from the family string), or document plainly that short aliases inherit the session's active variant rather than a stable default — so the tool's own guidance about weighing context size isn't misleading.