-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Parent subagent task and TaskFlow remain stale_running after child becomes lost #92285
Copy link
Copy link
Open
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, 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.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, 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.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
Behavior bug: task registry and TaskFlow states become inconsistent without crashing.
While running a full-agent child task through an orchestrator, the backing child task became terminal with
status: lostanderror: backing session missing.However, the mirrored parent subagent task and related TaskFlow remain marked as
running. Attempting to cancel the parent task reportsTask is already terminal, despite the task continuing to appear in the running-task list.Restarting the gateway does not reconcile these stale records.
Steps to reproduce
I have observed this once, so the issue may be intermittent.
Start a full-agent child task through an orchestrator using
sessions_spawn.Allow the child to perform a longer-running task involving file changes, npm commands, build validation, and temporary local-server testing.
Wait until the backing child session terminates, disappears, or becomes
lost.Inspect the task registry:
Observe that:
lost.backing session missing.running.running.stale_running.Attempt to cancel the parent task:
Observe that cancellation reports:
Restart the OpenClaw gateway.
Run the task-list and audit commands again.
Observe that the parent task and TaskFlow remain
stale_running.Expected behavior
When a backing child task becomes terminal or its session is missing, OpenClaw should reconcile the mirrored parent task and related TaskFlow into an appropriate terminal state, such as:
lostfailedcancelledtimed_outneeds_reconciliationAlternatively,
openclaw tasks cancelor task maintenance should provide a supported way to safely reconcile the inconsistent records.A task reported as already terminal should not continue appearing as
running.Actual behavior
backing session missing.running.running.stale_running.OpenClaw version
2026.6.5
Operating system
Windows 11
Install method
npm global installation
Model
Poolside: Laguna M.1
Provider / routing chain
OpenClaw Gateway (local, 127.0.0.1:18789) → OpenRouter → poolside/laguna-m.1:free.
Additional provider/model setup details
The failure concerns OpenClaw's local subagent task-registry reconciliation after the model request completed. No additional proxy or external gateway is used.
Logs, screenshots, and evidence
Impact and severity
This makes task status unreliable for multi-agent orchestration.
The orchestrator may believe that a mutating writer remains active indefinitely. Waiting blocks legitimate continuation, while starting another writer risks duplicate work or conflicting project changes.
I currently have to keep the affected project locked and treat it as requiring manual reconciliation.
Additional information
Related issues
This appears related to the following closed issues:
tasks maintenance --applyis a no-op forlost(backing-session-missing) andstale_runningtask records #72884 —tasks maintenance --applydoes not reconcile lost or stale-running recordsThe issue is still reproducible on OpenClaw
2026.6.5under Windows.