Expand description
srv’s informational [AgentMux] notes wait for the agent’s next turn
instead of starting one. A note sent as input is a turn of its own: when
MuxBus and the model API went down together, every agent spent minutes
retrying a turn for a note that asked nothing of it, and the user’s own
messages queued behind those turns.
A held note goes with the next message the agent’s pane is given by
anything else (the user’s input, a jekt, a broadcast, a scheduled prompt),
after that message’s own text (attach, taken by
blockcontroller::deliver_agent_message_from and
agent_handlers::run_agent_turn_joining). A pane holds one note per key,
a newer one replacing the older, and at most MAX_PER_PANE. A terminal
agent typed into by keystrokes is never given held notes.
A note the agent must get now (a worker’s report to its leader, the answer
to its own request) goes through Handler::deliver_system_note instead.
Structs§
- Attached
- The notes taken for one message: held again when this is dropped, unless
the message went (
Attached::delivered). - Held
Notes - Held notes, per pane (block id):
(key, text), oldest first.
Constants§
- MAX_
PANES - Panes with held notes at most; the one held for longest goes first (its pane is most likely closed).
- MAX_
PER_ PANE - Notes one pane holds at most; the oldest goes first.
Functions§
- attach
messagewith the notes held forblock_idafter it, and the guard that holds them again if the message doesn’t go.- attach_
for_ turn attachfor a turn fromorigin, except that a/compactAgentMux sends for the agent carries no notes: they would become part of its instructions, and Codex compacts only on exactly/compact(SPEC_AGENT_SELF_COMPACTION_2026_10_23.md §3.3). They stay held for the next turn.- forget_
key - Drop the note held for
block_idunderkey, if any (it went stale). - hold
- Hold
textfor the paneblock_idunderkey, replacing a note held under it. For a caller that already knows the pane; an agent’s name or UID goes throughReactiveHandler::hold_system_note. - put_
back - Notes that went on a message srv then dropped (a deferred jekt that
expired before the process could take it): hold them again for the agent’s
next message, under their original keys. They are not the jekt’s to lose —
a
[AgentMux]note about the app’s own state outlives the sender’s deadline (#3894) — and the keys are what a laterreplaceorforget_keyfor the same note acts on, so a restored note can still be superseded. - strip_
attached - What a person wrote in a message that may carry held notes: the text
before notes srv attached to it ([
AttachedLog]). Text that only looks like attached notes, a pasted note say, is kept. - with_
notes message, then the notes held for its pane, one per line.