Skip to main content
Watch: I Built an AI App Without Leaving Databricks

OpenCode error

OpenCode: This credential is only authorized for use with Claude Code and cannot...

Error message
This credential is only authorized for use with Claude Code and cannot be used for other API requests.

Status: By designLast verified 3 documented fixes5 sources

What it means

Anthropic rejected a Claude Pro/Max subscription credential because it was used outside Claude Code. OpenCode's providers docs say plugins exist that let you use Claude Pro/Max models with OpenCode, and that "Anthropic explicitly prohibits this."

Causes

  • Signing in to Anthropic with Claude Pro/Max OAuth through the opencode-anthropic-auth plugin (#10982, reported on v1.1.39).
  • Anthropic prohibits using Claude Pro/Max subscriptions in third-party tools (official providers docs).

How to fix it

  1. Fix 1.

    For the January 2026 regression reported on v1.1.39, a maintainer replied that it was fixed in "1.1.40" (the v1.1.40 release notes include "Bump plugins").

    Terminal
    opencode upgrade
  2. Fix 2.

    As of v1.3.0, OpenCode no longer ships these plugins (release notes: "Removed anthropic oauth plugin", PR #18186). Use an Anthropic API key instead: run /connect, select Anthropic, then choose "Manually enter API Key".

    Slash command
    /connect
  3. Fix 3.

    The docs list subscriptions that work in OpenCode with zero setup: ChatGPT Plus, GitHub Copilot and GitLab Duo.

More OpenCode errors

All 17 OpenCode errors

FAQ

What does "This credential is only authorized for use with Claude Code and cannot..." mean in OpenCode?

Anthropic rejected a Claude Pro/Max subscription credential because it was used outside Claude Code. OpenCode's providers docs say plugins exist that let you use Claude Pro/Max models with OpenCode, and that "Anthropic explicitly prohibits this."

How do I fix "This credential is only authorized for use with Claude Code and cannot..."?

There are 3 documented fixes. Start with the first: For the January 2026 regression reported on v1.1.39, a maintainer replied that it was fixed in "1.1.40" (the v1.1.40 release notes include "Bump plugins").

Is this OpenCode error fixed?

Status: By design. Expected behavior, not a bug. The documented fixes change the setup that triggers it. Affected versions: v1.1.39 regression fixed in v1.1.40. The bundled Anthropic OAuth plugin was removed in v1.3.0 (2026-03-22).

Sources

Last verified against 5 sources: official docs, maintainer replies and release notes.

Newsletter

Fixes for the tools you use, weekly

One email per week. New coding agent releases, what broke, and how developers are working around it.