Skip to content

Log failed API requests, and default to HTTP/1.1 - #508

Merged
shellicar merged 4 commits into
mainfrom
fix/make-http-failures-visible
Aug 16, 2026
Merged

Log failed API requests, and default to HTTP/1.1#508
shellicar merged 4 commits into
mainfrom
fix/make-http-failures-visible

Conversation

@shellicar

Copy link
Copy Markdown
Owner

Summary

  • A failed API request now logs its cause chain, how the transport classified it, and every retry with its attempt number and delay.
  • An error in the log keeps its name, message, stack and cause instead of rendering as an empty object.
  • New http.allowH2 setting, off by default, so requests negotiate HTTP/1.1 and an over-limit request fails immediately with a readable 413.
  • Each connection logs the HTTP protocol it negotiated.
  • @types/node moves to 26 across the workspace, matching the Node version CI builds the binary with.

An over-limit request that HTTP/1.1 answers with a readable 413 is instead reset at the protocol layer over HTTP/2, carrying no status and no body. The retry loop cannot tell that from a transient network failure, so it retried ten times on a request that could never succeed, and nothing in the log said why. Node 26 enables HTTP/2 by default through undici 8, so this arrived without anyone choosing it.
@shellicar shellicar added this to the 1.0 milestone Aug 16, 2026
@shellicar shellicar added bug Something isn't working enhancement New feature or request dependencies Dependency updates pkg: claude-sdk-cli The new SDK-based CLI pkg: claude-sdk The agent SDK pkg: claude-sdk-tools The SDK tools package pkg: claude-core Core utilities — ansi, reflow, rendering pkg: mcp-exec Package: mcp-exec pkg: exec-core Process execution used by the tools pkg: mcp-internals Private MCP helper source-of-truth (never published) pkg: mcp-memory Package: mcp-memory pkg: mcp-typescript Package: mcp-typescript pkg: mcp-history Package: mcp-history labels Aug 16, 2026
@shellicar shellicar self-assigned this Aug 16, 2026
@shellicar
shellicar marked this pull request as ready for review August 16, 2026 07:55
@shellicar
shellicar merged commit ff1bc6d into main Aug 16, 2026
26 checks passed
@shellicar
shellicar deleted the fix/make-http-failures-visible branch August 16, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dependencies Dependency updates enhancement New feature or request pkg: claude-core Core utilities — ansi, reflow, rendering pkg: claude-sdk The agent SDK pkg: claude-sdk-cli The new SDK-based CLI pkg: claude-sdk-tools The SDK tools package pkg: exec-core Process execution used by the tools pkg: mcp-exec Package: mcp-exec pkg: mcp-history Package: mcp-history pkg: mcp-internals Private MCP helper source-of-truth (never published) pkg: mcp-memory Package: mcp-memory pkg: mcp-typescript Package: mcp-typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant