Skip to main content

Module continued_note

Module continued_note 

Source
Expand description

The pick-up note: when a fresh session continues a pane’s conversation from AgentMux’s record (after an account switch, typically), the agent says nothing until the user types, because the record only rides on the first message (continuity::prefix_user_message). So once the session’s “Given to the agent” card is written, the pane gets one ambient narration line: where things stand, then “How can I help?”.

View-only, like every ambient narration: it never enters the CLI transcript and the record still goes with the first message. Best-effort: a slow, capped or failed model call means no note, never a held-up session.

Structs§

Notes 🔒
The latest spawn of each pane that carries the record, and when each pane last showed a note.

Constants§

CARD_POLL 🔒
CARD_SLACK_MS 🔒
A card composed this long before the spawn was recorded still counts: the hook can run before the spawn path reaches its bookkeeping.
CARD_WAIT 🔒
How long to wait for the new session’s card before writing the note anyway (a provider without the startup hook never writes one).
KIND 🔒
The narration kind the pane receives.
REPEAT_WINDOW_MS 🔒
One note per pane in this window: a resume the CLI rejects respawns within the same launch, and the retry carries the record again.

Statics§

NEXT_TOKEN 🔒
NOTES 🔒

Functions§

is_user_message 🔒
Whether a stdin line is a message the user sent: a type: user frame that isn’t AgentMux’s hidden memory re-delivery (<system-reminder> + the reinjection signature). Control responses and hidden turns don’t cancel the note.
notes 🔒
schedule 🔒
Schedules the note for a session spawned at spawned_ms carrying record. record_pending turns false when the record goes out with the user’s first message: by then the user has spoken, and the note is dropped.