Skip to content

BTW usage string <side question> placeholder eaten by markdown channels #62877

@BrilliantWang

Description

@BrilliantWang

Problem

commands-btw.ts:7 defines:

const BTW_USAGE = "Usage: /btw <side question>";

When a user sends /btw with no question, this string is returned to the channel as-is. Channels that render replies as markdown (e.g. dingtalk, slack, anything HTML-based) interpret <side question> as an unknown HTML tag and strip it, so the user sees:

Usage: /btw 

Verified on dingtalk channel today via real-device test.

Why fix it in openclaw

Channels are transparent passthroughs — they receive a markdown string and cannot disambiguate <side question> (placeholder) from <https://example.com> (autolink) from a literal HTML tag. Only the producer (openclaw) knows the semantics. Globally escaping < > in the channel would break legitimate autolinks.

Suggested fix

Wrap the placeholder in backticks so it survives markdown rendering:

const BTW_USAGE = "Usage: \`/btw <side question>\`";

Or escape:

const BTW_USAGE = "Usage: /btw \\<side question\\>";

Backticks are preferred — they also visually distinguish the command from prose.

Scope

Likely the same pattern exists for other slash-command usage strings (`/stop`, `/approve`, …). A quick grep for `Usage:` and `<.*>` in command handler text would catch them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions