Repository navigation
Claude sign-in: one click to sign in again when it ran out - #217
Merged
Merged
Conversation
When Claude Code's sign-in runs out, `claude auth status` still says "logged in", so Settings stayed green and the chat only offered a retry that failed the same way. A run that ends over the sign-in now marks Claude as signed out (kept across restarts) until a run gets an answer, a sign-in finishes, or Claude Code writes new credentials. - A banner above every page says Claude is signed out, with Sign in again and the steps right there; it goes once Claude works again. - The failed chat turn signs in inline and continues by itself. - From a phone (Godmode Cloud, remote access) the steps are open the sign-in page and paste the code; only the computer's owner may do it through the cloud. - One notification per episode; the doctor's Claude login row turns red. - A refused Anthropic API key points to Integrations instead.
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.
What
When Claude Code's sign-in runs out ("Failed to authenticate: OAuth session expired and could not be refreshed"), Godmode now says so everywhere and fixes it with one click:
claude auth statusstill says "logged in" when the stored sign-in ran out).How
services/claudeLogin.tskeeps a "signed out" mark (stored inmeta, survives restarts). A run that fails with the sign-in error sets it; a run that gets an answer from Claude, a finished sign-in, or new credentials written by Claude Code (keychain item /.credentials.jsonchanged, e.g. a sign-in in a terminal) clear it. Changes go out as aclaude.loginevent.POST|DELETE /api/doctor/claude-loginandPOST /api/doctor/claude-login/codeare owner-only instead of refused.useClaudeLoginhook andClaudeSignInStepspanel used by the banner, the chat turn end and the Settings checklist.Screenshots
Taken in a sandbox with a fake signed-out Claude: signed out (banner + chat), signing in with the paste-code fallback, signed in and the chat continued by itself, and the phone view (open page + paste code).
Tests
claude-login.test.ts: mark set once, cleared by a working run, by a sign-in and by new credentials; stored in meta.runner.test.ts: an expired sign-in sets the mark and notifies once; the next answer clears it.cloud-scope.test.ts: only the owner may start or finish the sign-in from the cloud.