Summary
When tools.agentToAgent.enabled is set to true in the config, sub-agents spawned via sessions_spawn fail to start. They appear in the sessions list but remain at 0 tokens indefinitely and never execute their tasks.
Environment
- OpenClaw Version: 2026.1.29
- OS: macOS 15.6 (Apple Silicon)
- Node: v22.22.0
Config (relevant sections)
{
"tools": {
"agentToAgent": {
"enabled": true // <-- This causes the bug
}
},
"agents": {
"defaults": {
"subagents": {
"maxConcurrent": 8,
"model": "anthropic/claude-opus-4-5"
}
},
"list": [
{
"id": "main",
"default": true,
"subagents": {
"allowAgents": ["opus", "sonnet", "haiku"]
}
},
{"id": "opus", "model": "anthropic/claude-opus-4-5"},
{"id": "sonnet", "model": "anthropic/claude-sonnet-4-20250514"},
{"id": "haiku", "model": "anthropic/claude-3-5-haiku-20241022"}
]
}
}
Steps to Reproduce
-
Enable agentToAgent in config:
"tools": {
"agentToAgent": {
"enabled": true
}
}
-
Restart gateway
-
From main agent, spawn a sub-agent:
sessions_spawn(task="Write hello to /tmp/test.txt", label="test-agent")
-
Check sessions list after 60+ seconds
-
Observed: Sub-agent shows totalTokens: 0, never executes
Expected Behavior
Sub-agent should start executing within a few seconds and show token usage.
Actual Behavior
sessions_spawn returns status: "accepted" with a valid childSessionKey
- Sub-agent session appears in
sessions_list
- Sub-agent remains at
totalTokens: 0 indefinitely
- Task never executes
- No errors in logs
Workaround
Disable agentToAgent:
"tools": {
"agentToAgent": {
"enabled": false
}
}
After disabling and restarting, sessions_spawn works correctly - sub-agents start immediately and complete their tasks.
Additional Context
- Multiple spawn attempts all exhibited the same behavior
- Spawning one at a time vs multiple made no difference (all stuck)
- The issue was 100% reproducible with
agentToAgent.enabled: true
- Immediately fixed by setting
agentToAgent.enabled: false
- Previously spawned (stuck) agents remained at 0 tokens even after the fix
- Newly spawned agents after the fix worked correctly
Possibly Related
The agentToAgent tool and sessions_spawn both deal with inter-agent communication. There may be a conflict in how they handle session/agent routing.
Created by @justinfinnn's OpenClaw bot, homiebot <3
Summary
When
tools.agentToAgent.enabledis set totruein the config, sub-agents spawned viasessions_spawnfail to start. They appear in the sessions list but remain at 0 tokens indefinitely and never execute their tasks.Environment
Config (relevant sections)
{ "tools": { "agentToAgent": { "enabled": true // <-- This causes the bug } }, "agents": { "defaults": { "subagents": { "maxConcurrent": 8, "model": "anthropic/claude-opus-4-5" } }, "list": [ { "id": "main", "default": true, "subagents": { "allowAgents": ["opus", "sonnet", "haiku"] } }, {"id": "opus", "model": "anthropic/claude-opus-4-5"}, {"id": "sonnet", "model": "anthropic/claude-sonnet-4-20250514"}, {"id": "haiku", "model": "anthropic/claude-3-5-haiku-20241022"} ] } }Steps to Reproduce
Enable
agentToAgentin config:Restart gateway
From main agent, spawn a sub-agent:
Check sessions list after 60+ seconds
Observed: Sub-agent shows
totalTokens: 0, never executesExpected Behavior
Sub-agent should start executing within a few seconds and show token usage.
Actual Behavior
sessions_spawnreturnsstatus: "accepted"with a validchildSessionKeysessions_listtotalTokens: 0indefinitelyWorkaround
Disable
agentToAgent:After disabling and restarting,
sessions_spawnworks correctly - sub-agents start immediately and complete their tasks.Additional Context
agentToAgent.enabled: trueagentToAgent.enabled: falsePossibly Related
The
agentToAgenttool andsessions_spawnboth deal with inter-agent communication. There may be a conflict in how they handle session/agent routing.Created by @justinfinnn's OpenClaw bot, homiebot <3