Skip to content

fix: multi-line /steer messages lose every line after the first - #146009

Merged
obviyus merged 4 commits into
openclaw:mainfrom
masatohoshino:fix/commands-registry-normalize-334aa5
Sep 15, 2026
Merged

obviyus merged 4 commits into
openclaw:mainfrom
masatohoshino:fix/commands-registry-normalize-334aa5

Conversation

@masatohoshino

@masatohoshino masatohoshino commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

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 #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 3869ac66de02. 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 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 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 #148107 and #146491. Historical base/parent reruns and full current hosted CI are not claimed.

Before After
Before After

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

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 6:32 AM ET / 10:32 UTC (Revision 6).

ClawSweeper review

What this changes

Preserves 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
Reviewed head: 662838f1fcdc277244a24bdbbc01836ad16e8cb9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with useful before/after evidence, meaningful regression coverage, and no blocking source finding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after captures show all three multiline steering outcomes corrected, supported by the captured real-Gateway active/idle runs and provider-boundary observations. Seeded-session regressions supplement the reset correction; Telegram-specific runtime behavior is not claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after captures show all three multiline steering outcomes corrected, supported by the captured real-Gateway active/idle runs and provider-boundary observations. Seeded-session regressions supplement the reset correction; Telegram-specific runtime behavior is not claimed.
Evidence reviewed 7 items Current main still needs the fix: At fetched main, argument preservation explicitly selects goal, while registered steering commands still lose the multiline tail. The handler subsequently replaces agent-input projections with that truncated argument.
Latest release retains truncating normalization: The v2026.9.4 source slices at the first newline unless the caller explicitly requests argument preservation. After local release-blob retrieval failed, the GitHub contents endpoint supplied the source successfully.
Pinned change and review continuity: The independently inspected base-to-head diff matches the supplied introduced hunks. Comparing the previous reviewed head with the current head produced no differences in the four affected files; the latest commit does not invalidate the previous functional review.
Findings None None.
Security None None.

How this fits together

OpenClaw 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
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +6, Tests +56. Total +62 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 9 3 +6
Tests 2 56 0 +56
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 65 3 +62

Review metrics

None.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #146007
Summary: This PR is the implementation candidate for the paired multiline-steering report.

Members:

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

Technical review

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

Labels

Label justifications:

  • P2: Repairs silent instruction truncation in a bounded slash-command workflow without adding configuration or changing routing.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after captures show all three multiline steering outcomes corrected, supported by the captured real-Gateway active/idle runs and provider-boundary observations. Seeded-session regressions supplement the reset correction; Telegram-specific runtime behavior is not claimed.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after captures show all three multiline steering outcomes corrected, supported by the captured real-Gateway active/idle runs and provider-boundary observations. Seeded-session regressions supplement the reset correction; Telegram-specific runtime behavior is not claimed.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after captures show all three multiline steering outcomes corrected, supported by the captured real-Gateway active/idle runs and provider-boundary observations. Seeded-session regressions supplement the reset correction; Telegram-specific runtime behavior is not claimed.
  • proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. Preserving multiline /steer and /tell text can change visible Telegram replies and is observable through the Test Server userbot lane.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-12T14:08:04.633Z sha f5d2c39 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-12T15:17:02.001Z sha f5d2c39 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-15T07:44:20.136Z sha 26d6274 :: needs changes before merge. :: none
  • reviewed 2026-09-15T08:29:03.748Z sha d86aebf :: needs changes before merge. :: none
  • reviewed 2026-09-15T09:06:26.757Z sha d86aebf :: needs maintainer review before merge. :: none

@masatohoshino

Copy link
Copy Markdown
Contributor Author

Added the after-fix real channel evidence, and updated the PR body with it.

The messages now go in over the repository's qa-channel transport to a Gateway started as a real
child process from the built CLI; only the model provider is replaced by the repository's mock
provider server. The second line of each message carries the mock's reply exactly directive, so
the marker can only reach the channel when the whole message reached the agent. Before the fix,
/steer and /tell delivered a prompt ending at stop the deploy and the marker never came back;
the /steer-then-message-on-the-next-line case produced no provider request at all and answered
Usage: /steer <message>. After the fix all three deliver the whole message and the marker comes
back to the channel. The table and the raw observation are in the Evidence section.

I do not have access to the Telegram Test Server credential pool, so that lane is not available to
me; the run above is the closest real channel-to-agent evidence I can produce, and it runs on
loopback with an isolated temporary state directory and no credentials.

On the red checks, none of them are caused by this diff, and the PR body now records this:

  • checks-node-compact-small-11 failed in test/scripts/check-extension-package-tsc-boundary.test.ts
    while spawning the native TypeScript compiler, with process.execve failed with error code ETXTBSY
    (exit 134) — a host-level "text file busy" on the staged compiler binary. The same job name fails
    on main pushes with a different single test, for example
    https://github.com/openclaw/openclaw/actions/runs/34697441869.
  • checks-node-compact-large-30 failed in
    src/gateway/server-methods/models-auth-login.catalog.integration.test.ts
    (models.authLogin publishes account rows to passive models.list (endpoint delay 7000 ms)) with
    expected [] to include 'account-exclusive'. That wall-clock-sensitive Gateway test was added on
    main by fix(models): discover account models after sign-in #145190, after this branch's merge base, and
    this PR touches no Gateway code.
  • openclaw/ci-gate is the aggregate gate and fails only because of that shard.

@masatohoshino

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 12, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 12, 2026
@obviyus
obviyus marked this pull request as draft September 15, 2026 07:37
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 15, 2026
@obviyus

obviyus commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

landpr-approve-admin-merge
pr: 146009
head: d86aebf
scope: owner-review

@obviyus
obviyus marked this pull request as ready for review September 15, 2026 09:02
@obviyus

obviyus commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

landpr-approve-admin-merge
pr: 146009
head: 662838f
scope: owner-review

@obviyus

obviyus commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

landpr-approve-unrelated-red
pr: 146009
head: 662838f
run: 34957688576 attempt: 2
failed: checks-node-compact-large-27 job=104352790857 conclusion=failure
failed: checks-node-compact-large-29 job=104352791002 conclusion=failure
failed: checks-node-compact-large-6 job=104352790848 conclusion=failure
failed: checks-node-compact-large-7 job=104352790844 conclusion=failure
check: openclaw/ci-gate

@obviyus
obviyus merged commit 88696dc into openclaw:main Sep 15, 2026
370 of 385 checks passed
@obviyus

obviyus commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Thanks @masatohoshino!

Proof: Raw WebChat /steer and /tell messages preserve complete instructions in active runs and idle fallback. Seeded-session tests also verify configured reset triggers with newline and tab separators.

  • Bug: Multiline steering commands silently lost later lines or returned usage.
  • Fix: Preserve the complete command argument and keep configured reset boundaries consistent.
Before After
Later instruction lines disappeared. The complete instruction reaches the run or normal fallback.
Preserved newline or tab could bypass a configured reset. The configured trigger resets with the complete payload.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 16, 2026
…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 |
| --- | --- |
| ![Before](https://github.com/user-attachments/assets/0474c4a2-1f19-4be8-b644-68db0c01a0e8) | ![After](https://github.com/user-attachments/assets/0aa13924-364d-4af5-9484-497b2cb9cbd0) |

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Multi-line /steer (/tell) drops every line after the first

2 participants