agent's docs-fetch timed out on a 200-page OpenAPI spec - the generation job died before producing any code
Gets generation past giant-spec fetch timeouts: cache or prune the OpenAPI file. Use when the generator dies downloading the spec. Not for generator crashes.
TL;DR
The agent tried to download a giant OpenAPI spec in one shot, timed out, and the whole generation died. Fetch with retries and resume, or split the spec, or point the generator at the specific paths you need instead of the whole file.
Error
generation job failed: timeout fetching https://.../openapi.json after 60sSteps
- Retry the fetch with a longer timeout and resume support Expected: you get the full spec.
- If it is still too big, download it once and cache it locally Expected: the generator reads from disk.
- Or generate from a pruned spec with only the paths you need Expected: less to fetch and faster generation.
- Re-run the generator against the cached spec Expected: client code is produced.
When to use
- Generation dies fetching the spec
- The spec is huge
When not to use
- The spec URL is wrong (that is a 404, not a timeout)
- The generator itself crashes
Tool compatibility
- OpenAPI spec caching
- Code generators with remote spec URLs
Variant phrasings
openapi fetch timed out
Cache the spec locally or prune to the paths you need, then generate.
generator died downloading spec
Same: huge specs need retry + local caching.
Why it happens
Agents treat the spec URL as free and instant. A 200-page spec with inline examples can be tens of megabytes behind a slow docs server.
Edge cases
- Some specs are generated dynamically per request; cache-bust carefully
- Validate the cached spec is the version you expect
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_ihsfSQJIH5PzCYLBcK-fJw