Skip to content

fix: classify Claude stream failures and safely recover thinking signatures - #263

Merged
HTExplicit merged 3 commits into
mainfrom
codex/claude-stream-recovery
Oct 8, 2026
Merged

HTExplicit merged 3 commits into
mainfrom
codex/claude-stream-recovery

Conversation

@HTExplicit

Copy link
Copy Markdown
Owner

Claude Messages stream errors were classified as 403 by default, so thinking-signature rejection, service failures and post-output overload appeared as access forbidden. Signature rectification also missed SSE errors and could not start after a slow initial HTTP response consumed the normal retry budget.

This change classifies the original stream error, records its actual carrying HTTP status separately, and permits one bounded same-account thinking repair before a message event is committed. It holds only message_start (64 KiB maximum), sends ping immediately, closes the rejected response before resending, and keeps attempts' message IDs, usage and model observations separate. Existing HTTP-only tool fallback, passthrough, Bedrock and other providers keep their contracts. Recovery evidence contains bounded signature fingerprints and explicit decisions, without new message or signature values. Ops detail shows stream semantics separately from actual HTTP; no database migration.

Validation: focused service/handler synthetic regressions passed, including slow-first-response budget, single-message recovery, output/size limits, actual retry failures, HTTP tool fallback and recovered stream interruption; protected existing stream and Ops terminal cases passed. Ops detail component: 16 tests passed. Changed frontend ESLint, Vue typecheck, YAML structure, static source checks and git diff checks passed. Independent review found no remaining blockers. No real model calls. Normal required PR checks remain enabled.

@HTExplicit
HTExplicit enabled auto-merge (squash) October 8, 2026 09:35
@HTExplicit
HTExplicit merged commit d85e65b into main Oct 8, 2026
18 checks passed
@HTExplicit
HTExplicit deleted the codex/claude-stream-recovery branch October 8, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant