Skip to content

message send --json should expose a top-level messageId #84186

@100menotu001

Description

@100menotu001

Summary

openclaw message send --json does not expose a stable top-level message id even when the provider receipt contains one.

Current behavior

The JSON output includes the raw provider payload, so callers have to know provider-specific nested shapes such as payload.result.messageId.

Expected behavior

When the send result contains a message id, the CLI JSON output should also include a top-level messageId while preserving the raw provider payload for compatibility.

Why this matters

Automation that sends a message and then edits, verifies, or links to it needs a stable field to read. A top-level id avoids brittle provider-specific JSON parsing.

Suggested scope

Keep this to output shaping:

  • Extract messageId from common send receipt shapes.
  • Add it to JSON output only when present.
  • Preserve the existing payload object unchanged.
  • Cover the nested receipt case with a focused CLI test.

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.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    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