Skip to content

fix(auto-reply): stop treating wait as abort trigger - #98639

Merged
steipete merged 3 commits into
openclaw:mainfrom
ianchen08:ianchen08/remove-wait-abort-trigger
Jul 7, 2026
Merged

steipete merged 3 commits into
openclaw:mainfrom
ianchen08:ianchen08/remove-wait-abort-trigger

Conversation

@ianchen08

@ianchen08 ianchen08 commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where Telegram group users sending the normal coordination word wait could cause OpenClaw to treat the message as an abort request and reply ⚙️ Agent was aborted. instead of continuing the upstream workflow.

Why This Change Was Made

wait is no longer part of the shared natural-language abort trigger set. Explicit stop commands such as stop, abort, and interrupt still dispatch immediately, while wait now follows the normal inbound text path, including channel debounce handling.

User Impact

Operators can use wait in Telegram coordination threads without accidentally cancelling an active OpenClaw run. Existing explicit abort/stop controls continue to work.

Evidence

  • Focused tests: pnpm test src/auto-reply/reply/abort.test.ts src/channels/inbound-debounce-policy.test.ts
    • src/auto-reply/reply/abort.test.ts: 30 tests passed.
    • src/channels/inbound-debounce-policy.test.ts: 3 tests passed.
  • Regression coverage verifies isAbortTrigger("wait"), isAbortRequestText("wait"), and isAbortRequestText("please wait") are false.
  • Channel debounce coverage now verifies wait is treated as normal debounced text, while stop and abort still bypass debounce as control messages.
  • Pre-fix operational observation: a redacted Telegram upstream message containing wait was followed by the visible OpenClaw reply ⚙️ Agent was aborted. on 2026-07-01 around 20:57 Asia/Taipei.
  • Not deployed from this PR yet, so there is intentionally no post-deploy live Telegram proof in production.

@openclaw-barnacle openclaw-barnacle Bot added size: XS triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 1, 2026
@clawsweeper

clawsweeper Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 1, 2026, 9:48 AM ET / 13:48 UTC.

Summary
The PR removes wait from natural-language abort trigger matching and adds regression expectations for wait and please wait.

PR surface: Source -1, Tests +3. Total +2 across 2 files.

Reproducibility: yes. from source inspection: current main maps normalized wait through isAbortRequestText to fast abort handling, though I did not run tests in this read-only review.

Review metrics: none identified.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted Telegram screenshot/recording, terminal output, copied live output, or logs showing wait no longer aborts while stop still does.
  • [P1] Resolve the current required CI failure or document why it is unrelated to this diff.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body lists only a unit command; before merge the contributor should add redacted Telegram proof, terminal output, copied live output, or logs, then update the PR body to trigger a fresh review or ask a maintainer for @clawsweeper re-review.

Mantis proof suggestion
A short Telegram Desktop proof would directly show that wait is handled as a normal message while /stop or stop still aborts. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis telegram desktop proof: verify that sending `wait` does not produce an agent-aborted reply, while `stop` still aborts the active run.

Risk before merge

  • [P1] Contributor after-fix real behavior proof is missing, so the Telegram-visible group coordination claim is not externally verified yet.
  • [P1] The PR currently has a failing build-artifacts CI check in GitHub status; I did not inspect its logs in this read-only pass, so it should be resolved or shown unrelated before merge.

Maintainer options:

  1. Decide the mitigation before merge
    Merge the narrow shared-predicate fix once the contributor adds redacted real behavior proof for the Telegram-visible false-abort path and required checks are green.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] No automated repair lane is needed because the patch appears correct; the remaining blocker is contributor-side real behavior proof plus normal CI/maintainer validation.

Security
Cleared: The diff only changes an in-repo trigger literal and focused unit expectations; it adds no dependency, CI, secret, permission, or code-execution surface.

Review details

Best possible solution:

Merge the narrow shared-predicate fix once the contributor adds redacted real behavior proof for the Telegram-visible false-abort path and required checks are green.

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

Yes from source inspection: current main maps normalized wait through isAbortRequestText to fast abort handling, though I did not run tests in this read-only review.

Is this the best way to solve the issue?

Yes: the shared abort predicate is the best fix boundary because fast abort, Telegram control-lane, and reply-fence detection all consume it; a Telegram-only exception would leave inconsistent behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against f936c6b49504.

Label changes

Label changes:

  • add status: 🔁 re-review loop: A fresh ClawSweeper review was explicitly requested after the latest review. Needs real behavior proof before merge: The PR body lists only a unit command; before merge the contributor should add redacted Telegram proof, terminal output, copied live output, or logs, then update the PR body to trigger a fresh review or ask a maintainer for @clawsweeper re-review.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove status: 📣 needs proof: Current PR status label is status: 🔁 re-review loop.

Label justifications:

  • P2: The PR addresses a plausible false abort in a channel workflow, but it is a narrow trigger-list change with limited blast radius.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 🔁 re-review loop: A fresh ClawSweeper review was explicitly requested after the latest review. Needs real behavior proof before merge: The PR body lists only a unit command; before merge the contributor should add redacted Telegram proof, terminal output, copied live output, or logs, then update the PR body to trigger a fresh review or ask a maintainer for @clawsweeper re-review.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. This changes visible Telegram abort handling and can be shown in a short Telegram chat proof.
Evidence reviewed

PR surface:

Source -1, Tests +3. Total +2 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 0 1 -1
Tests 1 5 2 +3
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 5 3 +2

What I checked:

  • Current main treats wait as an abort trigger: ABORT_TRIGGERS includes wait, and isAbortRequestText delegates normalized text to isAbortTrigger, so a plain wait can currently enter abort handling. (src/auto-reply/reply/abort-primitives.ts:10, f936c6b49504)
  • Abort detection reaches cancellation and queue cleanup: tryFastAbortFromMessage calls isAbortRequestText before authorization, then clears/aborts target session work and returns a handled abort result when authorized. (src/auto-reply/reply/abort.ts:310, f936c6b49504)
  • Telegram uses the same predicate for visible control behavior: Telegram control-lane and reply-fence logic call isAbortRequestText, so fixing the shared predicate also keeps Telegram lane/fence classification consistent. (extensions/telegram/src/sequential-key.ts:87, f936c6b49504)
  • PR diff is narrow and covered by focused expectations: The patch removes only the wait trigger literal and adds negative assertions for wait and please wait while leaving explicit stop command expectations intact. (src/auto-reply/reply/abort.test.ts:285, b22a0698ed22)
  • Telegram maintainer note requires real behavior proof: The Telegram review note says Telegram behavior PRs need real Telegram proof when they touch transport, authorization, reply context, or similar visible behavior; this PR body only lists a unit command. (.agents/maintainer-notes/telegram.md:37, f936c6b49504)
  • History points to the current trigger block: git blame attributes the current wait trigger line to commit 36e7f214db720459c4121f35b2edbf7077b98b6f, while older history shows several abort/Telegram contributors around this area. (src/auto-reply/reply/abort-primitives.ts:10, 36e7f214db72)

Likely related people:

  • xingzhou: git blame on the current ABORT_TRIGGERS block attributes the wait line to 36e7f214db720459c4121f35b2edbf7077b98b6f. (role: visible blame introducer; confidence: medium; commits: 36e7f214db72; files: src/auto-reply/reply/abort-primitives.ts)
  • steipete: Recent history includes multiple refactors and tests around reply abort, command authorization, and Telegram runtime seams. (role: recent area contributor; confidence: medium; commits: b402770f63be, 9168f2147f74, 9924627f49ca; files: src/auto-reply/reply/abort.ts, src/auto-reply/reply/abort.test.ts, extensions/telegram/src/sequential-key.ts)
  • vincentkoc: History shows repeated recent work on Telegram callbacks/control paths and auto-reply abort trigger semantics near this surface. (role: recent adjacent contributor; confidence: medium; commits: 3034adfdb34a, 91391bbe01ab, 7bb08ba94594; files: src/auto-reply/reply/abort.test.ts, extensions/telegram/src/bot-handlers.runtime.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • 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.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P2 Normal backlog priority with limited blast radius. labels Jul 1, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Jul 2, 2026
@ianchen08
ianchen08 force-pushed the ianchen08/remove-wait-abort-trigger branch from 6df16f9 to 49fc6a6 Compare July 2, 2026 04:53
@ianchen08

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Updated the PR body with the required What Problem This Solves and Evidence sections, fixed the channel debounce expectation for wait, and pushed a refreshed head SHA.

Current validation:

  • Real behavior proof: passed
  • build-artifacts: passed
  • Local focused tests: pnpm test src/auto-reply/reply/abort.test.ts src/channels/inbound-debounce-policy.test.ts

@clawsweeper

clawsweeper Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: 🔁 re-review loop A fresh ClawSweeper review was explicitly requested after the latest review. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 2, 2026
@steipete steipete self-assigned this Jul 7, 2026
@steipete
steipete force-pushed the ianchen08/remove-wait-abort-trigger branch from 49fc6a6 to 75f804b Compare July 7, 2026 01:52
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Jul 7, 2026
@steipete

steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Land-ready maintainer pass complete on exact head 75f804bddd221d7693b11341c11ff9cbc0e27fad.

  • Best-fix check: the shared abort predicate is the right owner boundary. Removing wait once in src/auto-reply/reply/abort-primitives.ts keeps fast abort, generic control classification, Telegram control-lane selection, reply-fence behavior, and inbound classification consistent; caller-specific Telegram/debounce exceptions would be the wrong layer.
  • Fixup: rebased onto current main and removed the stale wait abort claim from docs/help/faq.md.
  • Regression coverage: src/auto-reply/reply/abort.test.ts verifies wait and please wait are not abort requests; src/channels/inbound-debounce-policy.test.ts verifies wait is normal debounced text while explicit abort controls remain immediate.
  • Exact-head CI: all required source, docs, type, lint, contract, QA, and build lanes passed in run 28835882243.
  • Fresh autoreview: .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --engine codex --model gpt-5.5 --thinking high completed clean with no accepted/actionable findings.
  • Live-proof boundary: credentialed Telegram execution was intentionally not run against untrusted contributor source. A sanitized public-network AWS Crabbox warmup was attempted but did not allocate under current parallel capacity; exact-head canonical secretless CI is green.

No blocking findings remain. Ready to merge.

@steipete
steipete merged commit a27e3f3 into openclaw:main Jul 7, 2026
108 of 110 checks passed
@steipete

steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 7, 2026
* fix(auto-reply): stop treating wait as abort trigger

* test(channels): treat wait as debounced text

* docs: remove wait from abort phrases

---------

Co-authored-by: Ian Chen <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
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 mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 🔁 re-review loop A fresh ClawSweeper review was explicitly requested after the latest review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants