[Bug] deep-research workflow aborts entire run (and burns millions of tokens) when any schema-bound subagent fails to emit StructuredOutput
What happened: I ran the deep-research skill/workflow. It consistently fails in the Verify phase and produces no report, after consuming a very large number of tokens (~3.5M across three attempts, with zero usable output).
Root cause (from inspecting the workflow script and subagent transcripts):
- The workflow's Verify phase fans out claims × 3 votes (~75) concurrent agent(prompt, { schema }) calls.
- When any single one of those subagents ends its turn with prose instead of calling the StructuredOutput tool (even after the 2 automatic nudges), the harness raises a FATAL error: agent({schema}): subagent completed without calling StructuredOutput (after 2 in-conversation nudges).
- This error is not catchable at the script level. I added a .catch(() => null) around each verify agent() call to degrade a missing output into an abstention; the run still died with the identical error. So the harness escalates this to a workflow-fatal failure that bypasses the script's own .catch, contradicting the documented behavior that "a thunk that throws resolves to null."
- With ~75 schema-bound subagents per run, the probability that at least one fails to emit StructuredOutput is very high, making the workflow fail almost every time at scale.
Impact: The expensive Search/Fetch phases run first, then the run dies in Verify before Synthesis — so the customer pays full token cost for no output. Resume/caching also did not work (re-ran all phases from scratch), compounding the cost.
Expected: A single subagent failing to emit structured output should degrade to an abstention/skip, not abort the whole workflow. Schema-enforcement failures must be containable, or high fan-out of schema-bound agents should not be used.
Requests: (1) Fix the non-catchable fatal-error behavior for schema-bound subagents; (2) review/remove the deep-research workflow until fixed; (3) token/credit reimbursement for the wasted spend caused by this defect.
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.162
- Feedback ID: 1d6d1012-4167-4c98-846c-1e4f6b352191
Errors
[]This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗