Skip to content

Warnings are emitted as agent_message_chunk and indistinguishable from assistant replies #340

Description

@roshangautam

Summary

codex-acp emits adapter-generated diagnostics as ACP agent_message_chunk updates, the same update kind used for genuine assistant-authored replies. Downstream consumers therefore cannot distinguish a warning from model prose without unsafe text matching.

Current behavior

In 1.1.0 and the current 1.1.7 release:

  • createTextEvent() emits genuine model deltas through createAgentTextMessageChunk(...).
  • createConfigWarningEvent() emits Config warning: ... through the same helper.
  • createWarningEvent() emits Warning: ... through the same helper.
  • Other adapter-generated notices, including review-mode and lifecycle messages, also use agent_message_chunk.

A downstream ACP runtime such as ACPX consequently produces the same structural event for both:

{"type":"text_delta","stream":"output","tag":"agent_message_chunk","text":"..."}

The unknown-model warning visible in paperclipai/paperclip#1465 is one concrete trigger.

Impact

Consumers that relay assistant replies to another surface can misattribute adapter diagnostics as if the assistant authored them. Failing closed by dropping every agent_message_chunk also drops genuine replies, so neither available choice is correct.

Expected behavior

Non-assistant diagnostics should not be emitted as agent_message_chunk. Please either:

  1. route warnings/status/lifecycle notices through a non-assistant ACP update kind, or
  2. add a stable machine-readable origin/provenance discriminator and coordinate with runtimes so it survives normalization.

The discriminator must be structural; matching warning text is not safe because an assistant may legitimately quote or explain the same warning.

Versions verified

  • @agentclientprotocol/codex-acp 1.1.0
  • @agentclientprotocol/codex-acp 1.1.7 (latest on npm at filing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions