Skip to content

Require message identity on every assistant message - #524

Merged
SaladDay merged 2 commits into
aos/cutoverfrom
aos/r4-message-identity
Oct 7, 2026
Merged

SaladDay merged 2 commits into
aos/cutoverfrom
aos/r4-message-identity

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Every assistant message now arrives with its identity, and Core projects message Items through one path.

  • Adapters: codex, the Claude SDK bridge and MiniMax Code send each assistant message as an output_message with an ID, followed by deltas that name it and a completed message carrying the full text. MiniMax Code assigns one Item per ACP messageId; a chunk without an ID, or for a message that already ended, fails the Turn with a typed error. DeltaPayload.Validate requires item_id.
  • Core: one projection path for message Items. Deleted: the legacy-message key, LegacyFinal and its Merge exception, NeedsNativeMessage, Stored.NativeMessage, the HasNativeMessageItem query, PromptRequestPayload.ObserveMessages, the MessageItems capability and the adapters' branches for it, and the DonePayload.Content projection. The live tests read message Items.
  • Qualification rig: qualify_linux_test.go binds before prepare, as the runtime protocol has required since Route Environment work through one owner #510.
  • Docs: docs/runtime-protocol.md and harness-onboarding.md make message identity mandatory (+zh).

proto.Version is unchanged; the final merge bumps it once. Net −121 lines.

Blind review (fresh Claude subagent): merge after fixes. Fixed: MiniMax Code rejects a resumed message ID, and the dead AppendText branch in items.Merge is gone. Deferred to R6: a Runtime frame that fails projection (a delta without item_id, or an invalid output_message) is classified as event_persistence_failed rather than invalid_executor_result. Left as is: a MiniMax Code message stays open across later tool calls until the next message or the end of the Turn, because ACP marks no message end.

Checks: proto, the daemon agent/..., dispatch and cli packages; Core items, execution, runtimegateway, sessionpg and api; the Core integration suite; darwin/windows daemon builds; node --test in the Claude SDK adapter; make check-names check-docs check-ci.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@SaladDay
SaladDay merged commit 1df24db into aos/cutover Oct 7, 2026
@SaladDay
SaladDay deleted the aos/r4-message-identity branch October 7, 2026 19:08
Every adapter now delivers each assistant message as an identified
output_message start, deltas that name it, and a completed snapshot.
The shared validator rejects a delta without item_id, so Core keeps one
Item path: the legacy message projection, the native-message query, the
observe_messages request field, the message_items capability and
DonePayload.Content are deleted. MiniMax Code completes each ACP message
by its native messageId when the next one starts or the Turn ends.

The agent-host qualification rig binds the Session's assignment before
it prepares, which execution admission requires, and reads the answer
from completed message Items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant