Skip to main content

Module continuity

Module continuity 

Source
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§

RunningState 🔒
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 None when 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 🔒
text redacted, then cut to TURN_CAP_CHARS. In that order: a cut through a secret could leave a fragment too short for redact_secrets to 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 🔒
token as an identifier, or None when 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) with packet placed ahead of its content, when it is a user message; None for 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.