Description
When using a multi-agent setup with no agent named main, hook and cron lanes fail because they resolve auth from ~/.openclaw/agents/main/agent/auth-profiles.json instead of using the agent marked default: true in config.
Config
{
"agents": {
"list": [
{ "id": "dev", "name": "Dev Assistant" },
{ "id": "exec", "default": true, "name": "Executive Life Assistant" }
]
}
}
No main agent exists. exec is marked as default: true.
Error
FailoverError: No API key found for provider "openai-codex". Auth store: /home/openclaw/.openclaw/agents/main/agent/auth-profiles.json (agentDir: /home/openclaw/.openclaw/agents/main/agent). Configure auth for this agent (openclaw agents add <id>) or copy auth-profiles.json from the main agentDir.
This affects multiple lanes:
lane=cron
lane=session:agent:exec:hook:gmail:*
lane=main
lane=session:agent:exec:main
Expected Behavior
When no main agent is defined, auth resolution should fall back to the agent marked default: true (in this case exec), not to a hardcoded agents/main/agent/ path.
Workaround
Symlink ~/.openclaw/agents/main/agent/auth-profiles.json → the default agent's auth file.
Version
OpenClaw 2026.2.21-2
Description
When using a multi-agent setup with no agent named
main, hook and cron lanes fail because they resolve auth from~/.openclaw/agents/main/agent/auth-profiles.jsoninstead of using the agent markeddefault: truein config.Config
{ "agents": { "list": [ { "id": "dev", "name": "Dev Assistant" }, { "id": "exec", "default": true, "name": "Executive Life Assistant" } ] } }No
mainagent exists.execis marked asdefault: true.Error
This affects multiple lanes:
lane=cronlane=session:agent:exec:hook:gmail:*lane=mainlane=session:agent:exec:mainExpected Behavior
When no
mainagent is defined, auth resolution should fall back to the agent markeddefault: true(in this caseexec), not to a hardcodedagents/main/agent/path.Workaround
Symlink
~/.openclaw/agents/main/agent/auth-profiles.json→ the default agent's auth file.Version
OpenClaw 2026.2.21-2