openclaw - 💡(How to fix) Fix Anthropic Claude CLI auth succeeds, but models auth list/status still report Anthropic auth missing

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

openclaw models auth login --provider anthropic --method cli succeeds and writes a Claude CLI OAuth profile, and Anthropic model execution works, but OpenClaw's auth inspection commands still act like Anthropic auth is missing.

This creates an inconsistent state:

  • CLI auth login says success
  • raw auth store contains the new profile
  • openclaw agent can execute anthropic/... successfully
  • but openclaw models auth list --provider anthropic shows no profiles
  • and openclaw models status says Anthropic auth is missing

Root Cause

This is especially confusing because the command reports success and execution succeeds, yet the operator-facing status commands contradict both.

Code Example

openclaw models auth login --provider anthropic --method cli

---

Auth profile: anthropic:claude-cli (claude-cli/oauth)
Default model available: anthropic/claude-opus-4-7 (use --set-default to apply)
Claude CLI auth detected; kept Anthropic model refs and selected the local Claude CLI runtime.

---

openclaw models auth list --provider anthropic

---

Agent: main
Auth state file: ~/.openclaw/agents/main/agent/auth-state.json
Provider: anthropic
Profiles: (none)

---

"anthropic:claude-cli": {
  "type": "oauth",
  "provider": "claude-cli",
  ...
}

---

["anthropic:claude-cli", "anthropic:alfred"]

---

openclaw models status

---

Missing auth
- anthropic Run `openclaw models auth login --provider anthropic`, `openclaw configure`, or set an API key env var.

OAuth/token status
- none

---

OPENCLAW_MODEL='anthropic/claude-sonnet-4-6' openclaw agent --local --session-id verify-anthropic-session-pin --message 'Reply with OK only' --thinking off

---

OK
RAW_BUFFERClick to expand / collapse

Summary

openclaw models auth login --provider anthropic --method cli succeeds and writes a Claude CLI OAuth profile, and Anthropic model execution works, but OpenClaw's auth inspection commands still act like Anthropic auth is missing.

This creates an inconsistent state:

  • CLI auth login says success
  • raw auth store contains the new profile
  • openclaw agent can execute anthropic/... successfully
  • but openclaw models auth list --provider anthropic shows no profiles
  • and openclaw models status says Anthropic auth is missing

Environment

  • OpenClaw CLI banner: 2026.5.6
  • Repo commit checked locally: d4e04f33a6

Reproduction

Run:

openclaw models auth login --provider anthropic --method cli

Observed success output included:

Auth profile: anthropic:claude-cli (claude-cli/oauth)
Default model available: anthropic/claude-opus-4-7 (use --set-default to apply)
Claude CLI auth detected; kept Anthropic model refs and selected the local Claude CLI runtime.

After that, inspect auth list:

openclaw models auth list --provider anthropic

Observed:

Agent: main
Auth state file: ~/.openclaw/agents/main/agent/auth-state.json
Provider: anthropic
Profiles: (none)

Inspect the raw auth store:

"anthropic:claude-cli": {
  "type": "oauth",
  "provider": "claude-cli",
  ...
}

Inspect config changes after login:

  • auth.order.anthropic became:
["anthropic:claude-cli", "anthropic:alfred"]
  • new Anthropic models were added under agents.defaults.models, e.g.
    • anthropic/claude-opus-4-7
    • anthropic/claude-opus-4-6
    • anthropic/claude-opus-4-5
    • anthropic/claude-sonnet-4-5
    • anthropic/claude-haiku-4-5

Then check overall model status:

openclaw models status

Observed:

Missing auth
- anthropic Run `openclaw models auth login --provider anthropic`, `openclaw configure`, or set an API key env var.

OAuth/token status
- none

But execution works:

OPENCLAW_MODEL='anthropic/claude-sonnet-4-6' openclaw agent --local --session-id verify-anthropic-session-pin --message 'Reply with OK only' --thinking off

Observed output:

OK

Expected behavior

After successful Claude CLI auth login, one of these should happen consistently:

  1. openclaw models auth list --provider anthropic should show the usable Claude CLI auth profile, and openclaw models status should reflect Anthropic auth as available.
  2. If the profile is intentionally stored under provider: "claude-cli", the anthropic-facing status/listing commands should still resolve it correctly for canonical anthropic/* model refs when auth.order.anthropic points to that profile.

Actual behavior

  • login succeeds
  • profile is written
  • auth order is updated
  • execution works
  • status/listing still say Anthropic auth is missing

Why this looks like a bug

The docs and config model encourage canonical Anthropic refs (anthropic/*) plus the CLI runtime split (claude-cli). The inspection layer appears not to follow that same mapping.

This is especially confusing because the command reports success and execution succeeds, yet the operator-facing status commands contradict both.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

After successful Claude CLI auth login, one of these should happen consistently:

  1. openclaw models auth list --provider anthropic should show the usable Claude CLI auth profile, and openclaw models status should reflect Anthropic auth as available.
  2. If the profile is intentionally stored under provider: "claude-cli", the anthropic-facing status/listing commands should still resolve it correctly for canonical anthropic/* model refs when auth.order.anthropic points to that profile.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING