-
-
Notifications
You must be signed in to change notification settings - Fork 52.9k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug
Running openclaw onboard --install-daemon --non-interactive --accept-risk --anthropic-api-key <key> completes successfully, but the Anthropic API key is not written to the agent's auth-profiles.json file.
This causes the gateway to fail on every inbound message with:
No API key found for provider "anthropic". Auth store: ~/.openclaw/agents/main/agent/auth-profiles.json
(agentDir: ~/.openclaw/agents/main/agent). Configure auth for this agent (openclaw agents add <id>)
or copy auth-profiles.json from the main agentDir.
Steps to reproduce
- Fresh macOS VM with Node.js 22, pnpm installed
- Clone and build openclaw (
pnpm install && pnpm build) - Run onboarding:
pnpm openclaw onboard --install-daemon --non-interactive --accept-risk --anthropic-api-key sk-ant-...
- Onboarding completes successfully, gateway starts
- Send a WhatsApp message → agent fails with "No API key found"
Expected behavior
The --anthropic-api-key flag should persist the key to ~/.openclaw/agents/main/agent/auth-profiles.json in the correct format:
{
"version": 1,
"profiles": {
"anthropic:default": {
"type": "api_key",
"provider": "anthropic",
"key": "sk-ant-..."
}
}
}Workaround
Manually create the file:
mkdir -p ~/.openclaw/agents/main/agent
cat > ~/.openclaw/agents/main/agent/auth-profiles.json << 'JSON'
{
"version": 1,
"profiles": {
"anthropic:default": {
"type": "api_key",
"provider": "anthropic",
"key": "YOUR_KEY_HERE"
}
}
}
JSONThen restart the gateway: launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway
Environment
- OpenClaw 2026.2.2-3
- macOS Tahoe (VM via Lume)
- Node.js 22.22.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working