Dual-Representation Message Invariant
- Entity ID:
ent-20260423-r31a000000043 - Type:
pattern - Scope:
private - Status:
active
Description
Architectural invariant enforced by the Three-Stage Message Pipeline: CLI-specific fields (uuid, timestamp, progress) must never reach the API, and API-format fields (role, content) must be populated without re-deriving them from the CLI representation. Implemented by embedding an APICompatibleMessage field inside CliMessage so the API payload can be extracted unchanged.
Key claims
- Claude Code maintains three simultaneous message representations
Relations
- Dual-Representation Message Invariant --[constrains]--> Three-Stage Message Pipeline