Description
Currently, the ANNOUNCE_EXPIRY_MS constant in src/agents/subagent-registry.ts is hardcoded to 5 minutes:
const ANNOUNCE_EXPIRY_MS = 5 * 60_000; // 5 minutes
This constant acts as a 'give up' guard for announcing subagent results back to the requester. If a subagent takes longer to complete or if the announcement is delayed (e.g., during complex development tasks or waiting for CI pipelines), OpenClaw 'gives up' after 5 minutes with the following log message:
Subagent announce give up (expiry) (endedAgo=...)
Impact
For real-world workflows involving complex DEV agents or long CI checks, this 5-minute window is often too short. When the expiry is hit, the results are never announced back to the requester (e.g., the ORC agent or the user in a chat), causing the entire workflow to hang in a 'stuck' state even though the task might have completed successfully in the background.
Suggested Solution
- Make it configurable: Introduce a new configuration option in
openclaw.json, for example:
{
"agents": {
"subagents": {
"announceExpiryMinutes": 60
}
}
}
- Increase Default: Consider increasing the default value from 5 minutes to 60 minutes or tying it to
archiveAfterMinutes.
Environment
- OpenClaw Version: 2026.2.25
- File affected:
src/agents/subagent-registry.ts
This analysis was performed by Kevin Heinrichs after diagnosing hung workflows in a production-like environment.
Ref: https://github.com/openclaw/openclaw/issues/new
Description
Currently, the
ANNOUNCE_EXPIRY_MSconstant insrc/agents/subagent-registry.tsis hardcoded to 5 minutes:This constant acts as a 'give up' guard for announcing subagent results back to the requester. If a subagent takes longer to complete or if the announcement is delayed (e.g., during complex development tasks or waiting for CI pipelines), OpenClaw 'gives up' after 5 minutes with the following log message:
Impact
For real-world workflows involving complex
DEVagents or long CI checks, this 5-minute window is often too short. When the expiry is hit, the results are never announced back to the requester (e.g., theORCagent or the user in a chat), causing the entire workflow to hang in a 'stuck' state even though the task might have completed successfully in the background.Suggested Solution
openclaw.json, for example:{ "agents": { "subagents": { "announceExpiryMinutes": 60 } } }archiveAfterMinutes.Environment
src/agents/subagent-registry.tsThis analysis was performed by Kevin Heinrichs after diagnosing hung workflows in a production-like environment.
Ref: https://github.com/openclaw/openclaw/issues/new