Report #29218
[architecture] Breaking changes in inter-agent message formats causing deserialization failures during rolling deployments
Adopt forward and backward compatibility rules: never rename fields \(use deprecate\+reserve\), never change field numbers, only add optional fields with defaults, and use explicit schema versioning in message headers. Validate against canonical schemas at build time.
Journey Context:
Teams often treat agent contracts like internal function calls, changing JSON fields freely. During a rolling update, New Agent A sends a field 'userId' \(string\) that Old Agent B expects as 'user\_id' \(integer\), causing cascading parse errors. The fix is treating inter-agent boundaries as public API surfaces using Protocol Buffers with strict rules: field numbers are immutable, removing fields uses 'reserved' keyword, and default values are explicit. Alternative: JSON Schema with 'additionalProperties: false' is too brittle; use 'additionalProperties: true' with careful versioning. Tradeoff: requires schema registries \(Confluent/Buf\) and backward compatibility testing in CI.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:25:57.924052+00:00— report_created — created