Skip to content

Claude: retry transient failures in place, and confirm before a cold resume - #2023

Merged
currentbits merged 3 commits into
mainfrom
coder/claude-retry-transient-failures-and-conf-ad6453
Nov 13, 2026
Merged

currentbits merged 3 commits into
mainfrom
coder/claude-retry-transient-failures-and-conf-ad6453

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Two Claude-provider improvements.

  • Retry transient failures: a turn that fails because Claude is overloaded (529), has an API 5xx, or hits a Cloudflare 403/5xx HTML page is now retried in the same session at 5s, 15s and 45s, with a status line while it waits.
    • classifyClaudeTransient is narrow. It never matches auth errors, quota or rate limits (the existing quota-wait handles those), a lost session, or a cancel.
    • Stopping during the wait cancels the retry.
    • If every retry fails, the turn fails with a plain message plus the original error.
  • Cold-resume confirm: sending to a Claude thread idle for over an hour with ≥50k context tokens shows "Send anyway" or "Compact first" (the existing compact action), instead of only a passive chip. A new confirmColdClaudeResume setting, on by default, turns it off.

Known tradeoffs:

  • A retry resends the prompt, so Claude's own session log gets the user line twice. Solenta's transcript shows it once.
  • The ack watchdog isn't re-armed on a retry send. If the CLI hangs after a retry, the stall watchdog catches it.
  • A result that reports success but carries a transient API error now fails after the retries are used up. Before, it landed as a done turn showing the raw error.

Tests: new electron/test/claude-transient-retry.test.js, which uses fake timers to cover stop during backoff, non-transient errors never retrying, and one user message in the transcript. Plus confirm tests in test/composerSlashActions.test.tsx. 72 of 72 pass.

🤖 Generated with Claude Code

Willem and others added 2 commits November 13, 2026 18:00
When a Claude turn fails with a transient upstream error (529 overloaded,
API 5xx, a Cloudflare 403/5xx HTML page), Solenta now resends the same
turn on the same live Claude session up to three times, waiting 5s, 15s
and 45s. A single status line ("Claude is overloaded, retrying in 15s…")
shows while it waits, and the CLI's raw "API Error" bubble no longer
lands in the transcript. Stop cancels a pending retry. If every retry
fails, the turn fails with a plain-language message plus the original
error detail.

Auth errors, quota and rate limits (left to quota wait), lost sessions
and cancels never retry. Failed attempts still record their usage but
do not count as extra turns.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sending into a Claude thread idle for over an hour with 50k+ tokens of
context re-reads the whole context without the prompt cache. The send
now waits on a small inline confirm in the composer: Compact first
(the existing /compact action, draft kept), Send anyway, Send and don't
ask again, or Cancel. It uses the same conditions as the existing
"Compact first" chip, which stays as it was. Pressing send again while
the confirm is up asks again instead of sending twice.

"Don't ask again" persists a new confirmColdClaudeResume setting
(default on), which can be turned back on in Settings > General.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T17:59:57.656640Z 97b0ecb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 97b0ecb0f5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread electron/runner-provider-claude.js Resolved
Launch argv was built once, before a first turn had a session, so a CLI
that exited during the retry backoff came back as a fresh conversation.
The argv is now rebuilt with the session the failed result reported
before the retry tries the live process, so both the retry's own spawn
and the exit handler's respawn resume it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@currentbits
currentbits merged commit d6a0200 into main Nov 13, 2026
14 checks passed
@currentbits
currentbits deleted the coder/claude-retry-transient-failures-and-conf-ad6453 branch November 13, 2026 18:43
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