Skip to content

fix: canceled steering messages still reach active runs - #145809

Merged
shakkernerd merged 1 commit into
mainfrom
fix-steer-cancellation
Sep 12, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
fix-steer-cancellation

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Closes #145727

What Problem This Solves

Fixes an issue where users canceling a pending chat.send in steer mode could still have that input delivered to the active OpenClaw run after chat.abort acknowledged cancellation.

Why This Change Was Made

Pass the steering submission's abort signal to the existing per-message queue owner so it withdraws only the canceled input. Fallback dispatch retains the same signal, and the steering guide explains the withdrawal boundary before delivery starts.

User Impact

Pending steering can be canceled without stopping the active run or starting a later turn. Input already being delivered or consumed retains the existing handling for uncertain delivery.

Evidence

  • Added a real Gateway and embedded-runtime regression using a held synthetic Responses server and one persistent CLI connection. It checks B-only abort acknowledgment before releasing A, excludes B from model input and history, requires A's successful final result, and verifies aborted replay creates no extra request.
  • Before: the regression fails on ca28965b39be18168670ec6d9aa41dd11a68cb5a because A's next model request contains the canceled marker.
  • After: the repaired regression passed on Testbox, including successful A completion, no canceled B in model input/history, and no replay/fallback request. The synthetic provider exercises the real Gateway and OpenClaw runtime; it does not test real-model compliance.
  • Changed-file lint, formatting, conflict checks, max-lines and assertion-safety ratchets passed. Independent engineering review and separate P0–P2 autoreview are clear.
  • Final affected Testbox validation passed all 163 tests across five files, including the seven real Gateway steering scenarios. The complete changed-path gate passed, including core and test type graphs, lint, storage/runtime guards, and docs audit (13,529 internal links; zero broken links).
  • Hosted CI passed, including the required CI gate. ClawSweeper review rated the exact head f9a04a3675e85d05c75cb5464a938b84941318e3 Platinum with no findings.

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: M maintainer Maintainer-authored PR labels Sep 12, 2026
@shakkernerd shakkernerd self-assigned this Sep 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 4:33 AM ET / 08:33 UTC.

ClawSweeper review

What this changes

The PR forwards each steering submission’s cancellation signal to the existing runtime queue, documents withdrawal limits, and adds a Gateway regression covering cancellation and replay.

Merge readiness

✅ Ready for maintainer review

This remains a useful fix: current main still omits the cancellation signal, and source review found no introduced correctness defect. The maintainer-authored PR and its linked bug should remain open through normal landing.

Priority: P2
Reviewed head: f9a04a3675e85d05c75cb5464a938b84941318e3

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with meaningful integration coverage and no blocking source findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary contributor proof gate is exempt for this member-authored PR. Its captured body reports a Testbox before/after run through the real Gateway and embedded runtime with held HTTP responses, demonstrating withdrawal and continued completion of the original run; this review did not rerun it.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary contributor proof gate is exempt for this member-authored PR. Its captured body reports a Testbox before/after run through the real Gateway and embedded runtime with held HTTP responses, demonstrating withdrawal and continued completion of the original run; this review did not rerun it.
Evidence reviewed 8 items Current main still needs the fix: The fetched main revision has the same relevant production code as the PR base: the Gateway starter does not pass abortSignal into message injection. Comparing these two production files shows precisely the proposed signal wiring and comment correction.
Existing queue owns withdrawal: The queue subscribes to the supplied abort signal and removes the exact steering-message identity before rejecting delivery. An accepted message that cannot be withdrawn follows the existing unconfirmed-delivery safeguard.
Fallback preserves cancellation: Rejected injection falls through to ordinary dispatch with the same submission controller’s signal. Existing dispatch cancellation handling suppresses canceled work, and terminal projections retain the abort marker.
Findings None None.
Security None None.

How this fits together

Gateway chat requests can add steering input to an already-running agent. The runtime queue holds that input until a delivery boundary, while the Gateway tracks each submission’s cancellation and terminal result.

flowchart TD
  A[Chat send] --> B[Submission abort controller]
  A --> C[Gateway steering adapter]
  D[Authorized chat abort] --> B
  B --> C
  C --> E[Runtime steering queue]
  E --> F{Canceled before delivery?}
  F -->|Yes| G[Withdraw input]
  F -->|No| H[Active run consumes input]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source 0, Tests +129, Docs +11. Total +140 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 2 5 5 0
Tests 2 171 42 +129
Docs 1 11 0 +11
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 187 47 +140

Review metrics

None.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #145727
Summary: This PR is the explicit candidate fix for the linked pending-steer cancellation bug.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep cancellation with the existing per-message queue owner so withdrawn input disappears before delivery while the original run continues.

Do we have a high-confidence way to reproduce the issue?

Yes: the held-provider sequence isolates cancellation before consumption, and current-main source confirms the missing signal. This review did not execute that sequence.

Is this the best way to solve the issue?

Yes: forwarding the existing submission signal repairs the missing connection without adding a competing cancellation mechanism or changing public configuration.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 817b87141673.

Labels

Label changes:

  • add P2: This repairs a demonstrated cancellation defect in a bounded active-steering path without evidence of a broader urgent outage.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Label justifications:

  • P2: This repairs a demonstrated cancellation defect in a bounded active-steering path without evidence of a broader urgent outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • ruel225: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@shakkernerd
shakkernerd merged commit bcc7cc9 into main Sep 12, 2026
192 checks passed
@shakkernerd
shakkernerd deleted the fix-steer-cancellation branch September 12, 2026 09:08
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: canceling steering before delivery withdraws the queued message while the active OpenClaw run continues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Canceled steering input still reaches the active run after chat.abort succeeds

1 participant