Expand description
What a session’s transcript says about its mail: the lines its own user typed, and when each message reached the model.
The mailbox records a message as SENT: filed for its session and handed to the session’s door. Only the harness’s transcript records it as DELIVERED: in the model’s context. The two differ whenever the session is busy, since a message handed to a harness mid-turn waits in its queue until the running tool call returns. This module reads the transcript for both halves of that.
A line a person types into a session reaches it through the harness’s own composer, not through supercode, so no envelope is filed for it. Claude Code records each one:
- typed at an idle prompt: a
userentry markedpromptSource: typed; - typed while the session was busy: a
queue-operationenqueue(sent), then either adequeueand auserentry markedpromptSource: queued, or aremove(absorbed_mid_turn) and aqueued_commandattachment from a human (delivered).
file_typed_lines files each as a user envelope in the session’s
mailbox, so it has an id like every other message. The id is derived from
the session’s address, the moment the line was sent and its words, so it is
the same before and after the line reaches the model, and every reader
derives the same one. A line supercode itself typed into the session’s pane
(a Room member’s or a voice turn) is filed already under its own id.
Mail supercode filed reaches the model as its rendering,
<cross-session-message id="m-…", inside a prompt or a queued-command
attachment; a Room or voice turn reaches it as a typed line with its words.
Codex rollouts do not record who wrote a user message (a typed line and the injected AGENTS.md or environment context look alike), and other harnesses’ records are not read here: their typed lines are not filed and their mail’s delivery is unknown.
Structs§
- Answer
- One answer the session gave its user: a turn’s final message.
- Transcript
Mail - What one transcript says about a session’s mail.
- Typed
Line - One line the session’s user typed, as its transcript records it.
Enums§
- Delivery
- Where a message stands.
Constants§
- ANSWER_
ID_ PREFIX - Prefix of the id of a session’s answer to its user.
- TYPED_
ID_ PREFIX - Prefix of the id of a line a session’s user typed.
Functions§
- answer_
id - The id of the answer the transcript entry
native_idrecords in the session ataddress:a-and 24 hex digits. - deliveries
- Where each of
stored(the mailbox of the session ataddress) stands, by id, as the transcript readingmailshows it (None: unreadable). - file_
answers - File every answer the session at
addressgave its user that is not filed yet, in the user’s mailbox underroot, from the session (nameis what the user knows it by). Returns how many were filed now. - file_
typed_ lines - File every line the user of
mailbox’s session typed that is not filed yet, reading the transcript asmail. Returns how many were filed now. - find_
message - Where the message
idis filed on this machine: the mailbox of the session that received it, and the envelope. - read
- The transcript’s reading of the session at
address, when it can be read. - read_
claude - Read a Claude Code transcript for its typed lines and delivered mail.
- sent_by
- Everything the session at
addresssent that is filed on this machine underroot: its messages to other sessions and its answers to its user, each with the mailbox it is filed in, oldest first. - transcript
- The transcript of the session at
addresson this machine, when its harness’s records are read here. - typed_
line_ id - The id of the line with
textthat the user of the session ataddresssent atsent_at_ms:u-and 24 hex digits. - user_
address - The mailbox of the person who uses the sessions on
machine: where the lines they type come from and where the sessions’ answers go.