Repository navigation
fix(cli): preserve sessions_yield over MCP - #90861
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 15, 2026, 9:22 AM ET / 13:22 UTC. Summary PR surface: Source +97, Tests +273. Total +370 across 14 files. Reproducibility: yes. source-level: current Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Refresh the branch and land the narrow MCP/CLI yield fix after a gateway/agent owner confirms the process-local yield-context lifetime or changes it to a run-bound owner key. Do we have a high-confidence way to reproduce the issue? Yes, source-level: current Is this the best way to solve the issue? Yes, with owner confirmation: the patch fixes the boundary that drops run context and aligns yielded lifecycle state, but maintainers still need a refreshed merge result and session-lifetime confirmation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against dd7f2ef002e8. Label changesLabel justifications:
Evidence reviewedPR surface: Source +97, Tests +273. Total +370 across 14 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
592b05f to
bf79b2b
Compare
|
Additional local verification: I ran a real local Proof summary:
This closes the earlier proof gap around a real CLI client consuming the generated MCP config and invoking the loopback |
7a1e8c0 to
7115731
Compare
|
Land-ready maintainer verification for head
Best-fix verdict: best bounded fix at the current ownership boundary. Ready for rebase merge without squash. |
Summary
sessions_yieldon CLI-backed MCP turns was created without the active run session id or yield callback, so it returnedNo session contextinstead of pausing the run.This change keeps yield ownership inside the existing per-CLI MCP capture:
paused/end_turnNo user config, migration, provider routing, or embedded-runner behavior changes.
Closes #77426
Real behavior proof
sessions_yieldnow yields the active run instead of returningNo session context.OPENCLAW_STATE_DIR.src/gateway/mcp-http.tsthroughnode --import tsx --input-type=module, registered a real CLI capture, and sent an authenticated HTTPtools/callrequest forsessions_yieldwithx-openclaw-session-idandx-openclaw-cli-capture-key.status: "yielded"; the admitted CLI capture received the same yield message.Verification
git diff --check: passed.pnpm check:changedpassed on AWS Crabboxcbx_9c668236f0f7, runrun_d5de9a775bf2..agents/skills/autoreview/scripts/autoreview --mode branch --base origin/mainreturned no findings; overall confidence 0.84.Risk
The sensitive boundary is reuse of short-lived loopback tool objects. Requests bind to their admitted capture generation, and the generation is part of the cache key, so an older request cannot yield a newer CLI turn.