## 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

```text
generation job failed: timeout fetching https://.../openapi.json after 60s
```

## Steps

1. Retry the fetch with a longer timeout and resume support Expected: you get the full spec.
2. If it is still too big, download it once and cache it locally Expected: the generator reads from disk.
3. Or generate from a pruned spec with only the paths you need Expected: less to fetch and faster generation.
4. 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
