[BUG]
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The built-in /deep-research skill (invoked via the Workflow tool) spawned 112 subagents that all failed
identically with:
agent({schema}): subagent completed without calling StructuredOutput (after 2 in-conversation nudges)
The workflow burned 4,299,207 tokens across 338 tool uses over 264 seconds and returned zero usable result.
Every parallel[N] slot failed the same way, retry after retry.
Because I'm on Claude Max 5x, this consumed roughly 85% of my current 5-hour session budget with no output to show
for it. The failure was silent until completion — there is no early-fail circuit when the first N
structured-output calls fail, so the workflow drains its full budget before erroring out.
Task ID: wgu23qy1f
Run ID: wf_d99364f0-f2b
What Should Happen?
Either:
- Every subagent invoked with a
schema:option should successfully call theStructuredOutputtool, OR - The Workflow harness should fast-fail after the first 3–5
subagent completed without calling StructuredOutput
errors (assume harness-level bug, stop spawning more agents), AND
- Rate-limit / session quota consumed by a workflow that returns zero successful
agent()results should be
creditable via support.
Users should also get progress signals during long-running workflows so they can TaskStop before full-budget
drain when things are going wrong.
Error Messages/Logs
Dynamic workflow "Deep research harness — fan-out web searches, fetch sources, adversarially verify claims,
synthesize a cited report." failed: Error: agent({schema}): subagent completed without calling StructuredOutput
(after 2 in-conversation nudges)
at R (B:/~BUN/root/src/entrypoints/cli.js:3623:2694)
at processTicksAndRejections (native:7:39)
Failures (pattern repeated across all 5 phases):
parallel[0] failed: agent({schema}): subagent completed without calling StructuredOutput (after 2 in-conversation
nudges)
parallel[1] failed: agent({schema}): subagent completed without calling StructuredOutput (after 2 in-conversation
nudges)
parallel[2] failed: agent({schema}): subagent completed without calling StructuredOutput (after 2 in-conversation
nudges)
... (31+ identical rounds)
Usage:
agent_count: 112
total_tokens: 4,299,207
tool_uses: 338
duration_ms: 264,385
Task ID: wgu23qy1f
Run ID: wf_d99364f0-f2b
Steps to Reproduce
Steps to Reproduce
- Start Claude Code on Windows with Opus 4.7 (
claude --model claude-opus-4-7). - Invoke the built-in deep-research skill with any substantive research question, e.g.:
/deep-research How does a solo operator get maximum leverage out of Claude Code CLI in 2026?
- The skill invokes
Workflow({name: "deep-research", args: "<question>"})internally. - The workflow proceeds through phases: Scope → Search → Fetch → Verify → Synthesize.
- Every
agent()call with aschema:option fails after 2 retries with:
agent({schema}): subagent completed without calling StructuredOutput
- The workflow continues spawning agents (never fast-fails) until ~4 minutes and 100+ failed agents in.
- Workflow errors out. No research output is produced. Session token budget is fully consumed.
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.153 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
### Impact / Severity
For Claude Max and Pro users, a single failed run of this workflow can consume the majority of a 5-hour rate-limit
window. Because the failure mode returns nothing usable, users have no way to know the workflow is broken before
invoking it, and no way to abort mid-run before their budget is gone.
### Suggested fixes (in priority order)
- Root cause: Investigate why subagents ignore the
StructuredOutputtool-call instruction. Possible causes:
- System-prompt truncation when the parent has many MCP servers loaded (this user has ~28 MCP servers
configured, contributing significant tool-descriptor overhead)
- Prompt-cache poisoning across schema-mode agent calls
- Tool definition not reaching the subagent's system prompt
- Model-version mismatch between the parent Opus 4.7 and the subagent runtime
- Circuit breaker: If the first N (e.g., 5)
agent({schema})calls fail with `subagent completed without
calling StructuredOutput`, abort the workflow rather than continuing to spawn more agents. This is a clear
harness-level failure signal, not a per-agent flake.
- Progress visibility: Emit a
<task-notification>when structured-output failure rate exceeds a threshold
so users can TaskStop before full budget drain. Currently /workflows shows live progress but the token counter
runs silently.
- Automatic credits: Consider automatic session-quota refund for Max/Pro users when a workflow spawns >10
agents and returns zero successful agent() results. The failure signal is unambiguous and detectable
server-side.
### Reproduction environment
- Windows 11 Home 10.0.26200
- PowerShell 5.1
- Claude Max 5x plan (default_claude_max_5x)
- ~28 MCP servers configured (github, playwright, cloudflare, discord, r0ice-server2 SSH bash, etc.)
- No custom modifications to the built-in deep-research workflow script
- Question passed was substantive but well-formed (multi-paragraph research prompt about Claude Code leverage
tactics)