Has anybody seen this issue :
Agent failed before reply: No API key found for provider "anthropic". Auth store: /Users/fred/.openclaw/agents/main/agent/auth-profiles.json (agentDir: /Users/fred/.openclaw/agents/main/agent). Configure auth for this agent (openclaw agents add <id>) or copy auth-profiles.json from the main agentDir.
Logs: openclaw logs --follow
#Error Message
1 messages · Page 1 of 1 (latest)
Yep — that error basically means the agent that’s running can’t resolve any Anthropic credentials from the place it expects (your auth-profiles.json for that agent, or env vars that the Gateway actually sees).
A quick checklist that fixes ~90% of these:
- Version + sanity check
openclaw --version
openclaw models status
(If you paste output, please redact tokens/keys.)
- Most common cause on macOS: Gateway runs as a service and doesn’t see your shell env
If you setANTHROPIC_API_KEYin~/.zshrc/terminal, launchd won’t inherit it. Put it in:
~/.openclaw/.env(recommended), then:openclaw gateway restart
openclaw models status
- Auth is per-agent
Your error points at:
~/.openclaw/agents/main/agent/auth-profiles.json
So make sure you’re configuring that agent (especially if you have multiple agents/profiles/remote mode). Running openclaw models auth … on your laptop won’t help if the Gateway is on another machine.
- If you’re using Claude subscription auth (setup-token) instead of an API key
Generate/paste a setup-token for Anthropic on the gateway host (see FAQ entry for the exact commands).
Docs: https://docs.openclaw.ai/help/faq#where-do-i-find-an-anthropic-setup-token
If you reply with openclaw --version + the relevant lines from openclaw models status, I can tell which of the above you’re hitting.
Thanks guys it up and working I really appreciate it