Skip to content

Intermittent timeouts in the SDK #533

@abhinavtk97

Description

@abhinavtk97

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions