Repository navigation
fix(sessions): keep steering queued while the target is busy - #160490
Conversation
Acknowledge explicit steering admission without withdrawing it at the reply wait deadline. Keep exact-message terminal cleanup with the receiving run. Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]>
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. Reviewed September 28, 2026, 12:27 PM ET / 16:27 UTC (Revision 5). ClawSweeper reviewWhat this changesThe branch makes explicit cross-session steering return after queue admission, retains cleanup of unconsumed guidance when the receiving run ends, and updates tests and session-tool documentation. Merge readiness✅ Ready for maintainer review Current main still waits for transcript commitment on explicit steering and can withdraw queued guidance when that wait expires. The branch addresses the documented admission behavior, and this review found no actionable patch defect. Priority: P2 Review scores
Verification
How this fits togetherThe session-send tool checks access before passing guidance to an active agent run. The receiving session queues that guidance, then consumes and records it at a steering boundary or removes it when the run ends. flowchart TD
A[Agent sends guidance] --> B[Session access check]
B --> C[Active run admission]
C --> D[Steering queue]
D --> E[Next steering boundary]
E --> F[Transcript and model]
D --> G[Run ends and pending guidance is removed]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +13, Tests +75, Docs 0. Total +88 across 6 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one receiving-run owner for admitted steering, with an immediate admission receipt and exact cleanup of pending guidance at run termination. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main waits for transcript commitment on explicit steering and cancels the queued message at that deadline. The PR supplies a held-response regression path, which this read-only review did not execute. Is this the best way to solve the issue? Yes. The patch separates admission from transcript confirmation within the existing queue lifecycle and retains terminal cleanup without adding another queue. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against abb37032e7f7. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…w#160490) Acknowledge explicit steering admission without withdrawing it at the reply wait deadline. Keep exact-message terminal cleanup with the receiving run. Worked on by: - @VACInc Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: VACInc <[email protected]>
Related: #160296 (session-control permissions; separate scope).
What Problem This Solves
Fixes
sessions_send(mode="steer")withdrawing valid guidance after 30 seconds when the receiving built-in run is still busy.User Impact
Explicit steering acknowledges admission without waiting for a busy model response or tool to finish. The receiving run retains exact-message cleanup, so pending guidance is not carried into a later unrelated turn after abort or handoff.
Acceptance is not proof of transcript persistence or model consumption, and the in-memory queue is not made restart-durable. Existing authorization, explicit cancellation, and already-submitted-input limits remain. No new settings, timeout increase, schema change, merge, or deployment.
Why This Change Was Made
The admission-only tool path requested a transcript-commit receipt using the reply-wait deadline. Expiry canceled the queued message before the receiving run could consume it.
The correction uses the existing steering lifecycle rather than adding a queue: explicit admission returns after enqueue, releases the completed caller’s deadline/listeners, and leaves commit or terminal cleanup with the receiving session. Calls requesting transcript confirmation keep their existing bounded wait; omitted options retain their existing behavior. Native Codex steering owns a separate queue contract and is unchanged.
Evidence
f7701d22708d6e31beb1158cbecaec68fb2f67f8is Ready for maintainer review, with no patch or security finding and no before-merge item.ac18338c2322b323ad8b22743a9b299300986ad9; these results do not describe the merged head. Run 36436170082 has two originating failed UI jobs and a failed aggregate gate; 36 sibling jobs were canceled by fail-fast, so they are not passing proof. No CI rerun or unchanged re-push was used.ui/src/e2e/chat-user-avatar-alignment.e2e.test.tstime out waiting for.chat-group.user .chat-avatar:visible. The same three cases and locator fail in PR #156479's UI E2E 6/9 job, on headcc27e0f5772e1d231eb5bcf68fcd399b73e6ce3d. This is independently observed on another PR.does not reuse catalog reasoning for a different session runtimeinui/src/e2e/chat-flow.models-reasoning.e2e.test.tstimes out waiting for a visible thinking slider; the locator resolves to a hidden input. I did not find the same case failing in the nearby PR runs inspected. Its independent recurrence remains unproven.src/agents/anddocs/concepts/session-tool.md; neither failing UI test nor its UI implementation is in the branch diff. The executed mergefc1d7e15e9446f861e4a042e6a95c77d8659fe3ahas the sameui/tree as its main parent670415932ee7dc54d3d59c2e00870f55ed54004c. These UI reds are outside this PR's changed files. They remain reported here for the separate flake-fix work; no UI test was edited, and this PR is not claimed CI-green or merge-ready.Main conflict integration (current head)
origin/mainat4902e4ae49a669702b92a1df3aeb01b167ec6715once, creatingf7701d22708d6e31beb1158cbecaec68fb2f67f8. The sole conflict wasdocs/concepts/session-tool.md. Its resolution keeps main'ssessions_sendaccess-check statement and this PR's admission, delayed transcript, and cancellation limits.src/agents/tools/sessions-send-tool.delivery.tsmerged automatically; main's session-creation path and this PR's steering receipt both remain.check-source-contractsfailslint:tmp:export-name-collisionson names includingassertForegroundUpdateOriginandrunDaemonInstallinsrc/cli/daemon-cli.tsand othersrc/cli//src/infra/owners. Those files are byte-identical to merge parent4902e4ae49a669702b92a1df3aeb01b167ec6715and are outside this PR's six-file diff. The same guard and names fail in PR #160527 and PR #160495.side-chat input focuscases inui/src/e2e/chat-session-companion-focus.e2e.test.tsaftercontrol-ui-e2e-suite.test-support.tsreportsscenario cleanup did not settle within 180000ms. Both UI files are unchanged from that merge parent and are outside this PR's diff. I did not observe the same cleanup failure in the nearby PR jobs sampled; independent recurrence is unproven. These failures remain for separate CI repair, with no UI test edited here.Test cost
Measured with the repository test wrapper and
--maxWorkers=1:openclaw-tools.sessions-steering.test.tsattempt.queue-message.test.tsagent-session-loop-next-turn.test.tsCommand wall includes import/compiled-worker preparation; reported test execution is below five seconds per file. The 30-second boundary uses a virtual clock, not a sleep. Existing timeouts, assertions, queue order, and cancellation coverage are retained. Hosted CI stopped on the browser-only failures above; local per-file timing is the available scoped cost evidence. No full-suite or native Codex timing change is claimed.
Worked on by
Work sessions
View the OpenClaw team session
Inherited CI failures (admin exception)
Exact-head run 36450284408 (head f7701d2) is red only in:
check-source-contracts(lint:tmp:export-name-collisions): duplicate exports introduced on main by5de949fc462(src/cli/daemon-cli.tsvssrc/cli/daemon-cli/*), reproduced on clean main; a forward fix is being prepared separately. This PR touches none of those files.checks-ui-e2e (7/9):ui/src/e2e/chat-session-companion-focus.e2e.test.tscleanup timeout, red in 8 other recent PR runs and in main's own scheduled runs since d769e31; mock-Gateway UI test, this PR changes noui/code.ClawSweeper Revision 5: no findings. Landed under the AGENTS.md pre-existing-red exception by the maintainer.