Skip to content

fix(codex): retry server overloaded turns - #1641

Open
gpYang wants to merge 7 commits into
chenhg5:mainfrom
gpYang:codex/retry-server-overloaded
Open

fix(codex): retry server overloaded turns#1641
gpYang wants to merge 7 commits into
chenhg5:mainfrom
gpYang:codex/retry-server-overloaded

Conversation

@gpYang

@gpYang gpYang commented Aug 5, 2026

Copy link
Copy Markdown

Summary

  • classify Codex server_overloaded/capacity failures as retriable
  • retry overloaded/rate-limit turns instead of surfacing raw failures
  • render retry notices in rich/progress cards instead of standalone messages
  • bypass progress-card edit throttling for retry notices and finalize old retry cards before replay/exhaustion

Validation

  • go build -o /tmp/cc-connect-retry.candidate ./cmd/cc-connect
  • go test ./core -run 'TestProcessInteractiveTurnWithRetry_(ReplaysPromptAfterOverloaded|RichCardNoticeUpdatesCard|ProgressCardNoticeUpdatesCard|ProgressCardRetryExhaustionFinalizesFailed|ProgressCardRetryNoticeBypassesThrottle|StopCancelsRetryDelay|ReplaysQueuedPromptAfterOverloaded)|TestProcessInteractiveEvents_ReturnsRetriableErrorWithoutSendingRawError|TestCompactProgressWriter|TestBuildAndParseProgressCardPayload|TestParseProgressCardPayload' -count=3
  • go test ./core -run 'TestProcessInteractiveTurnWithRetry_(ProgressCardRetryExhaustionFinalizesFailed|ProgressCardRetryNoticeBypassesThrottle|RichCardNoticeUpdatesCard|ProgressCardNoticeUpdatesCard|StopCancelsRetryDelay)' -count=1 -race
  • go test ./agent/codex -run 'TestSend_TurnFailedServerOverloadedIsRetriable|TestSend_WithImages_PassesImageArgsAndDefaultPrompt|TestSend_ResumeWithImages_PlacesSessionBeforeImageFlags|TestSend_HandlesLargeJSONLines|TestGetModelAndReasoningEffort_FromRuntimeConfigWhenUnset' -count=3 -p 1 -parallel=1
  • go test ./platform/feishu ./platform/discord ./platform/telegram -count=1
  • go test ./core -run TestCUJ_A3_ImageReachesAgent -count=3

Note: built candidate only; did not replace or restart the local cc-connect service.

@gpYang
gpYang requested a review from chenhg5 as a code owner August 5, 2026 07:30
@gpYang
gpYang force-pushed the codex/retry-server-overloaded branch from 7d17966 to 8befa44 Compare August 5, 2026 07:37
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