Commit 2530a9f
fix(prompt-runner): crawl requests get a real deadline — 4 minutes per round-trip, not the SDK's silent 10
A carnegie-foundation team crawl held one non-streaming connection for
the SDK's full default 10-minute timeout before dying with "Request
timed out" — the operator watched a spinner for 10 minutes to learn
nothing. Crawl model calls now pass an explicit per-request budget
(240s, 1 retry — ~480s worst case, inside the 600s dispatch ceiling) so
a stuck request fails fast with a real error while normal crawls
(observed ~211s total) are untouched. Each pause_turn continuation gets
the same per-request budget.
runPrompt grows optional timeoutMs/maxRetries per-request overrides;
enrichment runs (run.ts, drafter.ts) keep SDK defaults deliberately —
uncapped pack crawls have legitimately run 15+ minutes.
Env dial: CRAWL_REQUEST_TIMEOUT_MS.
Files changed:
- services/prompt-runner/src/anthropic.ts
- services/prompt-runner/src/crawl.ts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RW28dw3kQAKXr2ZNefCukE1 parent cde8cf4 commit 2530a9f
2 files changed
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
60 | 71 | | |
61 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
62 | 78 | | |
63 | | - | |
| 79 | + | |
64 | 80 | | |
65 | 81 | | |
66 | 82 | | |
67 | 83 | | |
68 | 84 | | |
69 | | - | |
| 85 | + | |
70 | 86 | | |
71 | 87 | | |
72 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| |||
220 | 226 | | |
221 | 227 | | |
222 | 228 | | |
223 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
224 | 233 | | |
225 | 234 | | |
226 | 235 | | |
| |||
0 commit comments