Repository navigation
fix: show Waiting and Resumed for Claude CLI subagent handoffs - #206158
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Collaborator
Author
|
Evidence at head 8b19c79 (main 9239eeb base). Docker Gateway and Control UI, claude-cli stand-in calling the real OpenClaw MCP tools under mcp__openclaw__ names, real Chromium. Main and head were each run twice. |
Collaborator
Author
|
Landed in 6b3ccab. Control UI now shows "Waiting for subagents" and "Resumed" for Claude CLI sessions after |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 27, 2026
…law#206158) Root cause: ui/src/pages/chat/chat-sessions-yield.ts:44 compares raw tool names with `sessions_yield`, which misses the `mcp__openclaw__sessions_yield` name that Claude CLI history keeps. src/gateway/cli-session-history-index-policy.ts `mergeCliHistoryRow` sends native Claude rows to chat.history with no run identity, even though the merge already links each local user turn (`<runId>:user`) to its native prompt. Fixes openclaw#206107 Thanks @fubarfu for the report and the clear Codex comparison. ## What changes for users In Claude CLI sessions, Control UI now shows "Waiting for subagents" after `sessions_yield` while the child runs, and "Resumed · … later" after the child wakes the parent, the same as embedded and Codex sessions. The private Yield call no longer shows as a tool row. The "Outcome unknown" rows in the report are already fixed on main by openclaw#203877. This PR doesn't touch them. On both main and this branch, tool rows show their real outcome, and a failed tool call shows as failed. ## Why - Claude CLI calls OpenClaw tools over MCP, and its history keeps the bridged name on purpose (`unwrapToolCallForDisplay`). The yield handoff scanner was the one reader that compared raw names, so it never confirmed the yield. It now uses the existing `stripOpenClawMcpToolPrefix`. The paired, completed, non-error and `yielded` receipt checks are unchanged. - The waiting line and the Resumed rule both need the run that handed off. Embedded and Codex rows carry `__openclaw.runId`. Imported Claude rows carried none. The history merge now gives an unmatched native row the run of the local user turn whose native prompt it answers. The only link it uses is the one the merge already has: the prompt's external id matched to the local user row with `<runId>:user`. Synthetic (meta) wake prompts end a turn but stay hidden, so rows of a wake run never inherit the earlier run. The transient prompt anchor is removed at merge, and nothing is stored: the index is the in-memory display projection. There are no schema or transcript changes. ## Evidence Docker (secretless node:24.22.1) Gateway + Control UI built from each SHA. Agent on `claude-cli` with a stand-in `claude` that emits the Claude Code stream-json and project JSONL contract and calls the real OpenClaw MCP server as `mcp__openclaw__session_status`, `mcp__openclaw__sessions_spawn` and `mcp__openclaw__sessions_yield`. Real Chromium. Main and this branch were each run twice, with controls on an embedded-runtime session and a failed claude-cli tool call. Results and screenshots: openclaw#206158 (comment) Regressions (each red on main, green here): - `ui/src/pages/chat/chat-sessions-yield.test.ts`: an imported Claude CLI call with its result is confirmed as a pending handoff. - `src/gateway/cli-session-history.test.ts`: native JSONL through the merge gives the turn's run to its tool rows, no run to rows after a meta wake, and no anchor in the output. Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot
pushed a commit
that referenced
this pull request
Nov 30, 2026
* fix: preserve completed Claude tool calls in chat history * fix: preserve completed Claude tool calls in chat history OpenClaw-Publication: d3a267f1-3ba5-4fc9-a4dd-3968148f8eb1 (cherry picked from commit a27b4e6) Follow-ups: 49492d7 fix: align Control UI tooling and docs with task card removal (#207747) [not selected for this narrow backport]; cebbb78 fix: keep tagged silent replies out of chat (#207738) [not selected for this narrow backport]; d4e1305 fix: hide desktop Details when there is nothing to show (#205093) [not selected for this narrow backport]; 11b2cf0 fix: keep the selected Review file compact when the tree is open (#203825) [not selected for this narrow backport]; 4be636b feat(ui): offer Add to Home agent when Home sidebar is open (#207773) [not selected for this narrow backport]; f766de4 fix: surface favorites and recommended models in picker search (#201450) [not selected for this narrow backport]; 61a7661 improve(ui): remove suggested-task cards from Control UI (#199167) [not selected for this narrow backport]; 48cc039 fix: keep long process names compact above mobile output (#203767) [not selected for this narrow backport]; 9316f05 fix: show the first message when session naming fails (#205607) [not selected for this narrow backport]; aa4a68f fix(ui): show chat completions as activity rows (#201891) [not selected for this narrow backport]; ec209d0 fix(ui): link selection sessions to their source session (#206509) [not selected for this narrow backport]; 3f475cc fix(ui): keep pre-final assistant text visible after a completed turn (#140835) [not selected for this narrow backport]; 05ec989 fix: keep chat photo previews sharp within their byte limits (#206461) [not selected for this narrow backport]; b3bdfb5 feat(ui): preview CSV chat attachments as tables (#206148) [not selected for this narrow backport]; 6b3ccab fix: show Waiting and Resumed for Claude CLI subagent handoffs (#206158) [not selected for this narrow backport]; 762aa00 fix: keep dictation recording when switching tabs or applications [not selected for this narrow backport]; d3f9fca fix: keep similar subagent names distinct in compact rows (#203777) [not selected for this narrow backport]; 864efbb improve: keep composer error cards on one line (#204337) [not selected for this narrow backport]; d7ed2dd fix: stop replaying Claude progress updates in active chats (#203970) [not selected for this narrow backport]; 269f884 fix: show Claude CLI document uploads only once in chat (#203866) [not selected for this narrow backport]; 4708bac fix(ui): show Linear artwork in chat tool activity (#204414) [not selected for this narrow backport] Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot
pushed a commit
that referenced
this pull request
Nov 30, 2026
* fix: show Claude CLI document uploads only once in chat * fix: show Claude CLI document uploads only once in chat OpenClaw-Publication: 4555cb04-bff2-43b3-aff8-ec271d6567b2 * fix: keep Claude document uploads on the message that sent them * fix: preserve the released message queue result contract Release adaptation: Use an optional accepted-input observer instead of widening queueMessage's released Promise<void> contract. Reuse the stable steering and transcript-rewrite handlers; leave source admission, native image steering, config, and all SQLite schemas unchanged. The existing history index columns also carry exact document correlation. Keep the released model-hook test layout. Companion audit through be407a4: no later #203866 reference. PRs #208535 (Claude compacted fork summaries), #206158 (native subagent status), and #205663 (image dimensions) are separate. PRs #208252 (Codex source), #207022 (embedded prompt dispatch), #206969 (fallback), #205963 (Copilot question policy), and 50a7368 (snooze) do not own this path. SHA mentions in #204700 and #204685 are update/qualification records, not follow-ups. (cherry picked from commit 269f884) Co-authored-by: RomneyDa <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.






Root cause: ui/src/pages/chat/chat-sessions-yield.ts:44 compares raw tool names with
sessions_yield, which misses themcp__openclaw__sessions_yieldname that Claude CLI history keeps. src/gateway/cli-session-history-index-policy.tsmergeCliHistoryRowsends native Claude rows to chat.history with no run identity, even though the merge already links each local user turn (<runId>:user) to its native prompt.Fixes #206107
Thanks @fubarfu for the report and the clear Codex comparison.
What changes for users
In Claude CLI sessions, Control UI now shows "Waiting for subagents" after
sessions_yieldwhile the child runs, and "Resumed · … later" after the child wakes the parent, the same as embedded and Codex sessions. The private Yield call no longer shows as a tool row.The "Outcome unknown" rows in the report are already fixed on main by #203877. This PR doesn't touch them. On both main and this branch, tool rows show their real outcome, and a failed tool call shows as failed.
Why
unwrapToolCallForDisplay). The yield handoff scanner was the one reader that compared raw names, so it never confirmed the yield. It now uses the existingstripOpenClawMcpToolPrefix. The paired, completed, non-error andyieldedreceipt checks are unchanged.__openclaw.runId. Imported Claude rows carried none. The history merge now gives an unmatched native row the run of the local user turn whose native prompt it answers. The only link it uses is the one the merge already has: the prompt's external id matched to the local user row with<runId>:user. Synthetic (meta) wake prompts end a turn but stay hidden, so rows of a wake run never inherit the earlier run. The transient prompt anchor is removed at merge, and nothing is stored: the index is the in-memory display projection. There are no schema or transcript changes.Evidence
Docker (secretless node:24.22.1) Gateway + Control UI built from each SHA. Agent on
claude-cliwith a stand-inclaudethat emits the Claude Code stream-json and project JSONL contract and calls the real OpenClaw MCP server asmcp__openclaw__session_status,mcp__openclaw__sessions_spawnandmcp__openclaw__sessions_yield. Real Chromium. Main and this branch were each run twice, with controls on an embedded-runtime session and a failed claude-cli tool call. Results and screenshots: #206158 (comment)Regressions (each red on main, green here):
ui/src/pages/chat/chat-sessions-yield.test.ts: an imported Claude CLI call with its result is confirmed as a pending handoff.src/gateway/cli-session-history.test.ts: native JSONL through the merge gives the turn's run to its tool rows, no run to rows after a meta wake, and no anchor in the output.