Repository navigation
Fix 1 problem from a runner's log (runner) - #215
Merged
danielehrhardt merged 1 commit intoOct 20, 2026
Merged
Conversation
Claude Code now ends a run whose sign-in ran out with "Failed to authenticate: OAuth session expired and could not be refreshed". The sign-in check only knew "OAuth token has expired", so the chat offered a plain retry that fails the same way. Both the runner and the chat's turn end now read it as a sign-in problem; a 403 refusal stays a retry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When Claude's sign-in expires, the chat now tells the human to sign Claude in again instead of only offering "Try again". The fix is committed as
a13cbd0on the task branch, which already has the latestorigin/main(no conflicts).What happened
On 2026-10-19 between 12:28Z and 12:32Z, three chat runs on a runner failed with Claude Code's error "Failed to authenticate: OAuth session expired and could not be refreshed". All three were in the same chat, and each failed in about 120 ms without using any tokens. The run at 12:43Z worked again once Claude was signed in again.
The expired sign-in is not a code bug. Claude's login on that computer ran out and only signing in again fixes it, so that part needs no change.
Godmode's handling of it was a bug. Claude Code worded this error in a new way, and Godmode's sign-in check only knew the older wording "OAuth token has expired":
AUTH_PROBLEMinpackages/core/src/runner/runner.tsdidn't treat it as a sign-in problem, so the run kept Claude's raw error instead of "Claude Code is not signed in … log in".runEndOfinpackages/shared/src/retry.tsdidn't classify it asautheither. So the chat showed a plain "Try again" instead of "Sign Claude in again" with the "Open System" button.Changes
packages/core/src/runner/runner.tsAUTH_PROBLEMnow matchesoauth (token|session) (has )?expired.Failed to authenticate.andFailed to authenticate:.packages/shared/src/retry.ts:runEndOfreads a raw "Failed to authenticate: OAuth session expired …" asauthas well. This covers runs already saved with the raw error and runners that haven't updated yet.services/resume.tsstill handles it.AUTH_EXPIREDintest/fixtures/fake-claude.ts.frame.test.ts: the raw expired-session text maps toauth, and the 403 text stays unclassified.Checks
pnpm -r typecheckreported no errors.bun test test/runner.test.ts test/frame.test.ts test/resume.test.tsinpackages/core: 59 pass, 0 fail.One thing this doesn't fix: the "Claude login" health check uses
claude auth status, which may still say "logged in" while the session can't be refreshed. A failed run is still where an expired session first shows up.Nothing for Daniel to do: the runner was signed in again on 2026-10-19 and its later runs worked.
Task #61 · done by Self-Healer with Godmode Bot