Skip to content

[Feature] Make ANNOUNCE_EXPIRY_MS configurable to support long-running subagent workflows #27758

Description

@kevinheinrichs

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

  1. Make it configurable: Introduce a new configuration option in openclaw.json, for example:
    {
      "agents": {
        "subagents": {
          "announceExpiryMinutes": 60
        }
      }
    }
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions