Skip to content

Sub-agent startup silence: no first-progress signal, aborted runs appear as hangs #58776

Description

@SmithU64

Problem

Sub-agent runs can sit in running state indefinitely with zero output. From the parent's perspective this is indistinguishable from a healthy slow start. The actual cause is openclaw:prompt-error with error: "aborted" being mapped to { status: "timeout" } — losing the distinction between startup abort and mid-run abort.

We observed 70 failing transcripts matching this pattern across agents (62 run_aborted, 8 startup_aborted, 6 empty_output_startup).

Root cause

The embedded run handler emits only three lifecycle phases: start, end, error. There is no first-progress signal, so the parent cannot distinguish a working child from a silently aborting one. A 45s abort looks identical to a 90-min hang until the wall-clock timeout fires.

Proposed addition (additive, non-breaking)

Two new lifecycle event phases:

  1. first-progress — emitted on first qualifying tool call or non-empty assistant text
  2. startup-failed — typed failure with reason: startup_aborted, startup_timeout, empty_output_startup, auth_failed

Both are additive. Existing listeners use explicit string comparisons and already silently drop unknown phase strings — confirmed from source inspection.

Update safety

  • Additive only — no existing consumer changes required
  • No breakage on update — unknown phases are silently dropped
  • Plugin-SDK boundary not crossed
  • External workspace watchdog (polling-based) works as interim without core changes

Evidence

70 failing transcripts captured from live corpus. Representative fixture: chunker/sessions/8cb62941. Full design with 20 test cases and 4-phase rollout strategy available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions