Skip to content

Regression: multiline slash skill arguments are truncated after first newline #79155

Description

@web3blind

Summary

Multiline arguments for slash commands are truncated when the payload starts on the next line after the command.

Example:

/some-command
first line of payload
second line of payload
third line of payload

The command handler receives only the first payload line. The remaining lines are dropped before downstream command/skill handling.

Impact

This breaks any command workflow that expects long user-provided text, drafts, logs, prompts, or structured multiline input after a slash command.

This appears to be a regression. Multiline command payloads were working in older April builds, but the issue is present on package version 2026.5.6.

Root cause suspected

In the installed runtime file:

/usr/lib/node_modules/openclaw/dist/commands-registry-normalize-NkmLFbPc.js

normalizeCommandBody() normalizes slash commands by taking only the first line:

const newline = trimmed.indexOf("\n");
const singleLine = newline === -1 ? trimmed : trimmed.slice(0, newline).trim();

Downstream command invocation then parses arguments from the normalized command body, so multiline payloads are no longer available.

For multiline slash command usage, the command head should be normalized, but the tail after the first newline should remain available as command args.

Expected behavior

For a message like:

/some-command
line 1
line 2
line 3

The command should receive the full multiline payload:

line 1
line 2
line 3

Actual behavior

Only the first payload line is preserved.

Local hotfix tested

A local patch preserving the tail after the first newline fixes the direct normalizer test:

const newline = trimmed.indexOf("\n");
const singleLine = newline === -1 ? trimmed : trimmed.slice(0, newline).trim();
const multilineTail = newline === -1 ? "" : trimmed.slice(newline);
// normalize command head as before...
const commandBody = multilineTail ? `${commandHead}${multilineTail}` : commandHead;

After restarting the gateway:

normalizeCommandBody('/some-command\nline1\nline2\nline3')
// => '/some-command\nline1\nline2\nline3'

Notes

This likely affects any slash command where users put multiline content after the command name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions