Repository navigation
fix: multi-line /steer messages lose every line after the first - #146009
Conversation
|
🦞👀 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 15, 2026, 6:32 AM ET / 10:32 UTC (Revision 6). ClawSweeper reviewWhat this changesPreserves multiline /steer and /tell instructions through command normalization and keeps configured reset triggers working with newline or tab separators. Merge readiness✅ Ready for maintainer review The fix remains necessary: current main still truncates multiline steering instructions. The focused patch preserves existing reset behavior, and the supplied before/after evidence supports the repair; no actionable correctness defect was found. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw normalizes incoming slash commands before dispatching them to command handlers. Steering turns the remaining text into guidance for the active run or a normal prompt, while configured reset triggers pass through session initialization. flowchart TD
A[Incoming slash command] --> B[Command normalization]
B --> C[Authorized reset detection]
C -->|Configured reset| D[Session initialization]
C -->|Steering command| E[Steering handler]
E --> F[Active run or normal prompt]
D --> F
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +6, Tests +56. Total +62 across 4 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep multiline preservation in the shared normalizer, with reset detection consuming the same whitespace contract and existing authorization. Do we have a high-confidence way to reproduce the issue? Yes: current-main normalization demonstrably drops later lines before the steering handler receives them, matching the paired report and supplied before capture. This read-only review did not execute target code. Is this the best way to solve the issue? Yes: extending the existing preservation policy fixes the producer of the truncated input, and the reset-reader adjustment preserves configured-trigger compatibility without a parallel parser. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2b8c9f1ad64a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
Added the after-fix real channel evidence, and updated the PR body with it. The messages now go in over the repository's I do not have access to the Telegram Test Server credential pool, so that lane is not available to On the red checks, none of them are caused by this diff, and the PR body now records this:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
landpr-approve-admin-merge |
|
landpr-approve-admin-merge |
|
landpr-approve-unrelated-red |
|
Thanks @masatohoshino! Proof: Raw WebChat
|
…claw#146009) ## What Problem This Solves Multiline `/steer` and `/tell` messages lose later lines when incoming command text still contains newlines. A command-only first line returns usage. Closes openclaw#146007. ## Why This Change Was Made Extend the existing argument-preservation policy from goal to steer. Normalized command text has one writer. Match whitespace consistently in the reset reader so a configured `/steer` trigger still resets with newline or tab separators; authorization and anchored payload extraction stay unchanged. Production: `commands-registry-normalize.ts` +7/-2; `session-reset-command.ts` +2/-1. Tests: `commands-steer.test.ts` +17; `session.test.ts` +39. No new owner or configuration key. Growth accepted under the owner's standing acceptance (2026-09-15). ## User Impact Complete instructions reach the active run or normal idle fallback. Configured reset commands keep resetting the conversation with the complete payload. ## Evidence Raw WebChat `chat.send` reproduced truncation on main `0da26ff6b4cc`. Retained real-Gateway recordings at `26d6274c2d67` passed three active-run and three idle cases with a deterministic provider. Each active case was matched to the original held task, and its complete current instruction was inspected at the provider boundary. Empty usage stayed correct. The Control UI's local steering shortcut removes the command prefix and is a separate path. The reset regression fails on `26d6274c2d67` for newline and tab delimiters, then passes with this correction. The non-boundary `/steering` case keeps the existing conversation. These tests call `initSessionState` with seeded state and check the reset revision and complete payload. ## Compatibility No configuration, schema, dependency, or API shape change. Group mention processing and some adapters flatten newlines before normalization; that separate formatting issue is outside this change. Per-channel scope comes from source inspection unless a runtime capture is cited. ## Consumers Shared text-command callers with newline-preserving ingress, plus configured reset detection during admission and session initialization. ## Invalidation No cache lifecycle change. ## Tests The three steering regressions exercise the real command-context builder and registered handler; the retained Gateway proof establishes delivery beyond that boundary. The pinned merge includes main `0da26ff6b4cc`, where 79 focused tests passed before this correction. All 259 tests passed across session initialization, steering, and reset-model suites. After correcting two fixture typing errors, the three seeded-session cases passed again on `d86aebfa4701`. The existing session test file is selected once by the hosted test command. Historical CI failures have retained timing/compiler-launch evidence and passing focused checks with upstream repairs openclaw#148107 and openclaw#146491. Historical base/parent reruns and full current hosted CI are not claimed. | Before | After | | --- | --- | |  |  | Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Multiline
/steerand/tellmessages lose later lines when incoming command text still contains newlines. A command-only first line returns usage. Closes #146007.Why This Change Was Made
Extend the existing argument-preservation policy from goal to steer. Normalized command text has one writer. Match whitespace consistently in the reset reader so a configured
/steertrigger still resets with newline or tab separators; authorization and anchored payload extraction stay unchanged.Production:
commands-registry-normalize.ts+7/-2;session-reset-command.ts+2/-1. Tests:commands-steer.test.ts+17;session.test.ts+39. No new owner or configuration key.Growth accepted under the owner's standing acceptance (2026-09-15).
User Impact
Complete instructions reach the active run or normal idle fallback. Configured reset commands keep resetting the conversation with the complete payload.
Evidence
Raw WebChat
chat.sendreproduced truncation on main3869ac66de02. Retained real-Gateway recordings at26d6274c2d67passed three active-run and three idle cases with a deterministic provider. Each active case was matched to the original held task, and its complete current instruction was inspected at the provider boundary. Empty usage stayed correct. The Control UI's local steering shortcut removes the command prefix and is a separate path.The reset regression fails on
26d6274c2d67for newline and tab delimiters, then passes with this correction. The non-boundary/steeringcase keeps the existing conversation. These tests callinitSessionStatewith seeded state and check the reset revision and complete payload.Compatibility
No configuration, schema, dependency, or API shape change. Group mention processing and some adapters flatten newlines before normalization; that separate formatting issue is outside this change. Per-channel scope comes from source inspection unless a runtime capture is cited.
Consumers
Shared text-command callers with newline-preserving ingress, plus configured reset detection during admission and session initialization.
Invalidation
No cache lifecycle change.
Tests
The three steering regressions exercise the real command-context builder and registered handler; the retained Gateway proof establishes delivery beyond that boundary. The pinned merge includes main
3869ac66de02, where 79 focused tests passed before this correction. All 259 tests passed across session initialization, steering, and reset-model suites. After correcting two fixture typing errors, the three seeded-session cases passed again ond86aebfa4701. The existing session test file is selected once by the hosted test command.Historical CI failures have retained timing/compiler-launch evidence and passing focused checks with upstream repairs #148107 and #146491. Historical base/parent reruns and full current hosted CI are not claimed.