anthropics / anthropics/claude-agent-sdk-python

Intermittent timeouts in the SDK

Offen
#533 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
8.1k
Forks
1.3k
Ø Merge
2 T. 31 Min.
Gemergte PRs (30 T.)
1

Beschreibung

We're experiencing an issue with the Claude Agent SDK where some streaming requests are intermittently timing out after 10 minutes. While the workflows do eventually complete, they take significantly longer than they should because each timeout blocks the request for 10 minutes before retrying. The same workflows complete much faster when using Claude Code CLI, which suggests this is specific to the Agent SDK. (Both are using the same backend APIs via our gateway).

Based on our initial investigation, the requests that timeout does not seem to reach our server - we see no logs for these failed requests. This could be due to requests getting stuck at the SDK/client level before being transmitted. We're continuing to investigate on our end for any other issues, but this appears to be SDK-specific.

We need help from Anthropic to investigate why the Agent SDK behaves differently than Claude Code for streaming requests. While we investigate, we'd also like to check if there's a way to configure the SDK timeout to less than 10 minutes. This would allow stuck requests to fail and retry faster, reducing the overall workflow duration.

```
[CLI DEBUG] [Anthropic SDK INFO] [log_db4a4b] connection timed out - error; no more retries left
[CLI DEBUG] [Anthropic SDK DEBUG] [log_db4a4b] connection timed out (error; no more retries left) {
url: ".../llm/v1/messages?beta=true",
durationMs: 879855,
message: "The operation was aborted.",
}
[CLI DEBUG] 2026-01-29T13:04:39.945Z [ERROR] Error streaming, falling back to non-streaming mode: Request timed out.
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.