Skip to content

Daily "Error: Token refresh failed: 400" for Anthropic "Claude Pro/Max" subscription #14083

Closed as duplicate

Description

@SlimG

Description

Every day for the last weeks of using OpenCode I've been met with the error "Error: Token refresh failed: 400" in the morning when prompting.

I work around this by removing Anthropic as provider in the GUI, and re-adding it.

My guess is that the token that OpenCode receives from Claude expire without OpenCode requesting a new one in time.

Plugins

None

OpenCode version

1.2.6

Steps to reproduce

  1. Add Anthropic as provider with "Claude Pro/Max" subcription.
  2. Many hours later or next day receive "Error: Token refresh failed: 400" when prompting.

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

None

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Feb 18, 2026
  2. github-actions commented on Feb 18, 2026

    @github-actions
    Contributor

    This issue appears to be a duplicate of existing issues related to Anthropic OAuth token expiration:

    Both report the same symptom: receiving a 'Token refresh failed: 400' error after periods of inactivity (hours/overnight), with the same workaround of re-adding the provider.

    Please check these issues first to see if your situation is already covered. If you believe your case is different from these, please clarify what makes it unique in a comment here.

  3. SlimG commented on Feb 18, 2026

    @SlimG
    Author

    Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)windows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions