OpenClaw Main Fixes Lost Subagent Replies and Stale TUI Run Ownership
Merged session-ownership fixes prevent child completions disappearing, older runs replacing current state and prior TUI sessions interfering after a switch.
OpenClaw has merged session-ownership repairs for overlapping turns, delegated subagents, Codex-backed inference, OpenAI-compatible streaming endpoints and TUI session switching. The common fault is stale work retaining enough authority to hide, replace or interfere with the current run.
For operators, the symptoms can look unrelated: a child agent completes but its reply never appears, a canceled model request continues, a Codex turn stalls, a streaming client misses its terminal frame, or switching TUI sessions leaves the old watchdog and mode settings alive.
The fixes are on main. Confirm a containing build before treating them as present.
The high-impact repair
PR #117731 reports four failures under overlapping or interrupted work:
- a delegated child completion could be lost;
- an older run could replace current session status;
- cancellation could fail to stop the active model request; and
- native Codex compaction or a namespaced custom tool could stall normal inference.
The merged direction is authoritative ownership: completion delivery, status mutation and cancellation must all check that the event still belongs to the current run.
PR #117832 separately preserves native Codex session streams, reinforcing that a session-backed runtime cannot be handled as a disposable one-shot response without losing continuity.
Streaming completion must outlive execution settlement
PR #117505 fixes shutdown handling for /v1/chat/completions and /v1/responses. Agent execution could settle before the deferred terminal Server-Sent Events frame was actually delivered, allowing shutdown to consider the request drained too early.
A completed model run is not equivalent to a completed client delivery. Operators using these endpoints should monitor the terminal frame received by the client, not only the internal run result.
TUI switches now retire prior authority
PR #117658 fixes fast, verbose, trace and reasoning modes leaking from the previously selected TUI session into the next one.
PR #117853 covers the more serious lifecycle fault: switching sessions could leave the previous run coordinator, watchdog and terminal state alive while another history was restored. A delayed event from the old session could then reactivate stale ownership or interfere with final and follow-up state in the new session.
The safe contract is simple: switching the visible session must revoke the old session’s right to update the new one.
Acceptance tests
Use disposable sessions with unique markers:
- run two overlapping parent turns and complete their children in reverse order;
- verify each child result reaches only its owning parent and neither disappears;
- cancel one active Codex-backed turn during compaction or a supported custom-tool fixture;
- verify the canceled request stops and the surviving session continues;
- stream through both OpenAI-compatible endpoints, begin controlled shutdown after model settlement and confirm the client still receives exactly one terminal frame;
- in the TUI, give two sessions visibly different mode settings, switch during an in-flight run and deliver a delayed old-session event; and
- confirm footer state, history, watchdog and final reply remain owned by the newly selected session.
Avoid tools with external side effects. Deliberately delayed completions can arrive after the test appears finished.
Incident response
If a pre-fix deployment loses a reply or shows stale state:
- preserve parent, child and run identities before restarting;
- inspect whether the child actually completed but terminal delivery failed;
- distinguish model cancellation from UI detachment;
- check the streaming client for a missing terminal frame; and
- do not blindly replay a child task that may already have acted externally.
Interpretation: “the UI did not show completion” is not proof that the run did nothing. Reconcile the owning transcript and side-effect target first.
Evidence and limits
The official GitHub PR and commit records supplied by the repository collector establish the reported faults and merged fixes. Direct page extraction was blocked by GitHub HTTP 403 during this run. OpenClaw Academy did not run concurrent upstream agents, a native Codex harness or a live Gateway shutdown test.
Bottom line
Concurrency bugs become operational bugs when stale work can mutate current state. Stage a containing build with reversed completion order, cancellation, terminal streaming and mid-run TUI switches; only then trust that every reply and status update belongs to the session displaying it.
THE RECEIPTS
Claims should survive the click.
Primary links used for this article are listed openly. If the evidence changes, the verification date changes with it.- 01Prevent lost subagent replies, stale runs and Codex stalls — PR #117731↗
- 02Preserve streaming terminal delivery during Gateway shutdown — PR #117505↗
- 03Keep TUI session modes scoped on switch — PR #117658↗
- 04Retire TUI run ownership when switching sessions — PR #117853↗
- 05Preserve native Codex session streams — PR #117832↗
THE OPERATOR BRIEF