Skip to content

Anthropic setup-token auth broken after 2026.2.17 update — 'OAuth authentication is currently not supported' #19938

Description

@navendugoyal19

Bug Report

Environment

  • OpenClaw version: 2026.2.17 (4134875)
  • OS: macOS (Darwin 25.3.0)
  • Auth method: Claude Max subscription via claude setup-token

Description

After updating to OpenClaw 2026.2.17, Anthropic setup-token authentication no longer works. The gateway falls through to fallback providers (kimi-coding) on every request. This was working before the update.

Steps to Reproduce

  1. Run claude setup-token to generate a token (sk-ant-oat01-...)
  2. Run openclaw models auth setup-token --provider anthropic
  3. Verify token is stored in ~/.openclaw/agents/main/agent/auth-profiles.json as "type": "token"
  4. Send a request through the gateway targeting anthropic/claude-opus-4-6
  5. Request fails with auth error, falls through to fallback provider

Configuration

// openclaw.json — models.providers.anthropic
{
  "baseUrl": "https://api.anthropic.com",
  "api": "anthropic-messages"
}

// auth-profiles.json
{
  "anthropic:default": {
    "type": "token",
    "provider": "anthropic",
    "token": "sk-ant-oat01-..."
  }
}

Observed Behavior

Direct curl test against Anthropic API with the setup-token:

# As x-api-key header:
{"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}

# As Authorization: Bearer header:
{"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."}}

openclaw models status shows both anthropic profiles cycling through auth failures and cooldowns while other providers (kimi-coding, openai-codex, openrouter) work fine.

Additional Issue: Symbol(clack:cancel) corruption

Possibly related — cancelling the openclaw configure wizard mid-flow writes the literal string "Symbol(clack:cancel)" into:

  • agents/main/agent/models.jsonapiKey field
  • agents/main/agent/auth.jsonkey field
  • agents/main/agent/auth-profiles.jsontoken field

The gateway then propagates this corrupted value on every restart, overwriting manual fixes. This prevents clean recovery from the auth issue.

Expected Behavior

Setup-token auth should work as documented at https://docs.openclaw.ai/providers/anthropic#option-b-claude-setup-token and as confirmed working in #9938 (OpenClaw 2026.2.6).

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions