Skip to content

Agent Dispatch Sequence

The execution-mode pattern. Opus stays in main and dispatches mechanical work to a Sonnet subagent with the 8-element prompt contract. Then Opus independently verifies the result before declaring complete.

Opus verificationFilesystemAnthropicPortkey :18900Sonnet SubagentAgent toolOpus (main)Opus verificationFilesystemAnthropicPortkey :18900Sonnet SubagentAgent toolOpus (main)loop[tool use]alt[verification passes][verification fails]detect execution-mode trigger1build 8-element prompt:1 goal · 2 evidence · 3 tool · 4 tests · 5 acceptance · 6 rollback · 7 rule constraints · 8 output format2invoke with model:sonnet3spawn isolated subprocess4LLM call5forward (sonnet config)6response7stream8Read · Edit · Bash9result10continue11final structured report12report (text)13independent acceptance check(grep · test count · file existence)14✓ trust confirmed15mark task complete16✗ mismatch17re-dispatch OR Opus does it18

Per G-MODEL-ROUTING-AT-EXEC, Opus dispatches Sonnet whenever execution mode is triggered. Triggers include:

  • /gsd:* execution commands
  • Execution skills (/acquisitions-outreach, /dispo-blast, /hubspot-deal-ingest, etc.)
  • TodoWrite task transitions to in_progress for mechanical work
  • Plan file checkbox transitions in ~/.claude/plans/*.md
  • User keywords: “implement”, “execute”, “build it”, “ship it”, “go”, “do all of them”
  • Multi-file batch edits against an already-defined rubric

Sonnet’s report describes what it intended to do. Opus runs the independent acceptance check before marking complete:

  • Code edit? → grep for the new content; verify old content removed
  • File created? → check existence + size
  • Tests added? → count test definitions; run the test suite
  • Build passed? → re-run the build with same args; verify exit 0

If verification fails, Opus either re-dispatches with corrected prompt or does the work directly.

Three reasons:

  1. Cost — Sonnet is ~5× cheaper per token than Opus. Mechanical work doesn’t need Opus brain.
  2. Context isolation — subagents run in fresh contexts. They don’t pollute Opus’s working memory with intermediate file reads.
  3. Parallelism — Opus can dispatch many Sonnets concurrently for independent work (e.g., 5 parallel content authoring tasks).

See Model Routing for the full decision tree.