Expand description
Continuation packet (SPEC_DURABLE_CONVERSATION_MEMORY_2026_09_23.md §4.4, deterministic form). When a pane shows prior history but its process starts fresh — the provider can’t resume it, e.g. after an account switch — the first user message carries AgentMux’s own record of the conversation, so the model continues instead of starting blind.
Structs§
- Running
State 🔒 - AgentMux’s running summary of the whole conversation
(
continuity_state.rs): its text, and when it was written.
Enums§
- Turn 🔒
Constants§
- MAX_
IDENTIFIERS 🔒 - Most identifiers the packet lists.
- MAX_
IDENTIFIER_ 🔒CHARS - Longer tokens are prose or data, not identifiers.
- PACKET_
BUDGET_ 🔒CHARS - PACKET_
CLOSE 🔒 - PACKET_
OPEN 🔒 - PACKET_
TAIL_ 🔒BYTES - How much of the pane’s transcript to read. Streaming deltas are ~90% of its bytes, so a busy agent needs megabytes to cover a few exchanges.
- TURN_
CAP_ 🔒CHARS
Functions§
- build_
continuation_ 🔒packet - The packet for a transcript tail, or
Nonewhen it holds no user message to continue from.state, when the agent has one, goes first: it covers what happened before the verbatim tail begins (§4.4: state first, tail last). - cap 🔒
- capped_
turn_ 🔒text textredacted, then cut toTURN_CAP_CHARS. In that order: a cut through a secret could leave a fragment too short forredact_secretsto recognize (ReAgent P1 on #3673).- defuse_
delimiters 🔒 - History text with the packet’s tag name defused (any case), so quoted content can’t open or close the packet and escape its “this is history” framing. U+2011 (non-breaking hyphen) keeps it readable.
- identifier 🔒
tokenas an identifier, orNonewhen it isn’t one.- identifiers 🔒
- PR and issue numbers, URLs, file paths and commit ids from the record, deduplicated and newest first (§4.4: “exact identifiers survive verbatim … extracted deterministically … not paraphrased by the summarizer”). The running summary sometimes attaches the right commit to the wrong PR; this list is what it can be checked against. Extracted from redacted text, so a credential inside a URL never makes the list.
- is_
relayed 🔒 - A message another agent relayed through the bus, not one a person typed.
- prefix_
user_ 🔒message line(one stream-json stdin envelope) withpacketplaced ahead of its content, when it is a user message;Nonefor anything else (control responses must pass through untouched).- render 🔒
- tool_
summary 🔒 - turns_
from_ 🔒stream - The record’s user and assistant turns, oldest first. Tool output is left out (it can be huge and replaying it is an injection surface); hidden memory-reinjection turns and the model’s replies to them are skipped, the same way the pane hides them.
- user_
text 🔒 - A typed message’s text: AgentMux stores it as a string; the CLI’s own frames use block arrays. A block array with no text is a tool-result frame, not something a person typed.