Bug: synthesis output parsing fails on real research runs #16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Discovered during M2.3 smoke test (trace
1a8711c4-a65b-49fd-853e-50fde79c755f).The agent successfully searched, fetched 28 sources, and produced a real synthesized answer (visible in the trace at step 23, including markdown sections like "Cool-Season Vegetables", source citations, etc.). But the final ResearchResult contains:
answer: "Research on '...' completed but synthesis failed. 28 sources were gathered."citations: emptygaps:[{category: budget_exhausted, topic: synthesis, detail: "The synthesis step failed to produce structured output."}]confidence: 0.10So the synthesis LLM call works, but parsing its output into the Pydantic contract fails and the agent falls back to an error stub. The trace step labeled "complete" then records
confidence: 0.1, citation_count: 0, gap_count: 1, confirming the dropped data.Repro
Likely cause
Schema mismatch between what the synthesis prompt asks the model to emit and what
ResearchResult.model_validate*accepts. Worth inspectingWebResearcher._synthesize(or equivalent) and the synthesis trace step to compare expected vs. actual JSON.claude-code referenced this issue2026-04-08 21:12:47 +00:00