Skip to content

Sub-agent announcement delivery unreliable — results silently lost #22273

@nikod-kindo

Description

@nikod-kindo

Problem

When a sub-agent is spawned via sessions_spawn (e.g., for deep research), the completion announcement sometimes fails to deliver back to the requester session. The sub-agent completes successfully and writes its output, but the originating session never receives the result.

This means the user has to manually ask "did it come back?" and the agent has to go hunting through the session store and filesystem to find the output — defeating the purpose of the push-based announce mechanism.

Expected Behavior

When a sub-agent completes, deliverSubagentAnnouncement() should reliably deliver the result to the requester session. If delivery fails, it should retry and/or surface the failure visibly rather than silently dropping it.

Observed Behavior

  • Sub-agent spawned from a Slack thread session (agent:main:main:thread:<ts>)
  • Sub-agent completes, writes output file
  • No announcement received in the requester session
  • subagents list from the requester session shows 0 active and 0 recent
  • The sub-agent session exists in the session store but the requester session has no record of it

Context

We're aware of the prior fixes:

These fixes are in our version (2026.2.19), but the issue persists. It's possible the announce is being delivered to a different session context than expected (e.g., main session vs. thread session), or the delivery is timing out and the retry isn't working.

Reproduction

  1. From a Slack DM thread session, spawn a sub-agent via sessions_spawn (e.g., deep research task)
  2. Wait for the sub-agent to complete (~10-20 minutes)
  3. Check if the requester session received the announcement
  4. In our case, the announcement was never received — had to manually locate the output

Environment

  • OpenClaw 2026.2.19
  • macOS arm64, Node 22.22.0
  • Channel: Slack (socket mode)
  • Sub-agent was spawned from a thread session (agent:main:main:thread:<ts>)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions