Skip to content

Bug: sessions_yield subagent completion delivered as passive context — LLM can silently ignore it, breaking orchestration loops #92116

Description

@lileilei-camera

Environment

  • OpenClaw Gateway: 2026.6.5
  • oh-my-openclaw: v0.21.3
  • Model: deepseek-art/deepseek-v4-pro
  • Scenario: Delegate persona using sessions_yield to orchestrate subagents

Problem

When a parent agent uses sessions_yield to wait for subagent completions, the completion is delivered by injecting it as passive prompt context into the parent agent's next turn. The parent agent is expected to read this context, recognize that a subagent has completed, and take appropriate action (verify results → update plan → continue or finish).

However, LLMs inherently treat prompt context as reference material that may be acted upon or ignored — there is no mechanism forcing the parent agent to process the completion event. Whether the parent agent picks up the completion and continues the orchestration loop, or ignores it and produces unrelated output, is entirely determined by the LLM's non-deterministic behavior on that specific turn.

This means a multi-agent orchestration loop (subagent-complete → parent-review → continue/end) can silently break at any turn, with no error, no recovery path, and no indication that anything went wrong.

Diagnostic Evidence

We injected 5 console.log diagnostic points into sendSubagentAnnounceDirectly (in subagent-announce-delivery module) to trace the delivery path:

Log Tag Purpose
subagent_announce_active_check Verify isActive after resolveRequesterSessionActivity()
subagent_announce_steer_attempt Entry into steer path when isActive==true
subagent_announce_steer_result After resolveActiveWakeWithRetries()
subagent_announce_direct_delivery Entry into direct path, shouldDeliver / hasChannel flags
subagent_announce_result Final result from try/catch return

Log from a subagent completion event:

12:51:04 subagent_announce_active_check
 isActive: false ← correct after sessions_yield
 sessionId: 039913d5-...

12:51:04 subagent_announce_direct_delivery
 shouldDeliver: false ← dashboard session, no external channel
 hasChannel: false

12:51:10 subagent_announce_result
 path: "direct" ← correct path taken
 delivered: true ← delivery succeeded

The delivery path is correct: sessions_yield correctly sets the parent session to non-active, the direct delivery path is taken, and delivered: true confirms the completion message was injected into the parent session's prompt context.

Observed parent agent behavior (3 attempts, same scenario):

Time Subagent Parent behavior Outcome
12:51 P3 completed Output "I'll wait for P3" → agent_end ❌ Ignored completion, broke loop
14:45 Subagent completed exec×4 verify → sessions_yield ✅ Correctly processed completion
15:10 P4 completed Output "waiting for P4" → agent_end ❌ Ignored completion, broke loop

Same completion format, same Delegate persona, same Gateway configuration — three different outcomes, two of which silently broke the orchestration workflow.

Root Cause

The root cause is the delivery mechanism itself, not prompt wording or instruction conflicts. Subagent completion is delivered as passive prompt context, and LLMs inherently treat all context as optional — reference material they may read and act on, or skip and ignore.

For a critical workflow step like "subagent reports completion to parent", a passive context injection is too weak. The parent agent needs a stronger harness that forces it to process the completion result rather than offering it as one of many context blocks the LLM can overlook.

The problem is not contradictory instructions — it's that no instruction in prompt context can guarantee execution by an LLM. Context is, by definition, advisory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.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.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions