Skip to content

chat.inject needs user-role replay and stable caller IDs for synthetic turns #79820

Description

@sunil-chandran

Loreva uses deterministic API fast paths for some assistant replies and needs to keep OpenClaw session transcripts coherent with the user-visible chat log. OpenClaw 2026.5.7 exposes chat.inject, but live probing shows the schema only accepts { sessionKey, message }. It rejects role, messageId/clientMessageId/id, and metadata/source fields as unexpected properties.\n\nCurrent behavior:\n- role is always assistant\n- the gateway assigns messageId\n- no metadata channel is available\n- the schema is closed\n\nRequested contract:\n- allow injecting user-role turns, or provide a companion user-turn replay method\n- support a stable client-supplied idempotency/client message id, or return enough IDs for callers to persist a durable cross-reference\n- document the transcript parent-chain behavior for injected user -> assistant pairs\n\nUntil this exists, Loreva can only replay synthetic assistant turns and must intentionally defer user-turn replay.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.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:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions