Built-in workflows (code-review) pin no model: every agent inherits the session model, and local .claude/workflows can't shadow built-in names

Status Open
Maintainer reply None cached
Activity 0 comments · opened Jul 17, 2026

Summary

Two related gaps with the Workflow tool's built-in code-review workflow, hit on a session running an above-Opus tier (Claude Fable 5).

1. Built-in workflow scripts carry no model: on any agent() call

The persisted script for the built-in code-review workflow (the one /code-review high launches) contains zero model: opts — grep 'model:' <persisted script> matches nothing. Per the documented Workflow semantics, every agent() without a model override inherits the main-loop session model. So on a Fable session, a high-effort review silently runs all finders, verifiers and the sweep on the most expensive tier — ~10–20 top-tier agents for what is volume work. The tool's own docs recommend omitting model: for one-off user scripts, which is fine, but built-ins that fan out a fixed topology should ship sensible per-seat defaults (volume seats on a mid tier; at most the synthesis seat on the session tier) or accept a model-policy argument.

2. No supported override path: local .claude/workflows/<name>.js cannot shadow a built-in name

Attempted fix: copy the persisted script to .claude/workflows/code-review.js, add the model pins, relaunch Workflow({name: "code-review"}) → the built-in still wins name resolution (verified with a zero-cost args: "ping" early-return probe baked into the local copy: the launched script did not contain it). The only workaround is forking under a different name (code-review-pinned) and wiring project docs to redirect every future session to it — which the built-in /code-review skill instruction ("Invoke: Workflow({ name: 'code-review', ... })") knows nothing about.

Requests

  1. Ship explicit per-seat model: defaults in built-in workflow scripts (or a modelPolicy arg), so cost scales with seat role instead of session tier.
  2. Make local .claude/workflows/ shadow built-in names (local-first resolution), or provide a documented override mechanism.
  3. Document the name-resolution precedence between built-ins and .claude/workflows/.

Repro

  1. Start a session on an above-Opus tier with workflows enabled.
  2. Run /code-review high → open the persisted script path returned by the tool → grep model: → no matches; all agents inherit the session model.
  3. Copy that script to .claude/workflows/code-review.js, add an early-return probe, relaunch by name → the built-in script runs, not the local one.

🤖 Generated with Claude Code

View original on GitHub ↗