Repository navigation
feat(chat): send pending steers now without stopping the run - #193665
Conversation
Keep pending steers in normal user bubbles with a quiet Send now link. Interrupt supported tool calls through call-scoped abort signals, preserve cleanup and recorded user-interruption results, and let the existing steering owner continue the run. Bind the action to the captured input and current session writer authority.\n\nInclude core, RPC, exec/process and Control UI boundary proof, steering docs, and synthetic owner measurements. Unsupported tool-only interruption is explained in place.
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ac8e2f401
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex review: needs real behavior proof before merge. What this changesAdds a Send now action that interrupts supported tools so a pending correction can reach the model without stopping its run. Example: A local exec is running when the user sends “Focus on the startup error first.”
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 8 items remain Keep open: this maintainer-directed feature addresses a real steering delay, but final-argument interruption safety and PR-caused validation failures need repair. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Control UI sends a session-authorized RPC to the existing steering controller, which resolves the captured pending input and requests call-scoped cancellation from the active Agent. flowchart LR
A[Pending correction] --> B[Control UI Send now]
B --> C[Session write authorization]
C --> D[Captured steering owner]
D --> E[Call scoped cancellation]
E --> F[Tool cleanup and result]
F --> G[Same run continues]
Technical reviewBest possible solution: Retain the existing steering owner, classify interruption from final execution arguments, repair affected test consumers, and reduce the emitted chat payload within its existing budget. Do we have a high-confidence way to reproduce the issue? Current main waits at the existing tool boundary; source also establishes the hook-rewrite defect, while exact-head CI independently records the fixture, inventory, and asset-budget failures. Is this the best way to solve the issue? Call-scoped cancellation attached to the existing Agent and steering controller is appropriate; the smallest complete implementation must evaluate the execution owner's final arguments and retain cleanup settlement before continuation. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9f3ed313782f. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: shipped entry point. SecurityNeeds attention: Current authorization guards are present, but retained cancellation authority needs revocation proof before merge. EvidenceSecurity concerns:
What I checked:
PR surfaceSource +651, Tests +891, Docs +50, Other +360. Total +1952 across 75 files. Added test files: 2. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 5, 2026, 2:05 PM ET / 19:05 UTC. |
Load pending-input RPC work on demand while retaining synchronous request admission and optimistic dismissal. Remove redundant collection copies and skip per-message steer lookups when no steer capability exists. Keep writer-only interruption metadata out of the model-facing history schema. Update shared Agent fixtures and the real-Gateway test inventory for the new interruption contract. Validation: exact release-mode bundle cap, 80 UI/browser tests, 61 repaired CI cases, history contracts, prompt-prefix stability, real Gateway click and continuation proof, and independent Codex review.
Decide tool-only interruption from the final hook-rewritten execution arguments. Preparation stays blocked, and the same per-call signal and cleanup owner continue into execution. The actual exec hook regression covers remote rerouting and a concurrent safe sibling. Skip decorative avatar mutations when classifying menu row spacing. This repairs the large-directory owner-picker regression from #183800 without changing its clicks, timeouts, or structural update behavior. Validation: red/green owner regressions; 128 affected tool tests; 36 UI contracts and desktop/compact owner-picker E2E; unchanged UI bundle gate; Codex review clean through P2. The inherited release-attribution guard from #193427 remains recorded separately in the PR evidence.
Use the existing Responses tool-call fixture and Node's request-body consumer instead of duplicating their implementation. Preserve every Send now assertion and reduce the test-line allocation to the actual 931-line delta, without relying on spare main-branch capacity. The consolidated real Gateway scenario, focused types/lint and Codex review pass. The exact CI merge now passes its unchanged ratchet with 15 test lines spare. Production and measured runtime sources are unchanged.
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…w#193665) * feat(chat): send pending steers now without stopping the run Keep pending steers in normal user bubbles with a quiet Send now link. Interrupt supported tool calls through call-scoped abort signals, preserve cleanup and recorded user-interruption results, and let the existing steering owner continue the run. Bind the action to the captured input and current session writer authority.\n\nInclude core, RPC, exec/process and Control UI boundary proof, steering docs, and synthetic owner measurements. Unsupported tool-only interruption is explained in place. * fix(chat): keep pending steer actions within the UI boot budget Load pending-input RPC work on demand while retaining synchronous request admission and optimistic dismissal. Remove redundant collection copies and skip per-message steer lookups when no steer capability exists. Keep writer-only interruption metadata out of the model-facing history schema. Update shared Agent fixtures and the real-Gateway test inventory for the new interruption contract. Validation: exact release-mode bundle cap, 80 UI/browser tests, 61 repaired CI cases, history contracts, prompt-prefix stability, real Gateway click and continuation proof, and independent Codex review. * fix(chat): finalize tool safety and skip decorative menu scans Decide tool-only interruption from the final hook-rewritten execution arguments. Preparation stays blocked, and the same per-call signal and cleanup owner continue into execution. The actual exec hook regression covers remote rerouting and a concurrent safe sibling. Skip decorative avatar mutations when classifying menu row spacing. This repairs the large-directory owner-picker regression from openclaw#183800 without changing its clicks, timeouts, or structural update behavior. Validation: red/green owner regressions; 128 affected tool tests; 36 UI contracts and desktop/compact owner-picker E2E; unchanged UI bundle gate; Codex review clean through P2. The inherited release-attribution guard from openclaw#193427 remains recorded separately in the PR evidence. * test(chat): reuse the real Gateway response fixture Use the existing Responses tool-call fixture and Node's request-body consumer instead of duplicating their implementation. Preserve every Send now assertion and reduce the test-line allocation to the actual 931-line delta, without relying on spare main-branch capacity. The consolidated real Gateway scenario, focused types/lint and Codex review pass. The exact CI merge now passes its unchanged ratchet with 15 test lines spare. Production and measured runtime sources are unchanged. * test(sessions): expect controller-owned steering identity
…w#193665) * feat(chat): send pending steers now without stopping the run Keep pending steers in normal user bubbles with a quiet Send now link. Interrupt supported tool calls through call-scoped abort signals, preserve cleanup and recorded user-interruption results, and let the existing steering owner continue the run. Bind the action to the captured input and current session writer authority.\n\nInclude core, RPC, exec/process and Control UI boundary proof, steering docs, and synthetic owner measurements. Unsupported tool-only interruption is explained in place. * fix(chat): keep pending steer actions within the UI boot budget Load pending-input RPC work on demand while retaining synchronous request admission and optimistic dismissal. Remove redundant collection copies and skip per-message steer lookups when no steer capability exists. Keep writer-only interruption metadata out of the model-facing history schema. Update shared Agent fixtures and the real-Gateway test inventory for the new interruption contract. Validation: exact release-mode bundle cap, 80 UI/browser tests, 61 repaired CI cases, history contracts, prompt-prefix stability, real Gateway click and continuation proof, and independent Codex review. * fix(chat): finalize tool safety and skip decorative menu scans Decide tool-only interruption from the final hook-rewritten execution arguments. Preparation stays blocked, and the same per-call signal and cleanup owner continue into execution. The actual exec hook regression covers remote rerouting and a concurrent safe sibling. Skip decorative avatar mutations when classifying menu row spacing. This repairs the large-directory owner-picker regression from openclaw#183800 without changing its clicks, timeouts, or structural update behavior. Validation: red/green owner regressions; 128 affected tool tests; 36 UI contracts and desktop/compact owner-picker E2E; unchanged UI bundle gate; Codex review clean through P2. The inherited release-attribution guard from openclaw#193427 remains recorded separately in the PR evidence. * test(chat): reuse the real Gateway response fixture Use the existing Responses tool-call fixture and Node's request-body consumer instead of duplicating their implementation. Preserve every Send now assertion and reduce the test-line allocation to the actual 931-line delta, without relying on spare main-branch capacity. The consolidated real Gateway scenario, focused types/lint and Codex review pass. The exact CI merge now passes its unchanged ratchet with 15 test lines spare. Production and measured runtime sources are unchanged. * test(sessions): expect controller-owned steering identity
What Problem This Solves
A message steered into an active run can wait behind a long-running tool even though chat.send acknowledged it immediately. Writers need an explicit way to deliver that correction sooner without stopping the run.
User Impact
Pending steers keep their normal user bubble, with a small Send now text link underneath. Clicking it interrupts supported running tools, records a user-interruption result for the model, and lets the existing steering queue continue the same run. The link disappears after injection. Repeated requests cannot interrupt later work or inject the message twice.
Tools that cannot safely stop show a quiet waiting explanation. Foreground local exec waits for process cleanup; interrupting process polling ends only the wait, preserving the independently managed background command. Code Mode aggregate tools, native/remote runtimes, and node/durable/background execution do not offer tool-only interruption. Cancellation does not undo completed side effects. No configuration or database migration is required.
Why This Change Was Made
The pending input retains its captured execution owner and exact queue identity. The writer-authorized chat.steerNow RPC uses that owner to interrupt only admitted tool calls; the run-level abort signal stays untouched. History projects capability through the existing physical session-store matcher, and the UI consumes that projection. No extra store scan or cache is introduced.
Interruption stays blocked while hooks prepare a tool call. The existing execution owner evaluates the final hook-rewritten arguments before making its per-call signal available for user cancellation. This fixes the hosted review finding where local exec could be rerouted to an unsafe remote invocation after the original capability decision.
Handwritten production code is net +679 lines, excluding generated validators, tests, and measurement tooling. The growth implements the new typed action, per-call interruption lifetime, and UI behavior. Pending RPC execution loads on demand while synchronous admission stays with the existing owner; redundant collections, shared rewind completion, and text-action styling were removed.
Release-note context: Control UI writers can send a pending steer immediately by interrupting supported tools while keeping the active run alive; unavailable interruption is explained in place.
Evidence
The final repair passes 128 focused core/exec/process/hook/prefix tests, including a real Agent-to-exec hook regression that fails on the previous code. It verifies that rewritten remote execution blocks cancellation while a safe parallel sibling continues. Earlier feature proof passed 84 focused Gateway/tool tests covering writer authorization, exact input identity, idempotency, FIFO, physical cleanup, model-visible interruption and continued execution.
Final real Gateway/Control UI proof passed in 35.15 seconds using isolated state, owned ports, a real local exec process and deterministic loopback inference. It verified the visible click, physical tool cleanup before the next model request, one steer consumption, continued original-run output and removal of the link. This is not external live-provider inference evidence. Full synthetic before/after images were inspected and are embedded below. The final UI repair also passes 36 focused UI tests and the original owner-picker E2E at desktop and compact widths. Types, lint, formatting, protocol generation and native contract checks passed. Final isolated Codex autoreview is clean through P2, including the test-only consolidation.
The final pnpm check:changed run passed all selected candidate gates except a new controller-rule finding that was repaired and passed its canonical targeted replay. Its separate inherited release-attribution failure remains recorded: the generic guard does not consume the release candidate's accepted 2026.11.1 tag exception. Exact introducing parent f07f46a passes; de04fbe (#193427), the task base, and the earlier exact CI main parent reproduce it. This is an unresolved main regression for its owner, not noise or a green check. No release record or guard exception was changed; no timeout or budget ceiling was increased.
The first CI attempt exposed incomplete shared Agent fixtures and UI-only capability metadata entering the model-facing history schema. The repaired fixture owners pass all 61 previously failing cases across eight files; the tool schema excludes the new writer-only control while preserving its previous public fields and compact hint. The independent E2E inventory includes the real-Gateway scenario. The browser reproduction also caught a logical-versus-physical store-locator mismatch, now covered through registered chat.history.
The final local release-mode UI comparison against tested main parent d4e2ec8 passes: chat boot is 1,294,446 bytes gzip against the inherited 1,294,735-byte ceiling, versus 1,293,929 bytes on the tested main parent (+517 bytes), with 20 requests unchanged. The initial head exceeded its ceiling; pending-input RPC work now loads on demand while admission and optimistic feedback stay synchronous. Canonical typed enums remove redundant generated status checks without changing accepted values. The final test-line delta and allocation are both 931 lines. The local replay of the exact CI merge plus the final test-only delta passes with 15 lines spare. A test-only follow-up reuses existing Responses and request-body helpers, preserving every assertion while removing reliance on spare baseline capacity; the allocation was lowered, not raised.
Owner-picker regression found by CI
Both CI attempts exposed an existing large-directory menu timeout. Profiling established that decorative avatar mutations caused repeated full menu-spacing classification. The exact defective owner was introduced in 34e6076 (#183800); the final deterministic regression fails on that original owner. The repair keeps the original owned traversal and ignores mutations that cannot alter row boundaries. It adds no cache or timer and preserves structural/class updates.
The acceptance rule was recorded before the formal comparison: use the existing 1,000-person renamed-owner desktop scenario with unchanged clicks/timeouts, preserve directory refresh/search/Escape/keyboard assignment, reduce irrelevant classification work, and retain the UI boot budget. Five interleaved samples per arm produced:
Three baseline intervals are timeout-censored, so their median is not successful-action latency. This is a synthetic browser fixture with identical profiling overhead, not a production latency estimate. The final uninstrumented desktop and compact scenarios both pass. No force-click, timeout increase or replay-only claim of repair was used.
Steering measurements and scale qualification
The completed 33-process A/A and interleaved owner comparison measures production commit 5ce254f. The later commits only consolidate the test fixture, lower its allocation, and update one existing steering expectation; production and benchmark sources are identical. The workload uses 4,096 resident input identities, four A/A controls, five ordinary base/candidate pairs, five same-head wait/action pairs, and separate CPU/allocation profiles.
Ordinary-path CPU was +3.96% in aggregate (paired median +3.29%), and sampled allocation +0.50%. All five CPU pairs were positive; A/A CPU ranged 279.571–312.081 ms per 100 inputs, so small differences still have attribution limits. This is an observed cost, not zero overhead. On the same final candidate, cancelling the deliberate 50 ms synthetic wait changed consumption median/p95 from 51.915/52.354 ms to 0.033/0.054 ms. It is not a production latency estimate. All 3,300 inputs were consumed and continued; all 800 interrupting inputs produced the expected model-visible result, with source hashes unchanged.
This microbenchmark includes the real Agent and controller lifecycle but no durable database, physical workspace, transport authorization or Gateway status subscriber. Downstream notification behavior is covered by the real Gateway/UI proof. Separate scale qualification follows.
Separate public-RPC qualification passed against a real synthetic 35.001 GiB database with 5,000 populated sessions and 62,000 workspace files totaling 1.116 GB. It verified persisted interruption results, physical process cleanup before inference, single steer delivery, successful completion of the original run and idempotent repeat action. This was APFS qualification, not btrfs evidence; the observed RPC acknowledgement was 3.699 ms in one functional sample, not an aggregate benchmark. No Team data or runtime was accessed.
Four inherited dead exports were reproduced on the exact base and removed without behavior changes. The auth/restart-test exports came from 56753f7 (#193098); e0466ff removed the workflow helpers' last external consumers.
CI and final test repair
Run 42109752869 tested merge
b06579e434c8(main parent64ca09fbdde3, previous head1d7060fc7369). UI browser/E2E checks, security, performance and baseline ratchets passed. The run completed after the runner queue drained: 78 jobs passed,22 skipped, and two test jobs failed (plus the aggregate). The additional candidate failure was an exact-call expectation missing the new queueIdentity. Commitde78b72193efadds that single string expectation, preserving every prior assertion. All 59 tests in the affected sessions_send file pass (67.29s wrapper, 38.42s Vitest); canonical type-aware lint, formatting and budget checks pass, and final Codex review13 is clean through P2. The helper is excluded by the test-line owner, so the allocation remains 931. Current-head CI is run 42116874475.The Bun restart-resume E2E failed during its managed-restart cycle: five retained sessions were skipped with
AgentDatabaseAdmissionErrorbefore native write preparation completed. The affected test and recovery/admission owners are unchanged from the exact main parent. The original focused parent E2E replay passed; a deterministic owner-level regression on unchanged parent production source reproduced the same admission error, persisted marker, zero continuations and permanent suppression on a second recovery call. It uses real SQLite and admission owners with the discovery/admission schedule controlled.The lifetime memoized recovery operation introduced in #187822 (
9bf3231d2535) records a skipped marker batch as completed; its parent reread retained markers on subsequent invocations. This is causal attribution of the permanent retry-suppression defect, not a claim about the stochastic E2E's first failing run. The publication retry delay added in #193049 plausibly exposes the window. A separate physical-store write-preparation join passes the regression and existing siblings (12/12); that main repair is reported separately and is not part of this PR. Fresh CI outcomes remain required and are not waived.The current run's baseline job exposes 89 lines of inherited main test-budget debt. Its tested merge
33889625b06ahas exact main parent41932f3e5cb4. The literal parent fails the real ratchet at 6,508,483 lines against a 6,508,394 ceiling. #191554 (35702b4bec67) introduced the debt: its immediate parent passes with 15 lines spare, then the commit adds 104 test lines without allocation and fails by 89. Later changes preserve the same net debt. This PR adds 931 counted test lines with 931 allocation, so the tested merge remains exactly 89 over; no baseline or allowance was raised to cover unrelated work. The debt-owning test, ratchet, helper and baseline scalar are unchanged in the tested merge. This new main regression is recorded for separate repair. The current restart-resume shard passed.Current-head CI completed with 79 successful jobs, 22 skipped jobs, and only the baseline-ratchet job plus its aggregate failing. UI browser/E2E, UI performance, all selected Node shards and independent security-fast passed. The automated report labels the ratchet new against older scheduled main run 42112538916; the literal tested-parent reproduction and introducing-commit proof above establish inheritedness independently. Landing uses the authorized pinned-head exception for this debt only; failed CI is not relabeled green.