-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Open
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)
Description
Description
After sending the initial prompt, the system occasionally returns:
Error: Token refresh failed: 400
A couple of seconds later, the request goes through successfully.
Environment
- Model: Claude Opus 4.6 (anthropic/claude-opus-4-6)
- Subscription: Anthropic Max
- Behavior: Intermittent — likely occurs when the auth token has expired and needs refreshing
Steps to Reproduce
- Start a new OpenCode session with Claude Opus 4.6 via Anthropic Max
- Send a prompt (particularly after the session has been idle / token has expired)
- Observe
Token refresh failed: 400error - Wait ~2 seconds — the request then succeeds on retry
Expected Behavior
Token refresh should succeed silently without surfacing an error to the user.
Actual Behavior
When the token needs refreshing, the first refresh attempt fails with a 400 status. The automatic retry succeeds shortly after. This does not happen on every prompt — only when the system needs to refresh an expired token.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)