The complete on-disk format of each harness’s session transcripts: every file a session writes, every record type and field, and how to rebuild the conversation from them. Where sessions live and how to resume, export or delete them is on the Transcripts page. Examples use placeholder values.
At a glance
| Question | Codex CLI0.164.0 | Claude Code2.1.310 | Cursor Agent2026.10.12-d47ca18 | OpenCode2.1.4 | pi1.4.0 |
|---|---|---|---|---|---|
| Specification | No published schema; defined by the open-source code | Location documented; record format is internal and changes between versions | No published schema or source; read from the installed build | No published schema; defined by the open-source code | Published, versioned specification |
| Transcript file | ~/.codex/sessions/YYYY/MM/DD/rollout-YYYY-MM-DDThh-mm-ss-<thread-id>.jsonl | ~/.claude/projects/<project-key>/<session-id>.jsonl | ~/.cursor/projects/<slug>/agent-transcripts/<chatId>/<chatId>.jsonl | ~/.local/share/opencode/ (XDG_DATA_HOME/opencode, also on macOS) | ~/.pi/agent/sessions/--<cwd>--/<ISO timestamp with : and . replaced by ->_<session-id>.jsonl |
| Storage | JSON Lines, one record per line, appended as the session runs. Files idle for 7 days are compressed to .jsonl.zst (one zstd frame) and decompressed again on resume. There is no file header; the first line is always session_meta. | JSON Lines, one record per line, append-only and uncompressed. Lines can be several megabytes when they carry base64 images. The final line may be cut off while the session is still writing. | One SQLite database per chat (store.db, WAL mode). Table meta holds one row whose value is hex-encoded JSON; table blobs maps a SHA-256 id to bytes that are protobuf messages, JSON prompt messages or raw file contents. A simplified JSON Lines copy is written per project. | One SQLite database (opencode.db, WAL mode). Each transcript entry is a row in session_message whose data column holds JSON. Images and files are stored inline as base64 or data: URIs. | JSON Lines, one entry per line, appended as the session runs and uncompressed. The file is rewritten only when an older format version is migrated or a branch is extracted. |
| Record type field | type, then payload.type inside response_item, event_msg, retained_context and realtime_item, then payload.item.type (and payload.item.kind for extension items) inside event_msg item_completed. Messages are further split by payload.role. | type, then subtype for system records and attachment.type for attachment records. Message content blocks are typed by message.content[].type. | Blobs carry no type tag: a blob's type follows from the field that references it, starting at latestRootBlobId in meta. Inside protobuf messages, oneof cases pick the variant; inside JSON prompt messages, role then content[].type. In the JSON Lines copy, type when present, otherwise role. | session_message.type, then data.status for compaction rows, data.content[].type for assistant content and state.status for tool blocks. | type, then message.role for message entries. |
| Size | 72 record types, 24 content blocks | 179 record types, 15 content blocks | 24 record types, 9 content blocks | 20 record types, 23 content blocks | 18 record types, 4 content blocks |
Records by purpose
Codex CLI 0.164.0
No published schema; defined by the open-source code. JSON Lines, one record per line, appended as the session runs. Files idle for 7 days are compressed to .jsonl.zst (one zstd frame) and decompressed again on resume. There is no file header; the first line is always session_meta.
Files
$CODEX_HOME (default ~/.codex) | Root of all Codex local state; overridable with CODEX_HOME. |
|---|---|
~/.codex/sessions/YYYY/MM/DD/rollout-YYYY-MM-DDThh-mm-ss-<thread-id>.jsonl | The rollout: one JSONL file per thread. Directory date and filename timestamp are LOCAL time at creation; the file is created lazily when the first item is persisted. |
~/.codex/sessions/YYYY/MM/DD/rollout-YYYY-MM-DDThh-mm-ss-<thread-id>_<rollout-id>.jsonl | Rollout written by thread/revert (or other rollout-id overrides): same thread id, new rollout id. The previous file is left intact; state_5.sqlite threads.rollout_path says which is current. |
~/.codex/sessions/YYYY/MM/DD/rollout-...jsonl.zst | Same rollout zstd-compressed (level 3) by a background worker once unmodified for 7 days; exactly one of .jsonl/.jsonl.zst exists. Decompressed back to .jsonl before any append (resume). |
~/.codex/archived_sessions/rollout-...jsonl[.zst] | Archived rollouts, moved flat (no date folders) with the same filename. |
~/.codex/session_index.jsonl | Append-only thread names: {id, thread_name, updated_at(RFC3339)}; the last entry for an id wins. |
~/.codex/history.jsonl | Prompt history across sessions (not a transcript): {session_id, ts (Unix seconds), text}. |
~/.codex/state_5.sqlite (+ -wal, -shm) | Thread metadata index: threads (id, rollout_path, created_at[_ms], updated_at[_ms], source, model_provider, model, reasoning_effort, cwd, title, name, preview, first_user_message, tokens_used, archived, git_*, cli_version, agent_*, history_mode, thread_source, ...), thread_spawn_edges, thread_dynamic_tools, rollout_migration_state, etc. Authoritative for which rollout file is current. |
~/.codex/thread_history_1.sqlite (+ -wal, -shm) | Projection of paginated rollouts for paging: thread_turns (turn_id, rollout_ordinal, status, timestamps, byte offsets), thread_items (item_json in app-server camelCase ThreadItem form, item_type e.g. userMessage, rollout_ordinal, updated_at_ordinal), thread_realtime_items, thread_history_projection_state (next byte offset/ordinal). Rebuildable from the rollout. |
~/.codex/logs_2.sqlite, goals_1.sqlite, memories_1.sqlite, queue_1.sqlite | Logs, thread goals, memories, and queued input; not transcript content but keyed by thread id. |
~/.codex/rollout-migrations/<thread-id>.pending | Journal for the in-place legacy -> paginated rollout migration (legacy_to_paginated_v1) that runs at startup. |
~/.codex/thread-writer-locks/<thread-id>.lock | Per-thread writer lock files. |
~/.codex/shell_snapshots/<session-id>.<nonce>.sh | Captured login-shell environment snapshot used for command execution. |
~/.codex/generated_images/<thread-id>/<call-id>.png | Saved generated images referenced by saved_path/savedPath. |
Fields on every record
Record type is chosen by type, then payload.type inside response_item, event_msg, retained_context and realtime_item, then payload.item.type (and payload.item.kind for extension items) inside event_msg item_completed. Messages are further split by payload.role..
| Field | Type | Meaning |
|---|---|---|
timestamp | string | Write time, UTC, format YYYY-MM-DDTHH:MM:SS.mmmZ (milliseconds). |
ordinaloptional | integer | Present only in paginated rollouts: dense 0-based position in the logical thread history (session_meta of a root thread is 0; a fork/revert file starts at history_base.end_ordinal_exclusive). Absent in legacy rollouts. |
type | enum(session_meta|response_item|inter_agent_communication|inter_agent_communication_metadata|compacted|turn_context|token_usage_record|world_state|retained_context|security_risk_score|event_msg|realtime_item) | Rollout item kind (snake_case). |
payload | object | Item body; for response_item, event_msg, retained_context and realtime_item it carries its own payload.type. |
metadataoptional | object | Only on response_item: CodexHarnessMetadata {client_authored (bool, always written), fallback_token_limit_override, retained_source{id{message_id,turn_id,role},revision,complete}, user_input_order, guardian_sources, guardian_review_ids, guardian_source_order_guidance, guardian_retained_omissions, delivered_assistant_message, harness_authored_configuration, compaction_model_hash, compaction_output, inherited_user_message, mcp_attribution, sender_user_messages}. |
Records (72)
session_meta
Identifies the thread and records how, where and by which build it was created.
Written first line of every rollout when the file is materialized (creation is deferred until the first item is persisted). Not rewritten on resume. Legacy forks may contain later session_meta lines copied from the parent; only the first belongs to this file.
| Field | Type | Meaning |
|---|---|---|
id | string(uuid) | Thread id (stable across revert). |
session_id | string(uuid) | Root thread id of the session tree. Backfilled from id when absent in older files. |
timestamp | string(RFC3339 UTC, ms) | Thread creation time. |
cwd | string(path) | Working directory at creation. |
originator | string | Client originator (e.g. codex_cli_rs, codex_vscode). |
cli_version | string | Version of the build that created the thread; NOT updated by later writers or by legacy->paginated migration. |
sourceoptional | string | object | SessionSource, lowercase externally tagged: "cli" | "vscode" | "exec" | "mcp" | "unknown" | {"custom":string} | {"internal":"memory_consolidation"|"guardian"} | {"subagent": "review"|"compact"|"memory_consolidation"|{"thread_spawn":{parent_thread_id,depth,agent_path?,agent_nickname?,agent_role?}}|{"other":string}}. Defaults to vscode when absent. |
thread_sourceoptional | string | Analytics classification: user | subagent | guardian_review | memory_consolidation | <feature string>. |
forked_from_idoptional | string(uuid) | Thread this one was forked from. |
forked_from_ordinal_exclusiveoptional | integer | Fork boundary in the parent's paginated history (only with forked_from_id). |
parent_thread_idoptional | string(uuid) | Parent thread for spawned sub-agents. |
runtime_workspace_rootsoptional | string[] | Workspace roots at creation; absent = unknown, [] = none. |
creator_user_idoptional | string | ChatGPT user that created the thread. |
creator_account_idoptional | string | ChatGPT account selected at creation. |
agent_nicknameoptional | string | Nickname of a spawned sub-agent. |
agent_roleoptional | string | Role of a spawned sub-agent. Alias on read: agent_type. |
agent_pathoptional | string | Canonical agent path of a spawned sub-agent. |
model_provider | string | null | Model provider id. |
base_instructions | object | null | {text, provenance?} system instructions for the thread. |
dynamic_toolsoptional | array | Client-supplied dynamic tool specs (older flat camelCase shape also accepted on read). |
selected_capability_rootsoptional | array | Capability roots selected by the hosting platform. |
memory_modeoptional | string | "disabled" when memory generation is off. |
history_modeoptional | enum(legacy|paginated) | Format discriminator for the whole file; absent = legacy. Unknown values make Codex reject the file. |
history_baseoptional | object | {thread_id (actually a rollout id), end_ordinal_exclusive, end_byte_offset}: immutable prefix of another paginated rollout inherited by this one (forks and reverts). |
subagent_history_start_ordinaloptional | integer | First ordinal that belongs to this sub-agent's own history; earlier records are inherited parent context. |
multi_agent_versionoptional | enum(disabled|v1|v2) | Multi-agent protocol version. |
context_windowoptional | object | {window_id}: initial context-window identity (UUIDv7). |
gitoptional | object | {commit_hash?, branch?, repository_url?} collected when cwd is inside a git repo; URL is sanitized. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":0,"type":"session_meta","payload":{"id":"0199aaaa-0000-7000-8000-000000000001","session_id":"0199aaaa-0000-7000-8000-000000000001","timestamp":"2026-01-02T03:04:05.600Z","cwd":"/home/user/project","originator":"codex_cli_rs","cli_version":"0.164.0","source":"cli","thread_source":"user","model_provider":"openai","base_instructions":{"text":"You are a coding agent."},"history_mode":"paginated","context_window":{"window_id":"0199aaaa-0000-7000-8000-0000000000ff"},"git":{"commit_hash":"0123456789abcdef0123456789abcdef01234567","branch":"main"}}}git is flattened into the same payload object (SessionMetaLine = SessionMeta + git).
Source values include "cli", "vscode", "exec", and {"subagent":...} with review / thread_spawn / other.
SessionSource is externally tagged lowercase, so a sub-agent appears as {"subagent":{"thread_spawn":{...}}}, not as a type field.
turn_context
Model, cwd, approval and sandbox settings that applied to one turn.
Written once per real user turn after model-visible context updates are computed, and again after mid-turn compaction re-establishes context.
| Field | Type | Meaning |
|---|---|---|
turn_idoptional | string | Turn this context belongs to. |
root_turn_idoptional | string | Causal root turn. |
cwd | string(path) | Absolute working directory. |
approval_policy | string | object | AskForApproval: "untrusted" | "on-request" (alias on-failure) | "never" | {"granular":{...}}. |
approvals_revieweroptional | enum(user|auto_review) | Who reviews approvals (alias guardian_subagent). |
sandbox_policy | object | {type: danger-full-access | read-only | workspace-write | external-sandbox, writable_roots?, network_access?, exclude_tmpdir_env_var?, exclude_slash_tmp?}. |
permission_profileoptional | object | Resolved permission profile {type, file_system, network}. |
active_permission_profileoptional | object | Named/built-in profile that produced permission_profile. |
file_system_sandbox_policyoptional | object | Raw filesystem sandbox policy. |
model | string | Model slug used for the turn. |
comp_hashoptional | string | Opaque compatibility hash. |
collaboration_modeoptional | object | {mode: plan|default, settings:{...}}. |
multi_agent_versionoptional | enum(disabled|v1|v2) | — |
realtime_activeoptional | boolean | Realtime voice session active. |
cyber_access_programoptional | object | Cyber access program state. |
disabled_plugin_idsoptional | string[] | Plugin selection for the turn. |
effortoptional | enum(none|minimal|low|medium|high|xhigh|max|ultra|persistent) | Reasoning effort. |
summaryoptional | enum(auto|concise|detailed|none) | Legacy reasoning-summary placeholder, now written as "none" for older readers. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"turn_context","payload":{"turn_id":"0199aaaa-0000-7000-8000-000000000010","cwd":"/home/user/project","approval_policy":"on-request","sandbox_policy":{"type":"workspace-write","writable_roots":[],"network_access":false,"exclude_tmpdir_env_var":false,"exclude_slash_tmp":false},"model":"gpt-5-codex","collaboration_mode":{"mode":"default","settings":{"model":"gpt-5-codex"}},"effort":"medium","summary":"none"}}Older files carry fields no longer in the struct and ignored on read: personality, current_date, timezone, workspace_roots (and, in early builds, user_instructions/developer_instructions).
token_usage_record
Best-effort token usage for one completed Responses API response, with running turn and thread totals.
Written after each completed model response.
| Field | Type | Meaning |
|---|---|---|
thread_id | string(uuid) | — |
turn_id | string | — |
session_id | string(uuid) | Root session id. |
root_turn_id | string | — |
response_id | string | Responses API response id. |
usage | TokenUsage | This response: {input_tokens, cached_input_tokens, cache_write_input_tokens, output_tokens, reasoning_output_tokens, total_tokens}. |
turn_token_usage | TokenUsage | Cumulative for the turn. |
thread_token_usage | TokenUsage | Cumulative for the thread. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"token_usage_record","payload":{"thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"0199aaaa-0000-7000-8000-000000000010","session_id":"0199aaaa-0000-7000-8000-000000000001","root_turn_id":"0199aaaa-0000-7000-8000-000000000010","response_id":"resp_123","usage":{"input_tokens":1200,"cached_input_tokens":1000,"cache_write_input_tokens":0,"output_tokens":80,"reasoning_output_tokens":40,"total_tokens":1280},"turn_token_usage":{"input_tokens":1200,"cached_input_tokens":1000,"cache_write_input_tokens":0,"output_tokens":80,"reasoning_output_tokens":40,"total_tokens":1280},"thread_token_usage":{"input_tokens":5000,"cached_input_tokens":3000,"cache_write_input_tokens":0,"output_tokens":400,"reasoning_output_tokens":200,"total_tokens":5400}}}compacted
A context compaction checkpoint; when replacement_history is present it is the complete new model history.
Written when the conversation is compacted (manual /compact or automatic).
| Field | Type | Meaning |
|---|---|---|
message | string | Summary text (may be empty for remote/encrypted compaction). |
replacement_historyoptional | ResponseItem[] | Complete history after compaction; same shapes as response_item payloads. Absent in early legacy rollouts. |
replacement_history_metadataoptional | CodexHarnessMetadata[] | Parallel array of per-item metadata; must have the same length as replacement_history. |
guardian_historyoptional | object | Guardian reviewer history checkpoint. |
retained_contextoptional | object | Snapshot of retained verified answers / user and assistant messages {verified_answers, incomplete, user_messages, user_messages_incomplete, assistant_messages, assistant_messages_incomplete, next_order, sender_deliveries?}. |
mcp_resource_originsoptional | object | MCP resource origin checkpoint. |
window_numberoptional | integer | Context-window sequence number. |
first_window_idoptional | string | — |
previous_window_idoptional | string | — |
window_idoptional | string | integer | New window id; older rollouts stored the numeric window number here. |
compaction_response_idoptional | string | null | Responses API id for the compaction request; serialized as null when absent. |
latest_token_usage_recordoptional | TokenUsageRecord | null | Latest usage snapshot at compaction time; serialized as null when absent. |
resume_metadataoptional | object | Values needed by resume that are not in companion records. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"compacted","payload":{"message":"Summary of earlier work.","replacement_history":[{"type":"message","role":"user","content":[{"type":"input_text","text":"Fix the failing test."}]},{"type":"compaction","encrypted_content":"gAAAA..."}],"window_number":2,"window_id":"0199aaaa-0000-7000-8000-000000000020","previous_window_id":"0199aaaa-0000-7000-8000-0000000000ff","first_window_id":"0199aaaa-0000-7000-8000-0000000000ff","compaction_response_id":null,"latest_token_usage_record":null}}Legacy ghost_snapshot entries inside replacement_history are stripped on read.
world_state
Persisted comparison state for model-visible world-state diffing (full snapshot or patch).
Written when world-state context is computed for a turn; full snapshots establish a new baseline.
| Field | Type | Meaning |
|---|---|---|
full | boolean | true = full baseline; false = patch onto the current baseline. |
state | object | Opaque key/value map. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"world_state","payload":{"full":true,"state":{"example_key":"example_value"}}}inter_agent_communication
A message between agents in a multi-agent tree, recorded as history of the recipient.
Written when an agent sends a message or task to another agent through the thread submission lifecycle.
| Field | Type | Meaning |
|---|---|---|
idoptional | string | — |
author | string | Sender agent path. |
recipient | string | Recipient agent path. |
other_recipients | string[] | Defaults to []. |
content | string | Plain text (empty when encrypted_content is set). |
encrypted_contentoptional | string | — |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
trigger_turn | boolean | Whether delivery starts a turn (NEW_TASK vs MESSAGE). |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"inter_agent_communication","payload":{"author":"/root","recipient":"/root/worker","other_recipients":[],"content":"Please check the tests.","trigger_turn":true}}Concept is user-message for the recipient: it is input from another agent, not from the human.
inter_agent_communication_metadata
Records whether a delivered inter-agent message triggered a turn.
Written alongside inter-agent message delivery.
| Field | Type | Meaning |
|---|---|---|
trigger_turn | boolean | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"inter_agent_communication_metadata","payload":{"trigger_turn":false}}security_risk_score
Security-risk classifier scores for a reviewed tool action; never model- or user-visible.
Written when a security risk classifier scores an action.
| Field | Type | Meaning |
|---|---|---|
scores | object<string, number> | Classifier name -> score. |
call_idoptional | string | Tool call that produced the score. |
actionoptional | any | Bounded description of the reviewed action. |
sampled_atoptional | string(RFC3339) | When sampling started. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"security_risk_score","payload":{"scores":{"example_classifier":0.02},"call_id":"call_abc"}}retained_context / verified_answer
Host-only record of user answers verified for a request_user_input-style call, retained for delegated review.
Written when a question/answer exchange is accepted.
| Field | Type | Meaning |
|---|---|---|
turn_id | string | — |
call_id | string | — |
questions | array | [{question, answer}] |
acceptance_orderoptional | integer | Absent in legacy events. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"retained_context","payload":{"type":"verified_answer","turn_id":"t1","call_id":"call_abc","questions":[{"question":"Proceed?","answer":"Yes"}],"acceptance_order":3}}The other RetainedContextEvent variant, delivered_assistant_message, is never written as retained_context: it is rewritten as a response_item assistant message with metadata.delivered_assistant_message = "codex:code-mode-delivery:v1:complete" (or "...:incomplete:<text>") and metadata.user_input_order, and turned back into the event on read. https://github.com/openai/codex/blob/6aaac694803004a63c6f393d153c96d22521a6b9/codex-rs/history/src/rollout_payload.rs#L106-L149
realtime_item / realtime_session_started
A realtime voice session began.
Written during realtime (voice) sessions; paginated threads only.
Stored only history_mode = paginated only; dropped in legacy
| Field | Type | Meaning |
|---|---|---|
id | string | — |
realtime_session_id | string | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"realtime_item","payload":{"id":"rt1","realtime_session_id":"rs1","type":"realtime_session_started"}}RealtimeItem flattens its content, so payload.type is the content discriminator alongside id and realtime_session_id.
realtime_item / transcript_segment
A transcribed realtime speech segment (role user or assistant).
Written during realtime (voice) sessions; paginated threads only.
Stored only history_mode = paginated only; dropped in legacy
| Field | Type | Meaning |
|---|---|---|
id | string | — |
realtime_session_id | string | — |
role | enum(user|assistant) | — |
text | string | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"realtime_item","payload":{"id":"rt1","realtime_session_id":"rs1","type":"transcript_segment","role":"user","text":"Hello"}}RealtimeItem flattens its content, so payload.type is the content discriminator alongside id and realtime_session_id.
realtime_item / bem_item_promoted
An existing agent item was presented inside the realtime conversation.
Written during realtime (voice) sessions; paginated threads only.
Stored only history_mode = paginated only; dropped in legacy
| Field | Type | Meaning |
|---|---|---|
id | string | — |
realtime_session_id | string | — |
turn_id | string | — |
item_id | string | — |
presentation | object | {type: whole_item | inline_markdown | inline_visualization, index?} |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"realtime_item","payload":{"id":"rt1","realtime_session_id":"rs1","type":"bem_item_promoted","turn_id":"t1","item_id":"i1","presentation":{"type":"whole_item"}}}RealtimeItem flattens its content, so payload.type is the content discriminator alongside id and realtime_session_id.
realtime_item / realtime_session_closed
A realtime session ended.
Written during realtime (voice) sessions; paginated threads only.
Stored only history_mode = paginated only; dropped in legacy
| Field | Type | Meaning |
|---|---|---|
id | string | — |
realtime_session_id | string | — |
outcome | enum(ended|failed) | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"realtime_item","payload":{"id":"rt1","realtime_session_id":"rs1","type":"realtime_session_closed","outcome":"ended"}}RealtimeItem flattens its content, so payload.type is the content discriminator alongside id and realtime_session_id.
response_item / message (role=user)
A user message as sent to the model (also used for injected user-role context such as AGENTS.md and environment context).
Written when user input is recorded for a turn; also for harness-injected user-role context fragments.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
role | string | "user" |
content | ContentItem[] | input_text / input_image / input_audio blocks. |
statusoptional | string | — |
encrypted_contentoptional | string | Opaque encrypted payload. |
phaseoptional | string | — |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"message","role":"user","content":[{"type":"input_text","text":"Fix the failing test."}]},"metadata":{"client_authored":false,"user_input_order":1}}Injected context (AGENTS.md, environment_context, skills) is also role=user; distinguish via internal_chat_message_metadata_passthrough.content_item_metadata[].provenance when present, otherwise by text markers such as <environment_context> or # AGENTS.md.
metadata (sibling of payload) carries CodexHarnessMetadata; see the envelope.
response_item / message (role=assistant)
Assistant output text.
Written when the model emits an output message.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
role | string | "assistant" |
content | ContentItem[] | output_text blocks. |
phaseoptional | enum(commentary|partial_answer|final_answer) | Absent = unknown (older models/providers). |
statusoptional | string | — |
encrypted_contentoptional | string | Opaque encrypted payload. |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"message","role":"assistant","id":"msg_123","content":[{"type":"output_text","text":"Done."}],"phase":"final_answer","internal_chat_message_metadata_passthrough":{"turn_id":"t1","create_time":1767323045.678}}}Also used for code-mode delivered assistant messages (see retained_context note).
response_item / message (role=developer)
Developer-role instructions/context injected by the harness (permissions, collaboration mode, skills, hook output, etc.).
Written at session start and whenever model-visible context changes.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
role | string | "developer" ("system" is possible from older/other producers) |
content | ContentItem[] | input_text blocks. |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"message","role":"developer","content":[{"type":"input_text","text":"<permissions instructions>...</permissions instructions>"}]},"metadata":{"client_authored":false}}metadata.client_authored=true marks developer text supplied by the client rather than the harness.
response_item / reasoning
Model reasoning item: readable summaries plus (usually) encrypted reasoning content.
Written when the model emits reasoning.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
summary | array | [{type:"summary_text", text}] |
contentoptional | array | [{type:"reasoning_text"|"text", text}] raw reasoning; omitted on write when absent or when it contains reasoning_text. |
encrypted_content | string | null | Always serialized (null when absent). |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"reasoning","id":"rs_123","summary":[{"type":"summary_text","text":"Inspecting the test."}],"encrypted_content":"gAAAA..."}}response_item / function_call
A JSON-arguments function tool call (shell, MCP tools, multi-agent tools, etc.).
Written when the model calls a function tool.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
name | string | Tool name. |
namespaceoptional | string | Tool namespace (e.g. MCP server namespace). |
arguments | string | JSON-encoded arguments STRING, not an object. |
encrypted_function_argsoptional | string[] | — |
call_id | string | Pairs with function_call_output.call_id. |
statusoptional | string | — |
encrypted_contentoptional | string | Opaque encrypted payload. |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"function_call","name":"exec_command","arguments":"{\"cmd\":\"ls\"}","call_id":"call_abc"}}response_item / function_call_output
Result of a function tool call.
Written after the tool finishes.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
call_idoptional | string | Matches function_call.call_id. |
nameoptional | string | — |
namespaceoptional | string | — |
output | string | FunctionCallOutputContentItem[] | Plain string, or an array of input_text / input_image / input_audio / encrypted_content items. |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"function_call_output","call_id":"call_abc","output":"Process exited with code 0\nOutput:\nREADME.md"}}The success flag is internal and never serialized; success must be inferred from output text or from the paired item_completed event.
Very early rollouts stored output as an object {content, success}; current deserializer accepts only string or array.
response_item / custom_tool_call
A freeform (grammar/plain-text input) tool call such as apply_patch or code-mode exec.
Written when the model calls a custom tool.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
call_id | string | — |
name | string | — |
namespaceoptional | string | — |
input | string | Raw freeform input (e.g. a patch). |
statusoptional | string | — |
encrypted_contentoptional | string | Opaque encrypted payload. |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"custom_tool_call","status":"completed","call_id":"call_def","name":"apply_patch","input":"*** Begin Patch\n*** End Patch"}}response_item / custom_tool_call_output
Result of a custom tool call.
Written after the custom tool finishes.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
call_id | string | — |
nameoptional | string | — |
output | string | FunctionCallOutputContentItem[] | Same encoding as function_call_output.output. |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"custom_tool_call_output","call_id":"call_def","output":[{"type":"input_text","text":"Success. Updated the following files: M src/lib.rs"}]}}response_item / local_shell_call
Responses API built-in local shell call (legacy shell tool).
Written when a model using the local_shell tool runs a command.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
call_id | string | null | — |
status | enum(completed|in_progress|incomplete) | — |
action | object | {type:"exec", command:string[], timeout_ms, working_directory, env, user} |
encrypted_contentoptional | string | Opaque encrypted payload. |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"local_shell_call","call_id":"call_ls","status":"completed","action":{"type":"exec","command":["ls"],"timeout_ms":null,"working_directory":null,"env":null,"user":null}}}Its result is recorded as function_call_output with the same call_id.
response_item / tool_search_call
A tool-search request (deferred tool discovery).
Written when the model searches for tools.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
call_id | string | null | — |
statusoptional | string | — |
execution | string | — |
arguments | any | JSON value (not a string). |
encrypted_contentoptional | string | Opaque encrypted payload. |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"tool_search_call","call_id":"call_ts","status":"completed","execution":"client","arguments":{"query":"calendar"}}}response_item / tool_search_output
Tools returned by a tool search.
Written after tool search completes.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
call_id | string | null | — |
status | string | — |
execution | string | — |
tools | any[] | Tool declarations. |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"tool_search_output","call_id":"call_ts","status":"completed","execution":"client","tools":[]}}response_item / web_search_call
Hosted web search performed by the Responses API (call and result in one item).
Written when the model uses hosted web search.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
statusoptional | string | — |
actionoptional | object | {type: search {query?, queries?} | open_page {url?} | find_in_page {url?, pattern?} | other} |
encrypted_contentoptional | string | Opaque encrypted payload. |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"web_search_call","status":"completed","action":{"type":"search","query":"rust serde flatten"}}}Results are not in this item; paginated rollouts may carry them in item_completed WebSearch.results.
response_item / image_generation_call
Hosted image generation call including the base64 result.
Written when the model generates an image via the hosted tool.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
status | string | — |
revised_promptoptional | string | — |
result | string | Base64 image data (can be very large). |
encrypted_contentoptional | string | Opaque encrypted payload. |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"image_generation_call","id":"ig_123","status":"completed","revised_prompt":"A blue square","result":"iVBORw0KGgo="}}response_item / agent_message
Model-visible inter-agent message (author -> recipient).
Written when a multi-agent v2 message is delivered into this agent's history.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
author | string | Agent path. |
recipient | string | Agent path. |
content | array | [{type:"input_text", text} | {type:"encrypted_content", encrypted_content}] |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"agent_message","author":"/root","recipient":"/root/worker","content":[{"type":"input_text","text":"Run the linter."}]}}response_item / additional_tools
Tool declarations added to the model's tool set at this point in history.
Written when tools are added mid-thread (e.g. after tool search or plugin enablement).
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
role | string | — |
tools | any[] | Tool declarations (JSON). |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"additional_tools","role":"developer","tools":[{"type":"function","name":"example_tool"}]}}response_item / configuration_update
Durable input control (reasoning effort) interpreted by the backend at this point in history.
Written when reasoning settings change mid-thread.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
reasoning | object | {effort} |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"configuration_update","reasoning":{"effort":"high"}},"metadata":{"client_authored":false,"harness_authored_configuration":true}}response_item / compaction
Opaque encrypted compaction item returned by remote compaction; replaces summarized history for the model.
Written on remote/model-backed compaction.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
encrypted_content | string | — |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"compaction","id":"cmp_123","encrypted_content":"gAAAA..."},"metadata":{"client_authored":false,"compaction_model_hash":"abc","compaction_output":true}}Read alias: compaction_summary.
response_item / context_compaction
Context-compaction item from the Responses API (optionally encrypted).
Written on server-side context compaction.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
idoptional | string | Responses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>. |
encrypted_contentoptional | string | Opaque encrypted payload. |
internal_chat_message_metadata_passthroughoptional | object | Harness metadata copied from the Responses API: turn_id (string), create_time (fractional Unix seconds), content_item_kinds (string[] aligned with content), content_item_metadata ([{provenance:{type: unknown|developer_instructions|skills|agents_md|harness|tool|user, ...}}] aligned with content). cell_id, executed_tool_calls and tool_calls_complete may be written but are ignored on read. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"response_item","payload":{"type":"context_compaction","id":"cc_123"}}event_msg / task_started
A turn began.
Written at the start of every turn (regular, review, compact, user shell).
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
turn_id | string | — |
root_turn_idoptional | string | Originating turn in the root thread. |
turn_attributionoptional | object | Provenance of a regular turn. |
trace_idoptional | string | Telemetry trace id. |
started_atoptional | integer(Unix seconds) | — |
model_context_window | integer | null | — |
collaboration_mode_kindoptional | enum(plan|default) | Aliases on read: code, pair_programming, execute, custom. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"task_started","turn_id":"t1","started_at":1767323045,"model_context_window":258400,"collaboration_mode_kind":"default"}}Serialized name is task_started; turn_started is accepted as an alias on read.
event_msg / task_complete
A turn finished (successfully or with a terminal error).
Written at the end of a turn.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
turn_id | string | — |
root_turn_idoptional | string | — |
last_agent_message | string | null | Final assistant text. |
erroroptional | object | {message, codex_error_info?} when the turn failed. |
started_atoptional | integer | Unix seconds |
completed_atoptional | integer | Unix seconds |
duration_msoptional | integer | — |
time_to_first_token_msoptional | integer | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"task_complete","turn_id":"t1","last_agent_message":"Done.","started_at":1767323045,"completed_at":1767323100,"duration_ms":55000,"time_to_first_token_ms":900}}Serialized name task_complete; alias turn_complete on read.
error.codex_error_info is an enum; misalignment details are never persisted.
event_msg / turn_aborted
A turn was interrupted, replaced, ended by review, or budget-limited.
Written when a turn is aborted.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
turn_id | string | null | — |
root_turn_idoptional | string | — |
reason | enum(interrupted|replaced|review_ended|budget_limited) | — |
erroroptional | object | — |
started_atoptional | integer | — |
completed_atoptional | integer | — |
duration_msoptional | integer | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"turn_aborted","turn_id":"t1","reason":"interrupted","completed_at":1767323060,"duration_ms":15000}}event_msg / token_count
Cumulative and last-response token usage plus rate-limit snapshot.
Written after each model response and on rate-limit updates.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
info | object | null | {total_token_usage: TokenUsage, last_token_usage: TokenUsage, model_context_window: integer|null} |
rate_limits | object | null | {limit_id, limit_name, normal_model_slug?, primary:{used_percent, window_minutes, resets_at}|null, secondary, credits:{has_credits, unlimited, balance}|null, individual_limit, spend_control_reached, plan_type, rate_limit_reached_type} |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"token_count","info":{"total_token_usage":{"input_tokens":5000,"cached_input_tokens":3000,"cache_write_input_tokens":0,"output_tokens":400,"reasoning_output_tokens":200,"total_tokens":5400},"last_token_usage":{"input_tokens":1200,"cached_input_tokens":1000,"cache_write_input_tokens":0,"output_tokens":80,"reasoning_output_tokens":40,"total_tokens":1280},"model_context_window":258400},"rate_limits":{"limit_id":"codex","limit_name":null,"primary":{"used_percent":12.0,"window_minutes":300,"resets_at":1767330000},"secondary":null,"credits":null,"individual_limit":null,"spend_control_reached":null,"plan_type":"plus","rate_limit_reached_type":null}}}info may be null (rate-limit-only update). Do not sum token_count events: totals are already cumulative and some events repeat the same totals.
event_msg / thread_settings_applied
Snapshot of thread-level settings after they were applied.
Written when thread settings are applied or changed.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
thread_idoptional | string(uuid) | Owner thread; absent in older histories. |
thread_settings | object | {model, model_provider_id, service_tier?, approval_policy, approvals_reviewer, permission_profile, active_permission_profile?, cwd, runtime_workspace_roots?, reasoning_effort?, reasoning_summary?, personality?, collaboration_mode, disabled_plugin_ids} |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"thread_settings_applied","thread_id":"0199aaaa-0000-7000-8000-000000000001","thread_settings":{"model":"gpt-5-codex","model_provider_id":"openai","approval_policy":"on-request","approvals_reviewer":"user","permission_profile":{"type":"managed"},"cwd":"/home/user/project","collaboration_mode":{"mode":"default","settings":{"model":"gpt-5-codex"}},"disabled_plugin_ids":[]}}}event_msg / thread_goal_updated
The thread's goal (objective, status, budget) changed.
Written when a goal is created or updated.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
threadId | string(uuid) | camelCase field names in this record. |
turnIdoptional | string | — |
goal | object | {threadId, objective, status: active|paused|blocked|usageLimited|budgetLimited|complete, tokenBudget?, tokensUsed, timeUsedSeconds, createdAt, updatedAt} |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"thread_goal_updated","threadId":"0199aaaa-0000-7000-8000-000000000001","goal":{"threadId":"0199aaaa-0000-7000-8000-000000000001","objective":"Ship the fix","status":"active","tokensUsed":0,"timeUsedSeconds":0,"createdAt":1767323045,"updatedAt":1767323045}}}event_msg / thread_rolled_back
The last N user turns were removed from model context (rewind).
Written when the user rolls back turns.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
num_turns | integer | Number of user turns dropped. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"thread_rolled_back","num_turns":1}}Concept is branches/rewind; see linking. Earlier records stay in the file.
event_msg / item_completed
Wrapper for a completed TurnItem (the paginated-mode canonical item stream).
Written when any turn item completes. Legacy mode keeps only items with no other lossless representation.
Stored only paginated: every TurnItem, with CommandExecution.aggregated_output and McpToolCall.result truncated to 64 KiB; legacy: only FunctionCallOutput, Plan, Extension clock.sleep, and SubAgentActivity kind=completed
| Field | Type | Meaning |
|---|---|---|
thread_id | string(uuid) | — |
turn_id | string | — |
item | TurnItem | Tagged by item.type (PascalCase variant names); see item_completed sub-records. |
started_at_msoptional | integer | — |
completed_at_ms | integer | Defaults to 0 for old records. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"Plan","id":"p1","text":"1. Fix"},"completed_at_ms":1767323050000}}event_msg / user_message
UI-level user message (legacy history).
Written when the user submits input (legacy mode).
Stored only history_mode = legacy only
| Field | Type | Meaning |
|---|---|---|
message | string | — |
client_idoptional | string | — |
imagesoptional | string[] | Image URLs/data URLs. |
image_detailsoptional | array | — |
file_idsoptional | string[] | — |
file_id_detailsoptional | array | — |
image_orderoptional | enum(inline|file)[] | — |
local_images | string[] | Local image paths (default []). |
local_image_detailsoptional | array | — |
audiooptional | string[] | — |
local_audio | string[] | — |
text_elements | array | [{byte_range:{start,end}, placeholder}] |
{"timestamp":"2026-01-02T03:04:05.678Z","type":"event_msg","payload":{"type":"user_message","message":"Fix the failing test.","local_images":[],"local_audio":[],"text_elements":[]}}Contains the user's text without injected context, unlike response_item/message role=user.
event_msg / agent_message
UI-level assistant message (legacy history).
Written when the assistant produces a message (legacy mode).
Stored only history_mode = legacy only
| Field | Type | Meaning |
|---|---|---|
message | string | — |
phaseoptional | string | null | — |
memory_citationoptional | object | null | — |
deliveryoptional | enum(async) | — |
questionsoptional | array | [{title, options}] |
{"timestamp":"2026-01-02T03:04:05.678Z","type":"event_msg","payload":{"type":"agent_message","message":"Done.","phase":"final_answer","memory_citation":null}}event_msg / agent_reasoning
UI-level reasoning summary text (legacy).
Written when a reasoning summary is produced (legacy).
Stored only history_mode = legacy only
| Field | Type | Meaning |
|---|---|---|
text | string | — |
{"timestamp":"2026-01-02T03:04:05.678Z","type":"event_msg","payload":{"type":"agent_reasoning","text":"**Inspecting** the test."}}event_msg / agent_reasoning_raw_content
UI-level raw reasoning text (legacy).
Written when raw reasoning is exposed (legacy).
Stored only history_mode = legacy only
| Field | Type | Meaning |
|---|---|---|
text | string | — |
{"timestamp":"2026-01-02T03:04:05.678Z","type":"event_msg","payload":{"type":"agent_reasoning_raw_content","text":"..."}}event_msg / entered_review_mode
A /review sub-turn started (legacy).
Written when review mode starts.
Stored only history_mode = legacy only
| Field | Type | Meaning |
|---|---|---|
target | object | {type: uncommittedChanges | baseBranch{branch} | commit{sha,title} | custom{instructions}} |
user_facing_hintoptional | string | — |
turn_idoptional | string | — |
item_idoptional | string | — |
{"timestamp":"2026-01-02T03:04:05.678Z","type":"event_msg","payload":{"type":"entered_review_mode","target":{"type":"uncommittedChanges"},"user_facing_hint":"current changes"}}event_msg / exited_review_mode
A review finished, with structured findings (legacy).
Written when review mode ends.
Stored only history_mode = legacy only
| Field | Type | Meaning |
|---|---|---|
turn_idoptional | string | — |
item_idoptional | string | — |
review_output | object | null | {findings:[{title, body, confidence_score, priority, code_location:{absolute_file_path, line_range:{start,end}}}], overall_correctness, overall_explanation, overall_confidence_score} |
{"timestamp":"2026-01-02T03:04:05.678Z","type":"event_msg","payload":{"type":"exited_review_mode","review_output":{"findings":[],"overall_correctness":"patch is correct","overall_explanation":"No issues.","overall_confidence_score":0.8}}}event_msg / patch_apply_end
Outcome of applying a patch (legacy).
Written after apply_patch completes.
Stored only history_mode = legacy only
| Field | Type | Meaning |
|---|---|---|
call_id | string | — |
turn_id | string | Default "". |
stdout | string | — |
stderr | string | — |
success | boolean | — |
changes | object<path, FileChange> | FileChange = {type:add,content} | {type:delete,content} | {type:update,unified_diff,move_path} |
status | enum(completed|failed|declined) | — |
{"timestamp":"2026-01-02T03:04:05.678Z","type":"event_msg","payload":{"type":"patch_apply_end","call_id":"call_def","turn_id":"t1","stdout":"Success.","stderr":"","success":true,"changes":{"/home/user/project/a.txt":{"type":"add","content":"hi\n"}},"status":"completed"}}event_msg / context_compacted
Marker that context was compacted (legacy).
Written after compaction.
Stored only history_mode = legacy only
{"timestamp":"2026-01-02T03:04:05.678Z","type":"event_msg","payload":{"type":"context_compacted"}}event_msg / mcp_tool_call_end
Completed MCP tool call with invocation and result (legacy).
Written after an MCP tool call.
Stored only history_mode = legacy only
| Field | Type | Meaning |
|---|---|---|
call_id | string | — |
turn_id | string | — |
invocation | object | {server, tool, arguments} |
connector_idoptional | string | — |
mcp_app_resource_urioptional | string | — |
mcp_app_uioptional | object | {resourceUri, preferredModelDisplayMode} |
link_idoptional | string | — |
app_nameoptional | string | — |
action_nameoptional | string | — |
plugin_idoptional | string | — |
read_only_hintoptional | boolean | — |
duration | object | Rust Duration {secs, nanos}. |
result | object | Rust Result: {"Ok": CallToolResult{content, structuredContent?, isError?, _meta?}} or {"Err": string} |
{"timestamp":"2026-01-02T03:04:05.678Z","type":"event_msg","payload":{"type":"mcp_tool_call_end","call_id":"call_m","turn_id":"t1","invocation":{"server":"docs","tool":"search","arguments":{"q":"x"}},"duration":{"secs":1,"nanos":5000000},"result":{"Ok":{"content":[{"type":"text","text":"result"}]}}}}event_msg / web_search_end
Completed web search with query and action (legacy).
Written after a web search.
Stored only history_mode = legacy only
| Field | Type | Meaning |
|---|---|---|
call_id | string | — |
query | string | — |
action | object | Responses WebSearchAction (snake_case type). |
resultsoptional | any[] | — |
{"timestamp":"2026-01-02T03:04:05.678Z","type":"event_msg","payload":{"type":"web_search_end","call_id":"ws_1","query":"rust serde","action":{"type":"search","query":"rust serde"}}}event_msg / image_generation_end
Completed image generation (legacy).
Written after image generation.
Stored only history_mode = legacy only
| Field | Type | Meaning |
|---|---|---|
call_id | string | — |
status | string | — |
revised_promptoptional | string | — |
result | fileId | string | Flattened GeneratedImageRef: either result (inline base64) or fileId. |
transparent_backgroundoptional | boolean | — |
failureoptional | object | {type:usageLimitExceeded, limitId, resetsAt} |
saved_pathoptional | string | — |
input_imagesoptional | array | [{path, sha256}] |
{"timestamp":"2026-01-02T03:04:05.678Z","type":"event_msg","payload":{"type":"image_generation_end","call_id":"ig_1","status":"completed","result":"iVBORw0KGgo=","saved_path":"/home/user/.codex/generated_images/thread/ig_1.png"}}event_msg / sub_agent_activity
A sub-agent was started, interacted with, or interrupted (legacy).
Written on sub-agent lifecycle activity (kind=completed is stored as an item_completed SubAgentActivity instead).
Stored only history_mode = legacy and kind != completed
| Field | Type | Meaning |
|---|---|---|
model | string | null | — |
reasoning_effort | string | null | — |
event_id | string | — |
occurred_at_msoptional | integer | — |
agent_thread_id | string(uuid) | Child thread id. |
agent_path | string | — |
kind | enum(started|interacted|interrupted) | — |
{"timestamp":"2026-01-02T03:04:05.678Z","type":"event_msg","payload":{"type":"sub_agent_activity","model":null,"reasoning_effort":null,"event_id":"e1","occurred_at_ms":1767323050000,"agent_thread_id":"0199aaaa-0000-7000-8000-000000000002","agent_path":"/root/worker","kind":"started"}}event_msg / item_completed / UserMessage
User input for the turn as the user entered it (no injected context).
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "UserMessage" |
item.id | string | — |
item.client_idoptional | string | — |
item.content | UserInput[] | text | image | local_image | audio | local_audio | skill | mention blocks (snake_case type). |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"UserMessage","id":"u1","content":[{"type":"text","text":"Fix the failing test.","text_elements":[]}]},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / AgentMessage
Assistant message as displayed.
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "AgentMessage" |
item.id | string | — |
item.content | array | [{type:"Text", text}] (PascalCase type). |
item.phaseoptional | string | — |
item.memory_citationoptional | object | — |
item.deliveryoptional | enum(async) | — |
item.questionsoptional | array | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"AgentMessage","id":"msg_1","content":[{"type":"Text","text":"Done."}],"phase":"final_answer"},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / Reasoning
Reasoning summary and raw text as displayed.
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "Reasoning" |
item.id | string | — |
item.summary_text | string[] | — |
item.raw_content | string[] | Default []. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"Reasoning","id":"rs_1","summary_text":["Inspecting the test."],"raw_content":[]},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / Plan
Plan text produced in plan collaboration mode.
Written when the item completes within a turn.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
item.type | string | "Plan" |
item.id | string | — |
item.text | string | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"Plan","id":"p1","text":"1. Reproduce\n2. Fix"},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / CommandExecution
A shell command run, with output and exit code.
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "CommandExecution" |
item.id | string | Tool call id. |
item.command | string[] | — |
item.cwd | string(file URI) | PathUri serialized as a URI string. |
item.parsed_cmd | array | [{type: read{cmd,name,path} | list_files{cmd,path} | search{cmd,query,path} | unknown{cmd}}] |
item.source | enum(agent|user_shell|unified_exec_startup|unified_exec_interaction) | — |
item.status | enum(in_progress|completed|failed|declined) | — |
item.aggregated_outputoptional | string | Truncated in the middle to 64 KiB with marker "... command output truncated for persistence ...". |
item.exit_codeoptional | integer | — |
item.durationoptional | object | {secs, nanos} |
item.process_idoptional | string | — |
item.interaction_inputoptional | string | — |
item.plugin_idoptional | string | — |
item.script_pathoptional | string | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"CommandExecution","id":"call_abc","command":["/bin/zsh","-lc","ls"],"cwd":"file:///home/user/project","parsed_cmd":[{"type":"list_files","cmd":"ls","path":null}],"source":"agent","status":"completed","aggregated_output":"README.md\n","exit_code":0,"duration":{"secs":0,"nanos":120000000}},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}Older files also carry stdout, stderr and formatted_output, which current builds ignore.
event_msg / item_completed / FileChange
Patch application result with per-file changes.
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "FileChange" |
item.id | string | — |
item.changes | object<path, FileChange> | — |
item.statusoptional | enum(completed|failed|declined) | — |
item.auto_approvedoptional | boolean | — |
item.stdoutoptional | string | — |
item.stderroptional | string | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"FileChange","id":"call_def","changes":{"/home/user/project/a.txt":{"type":"update","unified_diff":"@@ -1 +1 @@\n-a\n+b\n","move_path":null}},"status":"completed","stdout":"Success."},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / McpToolCall
MCP tool invocation with result (camelCase fields).
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "McpToolCall" |
item.id | string | — |
item.server | string | — |
item.tool | string | — |
item.arguments | any | — |
item.connectorIdoptional | string | — |
item.mcpAppResourceUrioptional | string | — |
item.mcpAppUioptional | object | — |
item.linkIdoptional | string | — |
item.appNameoptional | string | — |
item.actionNameoptional | string | — |
item.pluginIdoptional | string | — |
item.readOnlyHintoptional | boolean | — |
item.status | enum(inProgress|completed|failed) | — |
item.resultoptional | object | CallToolResult {content, structuredContent?, isError?, _meta?}, truncated to 64 KiB. |
item.erroroptional | object | {message} |
item.durationoptional | object | {secs, nanos} |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"McpToolCall","id":"call_m","server":"docs","tool":"search","arguments":{"q":"x"},"status":"completed","result":{"content":[{"type":"text","text":"result"}]},"duration":{"secs":1,"nanos":0}},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / DynamicToolCall
Client-implemented dynamic tool call with result.
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "DynamicToolCall" |
item.id | string | — |
item.namespaceoptional | string | — |
item.tool | string | — |
item.arguments | any | — |
item.status | enum(in_progress|completed|failed) | — |
item.content_itemsoptional | array | [{type: inputText|inputImage|inputAudio, ...}] (camelCase) |
item.successoptional | boolean | — |
item.erroroptional | string | — |
item.durationoptional | object | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"DynamicToolCall","id":"call_d","tool":"lookup","arguments":{},"status":"completed","content_items":[{"type":"inputText","text":"ok"}],"success":true},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / FunctionCallOutput
Function tool output as a display item.
Written when the item completes within a turn.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
item.type | string | "FunctionCallOutput" |
item.id | string | — |
item.name | string | — |
item.namespaceoptional | string | — |
item.output | string | array | FunctionCallOutputBody. |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"FunctionCallOutput","id":"call_abc","name":"example","output":"ok"},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / CollabAgentToolCall
A multi-agent tool call (spawn, send, wait, close...) with target agents and states.
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "CollabAgentToolCall" |
item.id | string | — |
item.tool | enum(spawn_agent|send_input|resume_agent|wait|close_agent|send_message|followup_task|interrupt_agent|list_agents) | — |
item.status | enum(in_progress|completed|failed|interrupted) | — |
item.sender_thread_id | string(uuid) | — |
item.receiver_thread_ids | string[] | — |
item.receiver_agents | array | [{thread_id, agent_nickname?, agent_role?}] |
item.promptoptional | string | — |
item.modeloptional | string | — |
item.reasoning_effortoptional | string | — |
item.agents_states | object<thread_id, AgentStatus> | AgentStatus: "pending_init"|"running"|"interrupted"|"shutdown"|"not_found"|{"completed":string|null}|{"errored":string} |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"CollabAgentToolCall","id":"call_c","tool":"spawn_agent","status":"completed","sender_thread_id":"0199aaaa-0000-7000-8000-000000000001","receiver_thread_ids":["0199aaaa-0000-7000-8000-000000000002"],"receiver_agents":[],"agents_states":{}},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / SubAgentActivity
Sub-agent lifecycle activity.
Written when the item completes within a turn.
Stored only paginated: all kinds; legacy: kind=completed only
| Field | Type | Meaning |
|---|---|---|
item.type | string | "SubAgentActivity" |
item.id | string | — |
item.kind | enum(started|interacted|interrupted|completed) | — |
item.agent_thread_id | string(uuid) | — |
item.agent_path | string | — |
item.model | string | null | — |
item.reasoning_effort | string | null | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"SubAgentActivity","id":"a1","kind":"completed","agent_thread_id":"0199aaaa-0000-7000-8000-000000000002","agent_path":"/root/worker","model":null,"reasoning_effort":null},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / WebSearch
Hosted web search display item.
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "WebSearch" |
item.id | string | — |
item.query | string | — |
item.action | object | snake_case WebSearchAction |
item.resultsoptional | any[] | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"WebSearch","id":"ws_1","query":"rust serde","action":{"type":"search","query":"rust serde"}},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / ImageView
The agent viewed a local image.
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "ImageView" |
item.id | string | — |
item.path | string(file URI) | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"ImageView","id":"call_v","path":"file:///home/user/project/shot.png"},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / ImageGeneration
Hosted image generation display item.
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "ImageGeneration" |
item.id | string | — |
item.status | string | — |
item.revised_promptoptional | string | — |
item.result | string | base64 |
item.saved_pathoptional | string | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"ImageGeneration","id":"ig_1","status":"completed","result":"iVBORw0KGgo="},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / HookPrompt
Prompt fragments injected by hooks.
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "HookPrompt" |
item.id | string | — |
item.fragments | array | [{text, hookRunId}] |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"HookPrompt","id":"h1","fragments":[{"text":"Remember to run tests.","hookRunId":"hr1"}]},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / EnteredReviewMode
Review mode started.
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "EnteredReviewMode" |
item.id | string | — |
item.target | object | ReviewTarget (camelCase type) |
item.user_facing_hint | string | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"EnteredReviewMode","id":"r1","target":{"type":"uncommittedChanges"},"user_facing_hint":"current changes"},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / ExitedReviewMode
Review finished with output.
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "ExitedReviewMode" |
item.id | string | — |
item.review_output | object | null | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"ExitedReviewMode","id":"r1","review_output":null},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / ContextCompaction
Display marker for a context compaction.
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "ContextCompaction" |
item.id | string | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"ContextCompaction","id":"0199aaaa-0000-7000-8000-000000000030"},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / Extension / web.search
Standalone web-search extension item (camelCase).
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "Extension" |
item.kind | string | "web.search" |
item.id | string | — |
item.query | string | — |
item.action | object | null | {type: search|openPage|findInPage|other, ...} (camelCase) |
item.resultsoptional | any[] | null | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"Extension","kind":"web.search","id":"ws_2","query":"rust serde","action":{"type":"search","query":"rust serde","queries":null},"results":[]},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / Extension / clock.sleep
The agent slept/waited.
Written when the item completes within a turn.
Stored always (both history modes)
| Field | Type | Meaning |
|---|---|---|
item.type | string | "Extension" |
item.kind | string | "clock.sleep" |
item.id | string | — |
item.durationMs | integer | — |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"Extension","kind":"clock.sleep","id":"s1","durationMs":30000},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}event_msg / item_completed / Extension / image_gen.generation
Standalone image-generation extension item (camelCase).
Written when the item completes within a turn.
Stored only history_mode = paginated
| Field | Type | Meaning |
|---|---|---|
item.type | string | "Extension" |
item.kind | string | "image_gen.generation" |
item.id | string | — |
item.status | string | — |
item.revisedPrompt | string | null | — |
item.result | item.fileId | string | Flattened GeneratedImageRef. |
item.transparentBackgroundoptional | boolean | null | — |
item.failureoptional | object | null | — |
item.savedPathoptional | string | — |
item.inputImagesoptional | array | [{path, sha256}] |
{"timestamp":"2026-01-02T03:04:05.678Z","ordinal":7,"type":"event_msg","payload":{"type":"item_completed","thread_id":"0199aaaa-0000-7000-8000-000000000001","turn_id":"t1","item":{"type":"Extension","kind":"image_gen.generation","id":"ig_2","status":"completed","revisedPrompt":"A blue square","result":"iVBORw0KGgo=","transparentBackground":null,"failure":null,"savedPath":"/home/user/.codex/generated_images/thread/ig_2.png"},"started_at_ms":1767323049000,"completed_at_ms":1767323050000}}Content blocks (24)
message.content / input_text
Text sent to the model (user, developer, injected context).
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
text | string | — |
{"type":"input_text","text":"Fix the failing test."}message.content / input_image
Image sent to the model, inline (data URL) or by file id.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
image_urloptional | string | Data URL or URL (untagged with file_id). |
file_idoptional | string | — |
detailoptional | enum(auto|low|high|original) | — |
{"type":"input_image","image_url":"data:image/png;base64,iVBORw0KGgo=","detail":"high"}message.content / input_audio
Audio sent to the model.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
audio_url | string | — |
{"type":"input_audio","audio_url":"data:audio/wav;base64,UklGRg=="}message.content / output_text
Assistant output text.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
text | string | — |
annotationsoptional | any[] | — |
logprobsoptional | any[] | — |
{"type":"output_text","text":"Done."}reasoning.summary / summary_text
Readable reasoning summary part.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
text | string | — |
{"type":"summary_text","text":"Inspecting the test."}reasoning.content / reasoning_text
Raw reasoning text part.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
text | string | — |
{"type":"reasoning_text","text":"..."}reasoning.content / text
Raw reasoning text part (alternate form).
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
text | string | — |
{"type":"text","text":"..."}agent_message.content / input_text
Plain inter-agent message text.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
text | string | — |
{"type":"input_text","text":"Run the linter."}agent_message.content / encrypted_content
Encrypted inter-agent message.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
encrypted_content | string | — |
{"type":"encrypted_content","encrypted_content":"gAAAA..."}tool output (string form)
function_call_output.output / custom_tool_call_output.output as a bare JSON string.
Written inside the parent record named in type.
"Process exited with code 0"tool output / input_text
Text part of a structured tool output.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
text | string | — |
{"type":"input_text","text":"ok"}tool output / input_image
Image returned by a tool.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
image_url | file_id | string | — |
detailoptional | string | — |
{"type":"input_image","image_url":"data:image/png;base64,iVBORw0KGgo="}tool output / input_audio
Audio returned by a tool.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
audio_url | string | — |
{"type":"input_audio","audio_url":"data:audio/wav;base64,UklGRg=="}tool output / encrypted_content
Encrypted tool output part.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
encrypted_content | string | — |
{"type":"encrypted_content","encrypted_content":"gAAAA..."}UserMessage.content / text
User text with UI element spans.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
text | string | — |
text_elements | array | [{byte_range:{start,end}, placeholder}] |
{"type":"text","text":"Fix it","text_elements":[]}UserMessage.content / image
Image by URL/data URL or file id.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
image_url | file_id | string | — |
detailoptional | string | — |
{"type":"image","image_url":"data:image/png;base64,iVBORw0KGgo="}UserMessage.content / local_image
Image attached from a local path (bytes not stored in this block).
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
path | string | — |
detailoptional | string | — |
{"type":"local_image","path":"/home/user/shot.png"}UserMessage.content / audio
Audio by URL.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
audio_url | string | — |
{"type":"audio","audio_url":"data:audio/wav;base64,UklGRg=="}UserMessage.content / local_audio
Audio from a local path.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
path | string | — |
{"type":"local_audio","path":"/home/user/a.wav"}UserMessage.content / skill
Explicitly selected skill.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
name | string | — |
path | string | — |
{"type":"skill","name":"example-skill","path":"/home/user/.codex/skills/example/SKILL.md"}UserMessage.content / mention
@-mention of a resource.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
name | string | — |
path | string | — |
{"type":"mention","name":"README.md","path":"README.md"}AgentMessage.content / Text
Display text of an AgentMessage item (PascalCase type).
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
text | string | — |
{"type":"Text","text":"Done."}DynamicToolCall.content_items / inputText|inputImage|inputAudio
Dynamic tool output parts (camelCase type and fields).
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
text | imageUrl | audioUrl | string | — |
{"type":"inputText","text":"ok"}McpToolCall.result.content / <MCP content block>
Opaque MCP content blocks (text, image, resource, ...), passed through as JSON.
Written inside the parent record named in type.
| Field | Type | Meaning |
|---|---|---|
type | string | MCP block type |
{"type":"text","text":"result"}Rebuilding the conversation
- ordering
- Use file order. In paginated files ordinal increases by exactly 1 per line and is the canonical position (thread_history_1.sqlite keys on it); timestamps are millisecond write times and are not unique. A record whose line fails to parse should be skipped (Codex counts and skips it), not treated as end of file.
- turns
- A turn is bounded by event_msg task_started and task_complete or turn_aborted with the same turn_id. turn_context.turn_id, item_completed.turn_id, token_usage_record.turn_id and response_item internal_chat_message_metadata_passthrough.turn_id attach records to a turn; root_turn_id links turns caused by another (e.g. sub-agent work) back to the originating root turn. Older response items have no turn_id: assign them to the open task_started span.
- message parent links
- There are no parent pointers between messages; the conversation is the ordered sequence of response_item records (model view) or item_completed items (display view in paginated mode). Do not merge both views: in paginated files every user/assistant message appears twice (response_item message and item_completed UserMessage/AgentMessage).
- tool call ↔ result
- Pair function_call -> function_call_output, custom_tool_call -> custom_tool_call_output, tool_search_call -> tool_search_output, local_shell_call -> function_call_output by call_id. web_search_call and image_generation_call contain their own results. Display items (CommandExecution, FileChange, McpToolCall, DynamicToolCall, CollabAgentToolCall) use the tool call_id as item.id.
- subagents
- A child thread has its own rollout. Its session_meta has parent_thread_id and source {"subagent":{"thread_spawn":{parent_thread_id, depth, agent_path, agent_nickname, agent_role}}} (review/compact sub-agents use {"subagent":"review"} etc.). Records with ordinal < subagent_history_start_ordinal are inherited parent context, not the child's own work. In the parent, CollabAgentToolCall (receiver_thread_ids) and SubAgentActivity (agent_thread_id) point to children; state_5.sqlite thread_spawn_edges indexes the edges. session_id is the root thread id for the whole tree.
- forks
- forked_from_id names the source thread. Legacy: the parent's records are copied into the child file, possibly including the parent's session_meta lines (only the first session_meta is the file's own). Paginated: history_base {thread_id = source ROLLOUT id, end_ordinal_exclusive, end_byte_offset} points at an immutable prefix; resolve it recursively and prepend the source rollout's records with ordinal in [start, end_ordinal_exclusive), where start is 1 for a root file and base.end_ordinal_exclusive+1 for a file that itself has a history_base (skipping each file's own session_meta).
- compaction
- A compacted record whose replacement_history is present is a complete new model history: discard earlier model-history items and continue from replacement_history plus later lines. Older compacted records without replacement_history require replaying earlier items and inserting the message summary. response_item compaction / context_compaction are opaque encrypted items that stand in for summarized history. item_completed ContextCompaction and legacy event_msg context_compacted are display markers only. Only the newest compaction bounds replay.
- resume
- Resume appends to the same rollout file (no new session_meta, ordinals continue from the last line). A compressed file is first decompressed to .jsonl and the .zst removed.
- branches/rewind
- event_msg thread_rolled_back {num_turns}: drop the last num_turns user turns (segments containing a real user message) from the reconstructed history; the dropped records remain in the file. thread/revert instead writes a new rollout file <thread-id>_<rollout-id> whose history_base points at the retained prefix; the old file is untouched and state_5.sqlite threads.rollout_path is the only pointer to the current one.
- sidecar references
- Thread names: last session_index.jsonl entry for the id (state_5 threads.name/title may also hold it). Current rollout path, archive state and titles: state_5.sqlite threads. Paginated page projection: thread_history_1.sqlite keyed by (thread_id, rollout_ordinal). Generated images: saved_path / savedPath. local_image blocks reference paths only; image bytes are present only in inline data URLs.
Token usage
token_usage_record.payload.usage- Tokens for exactly one Responses API response (response_id). Sum these for exact per-response accounting.
token_usage_record.payload.turn_token_usage / thread_token_usage- Running totals for the turn / the thread at that response; take the last value, do not sum.
event_msg token_count.payload.info.total_token_usage- Cumulative thread usage (same TokenUsage shape); last_token_usage is the latest response. info may be null; events can repeat. After a context-window overflow Codex can synthesize a filled total (total_tokens = model_context_window), which is not provider-reported usage.
TokenUsage.input_tokens- Prompt tokens including cached ones.
TokenUsage.cached_input_tokens- Subset of input_tokens served from cache (non-cached = input - cached).
TokenUsage.cache_write_input_tokens- Input tokens written to cache; defaults to 0 when absent (older records lack it).
TokenUsage.output_tokens- Completion tokens; reasoning_output_tokens is the reasoning portion of them.
TokenUsage.total_tokens- input_tokens + output_tokens as reported.
token_count.payload.info.model_context_window / task_started.model_context_window- Context window size in tokens for the model.
token_count.payload.rate_limits- Plan rate-limit snapshot (used_percent, window_minutes, resets_at, credits); not a cost. No monetary cost is recorded anywhere in the rollout.
Versions
There is no schema version field. Signals: session_meta.payload.history_mode (absent = legacy, "paginated" = ordinals present and a different event persistence policy); presence of envelope ordinal; session_meta.cli_version records only the build that created the thread and is preserved by the in-place legacy->paginated migration, so it does not identify the writer of later lines. Older shapes that Codex 0.164.0 still reads: task_started/task_complete accept turn_started/turn_complete aliases; response_item compaction accepts compaction_summary; agent_type -> agent_role; session_id backfilled from id; compacted.window_id may be a legacy integer; ghost_snapshot response items (removed feature) are stripped on read; content_item_metadata legacy harness_injected/source_tool_namespace forms are mapped; dynamic_tools legacy flat camelCase shape accepted; ItemCompleted.completed_at_ms defaults to 0; TurnContext fields such as user_instructions, personality, current_date, timezone, workspace_roots were dropped and are ignored.
Parsing pitfalls
- Paginated files (the default for current builds, and legacy files after the startup migration) persist BOTH the model view (response_item) and the display view (event_msg item_completed); counting both double-counts every message and tool call.
- Legacy and paginated files persist different event_msg sets: user_message/agent_message/agent_reasoning/etc. exist only in legacy files; most item_completed variants exist only in paginated files.
- TurnItem types are PascalCase ("UserMessage", "CommandExecution") and Extension items add a second discriminator kind ("web.search", "clock.sleep", "image_gen.generation"); everything else uses snake_case.
- Field casing is mixed: McpToolCall items, extension items, thread_goal_updated, ReviewTarget and dynamic-tool content items are camelCase; the rest is snake_case.
- Rollout directory and filename timestamps are local time; session_meta.timestamp and line timestamps are UTC.
- function_call.arguments is a JSON-encoded string; tool_search_call.arguments is a JSON value.
- Tool outputs are either a bare string or an array of content items; the success flag is never serialized.
- Durations are Rust Duration objects {secs, nanos}; mcp_tool_call_end.result is a Rust Result {"Ok":...}|{"Err":...}.
- role=user response_item messages include harness-injected context (AGENTS.md, environment_context, skills), not just what the human typed; use item_completed UserMessage (paginated) or event_msg user_message (legacy) for the human's input.
- Reasoning is mostly encrypted_content; only summary[] (and occasionally content[]) is readable.
- Unparseable lines occur mid-file; skip them and continue.
- Legacy forks contain copied parent records including parent session_meta lines; only the first session_meta describes the file.
- A thread can have several rollout files after revert; only state_5.sqlite threads.rollout_path identifies the current one. Paginated forks/reverts need history_base resolution to see the inherited prefix.
- Files are compressed to .jsonl.zst after 7 idle days and decompressed again on resume, so the same thread's path extension changes over time.
- cli_version is the creating build, not the writer; migrated legacy rollouts look paginated while claiming old versions.
- Large outputs: CommandExecution.aggregated_output and McpToolCall.result in paginated item_completed are truncated to 64 KiB, but the matching response_item output may be complete (or separately truncated by the model-history budget).
- image_generation_call.result and inline input_image data URLs can be megabytes of base64 on a single line.
- Not persisted in either mode (never on disk): response_item compaction_trigger and unknown response types (Other); event_msg error, warning, guardian_warning, guardian_assessment, auth_recovery_started/completed, thread_queue_changed, realtime_conversation_started/realtime/closed/sdp/list_voices_response, model_reroute, model_verification, turn_moderation_metadata, safety_buffering, agent_reasoning_section_break, raw_response_item, raw_response_completed, session_configured, environment_connected/disconnected, mcp_startup_update/complete, mcp_tool_call_begin, web_search_begin, image_generation_begin, exec_command_begin/output_delta/end, terminal_interaction, view_image_tool_call, exec_approval_request, request_permissions, request_user_input, dynamic_tool_call_request/response, elicitation_request/abandoned, apply_patch_approval_request, deprecation_notice, stream_error, patch_apply_begin/updated, turn_diff, plan_update, shutdown_complete, item_started, hook_started/completed, agent_message_content_delta, plan_delta, reasoning_content_delta, reasoning_raw_content_delta, collab_agent_spawn/interaction/waiting/close/resume begin+end. Approvals, hooks runs and errors therefore leave no dedicated record (only their effects, e.g. a declined CommandExecution status or a task_complete.error). Source: https://github.com/openai/codex/blob/6aaac694803004a63c6f393d153c96d22521a6b9/codex-rs/rollout/src/policy.rs#L127-L226
Claude Code 2.1.310
Location documented; record format is internal and changes between versions. JSON Lines, one record per line, append-only and uncompressed. Lines can be several megabytes when they carry base64 images. The final line may be cut off while the session is still writing.
Files
~/.claude/projects/<project-key>/ | Per-project directory. <project-key> = absolute cwd with every non-alphanumeric char replaced by '-' (long names truncated + hash). Overridable by CLAUDE_CONFIG_DIR and CLAUDE_CODE_PROJECT_DIR_NAME (2.1.234). |
|---|---|
~/.claude/projects/<project-key>/<session-id>.jsonl | Main session transcript: append-only JSONL, one record per line, conversation + metadata records. |
~/.claude/projects/<project-key>/<session-id>/subagents/agent-<agent-id>.jsonl | Subagent (Agent tool, forked skill, workflow agent) transcript. Same record format; isSidechain:true, agentId set, sessionId = parent session. It can also hold extra nested directories between subagents/ and the file. |
~/.claude/projects/<project-key>/<session-id>/subagents/agent-<agent-id>.meta.json | Subagent launch metadata: agentType, description, toolUseId (Agent tool_use id in the parent), spawnDepth, requestShape, requestNonInteractive, and optional isBuiltIn, launchedWithDefaults, finished, stoppedByUser, isFork, model, name, spawnedWithWorktree, worktreePath, worktreeBranch, worktreeCleanlyRemoved. |
~/.claude/projects/<project-key>/<session-id>/subagents/agent-<agent-id>.forked-skill.json | Forked-skill scoping record {skillName, attributionName} for a subagent spawned by a context:fork skill. |
~/.claude/projects/<project-key>/<session-id>/subagents/agent-<agent-id>.forked-skill.marker.json | Marker {forkedSkill:true, skillName}. |
~/.claude/projects/<project-key>/<session-id>/tool-results/<id>.txt | Full output of large tool results (Bash/PowerShell output files, large MCP results) moved out of the transcript; the transcript keeps a <persisted-output> preview and toolUseResult.persistedOutputPath/persistedOutputSize. <id> is a 9-char task/output id or a toolu_ id. |
~/.claude/projects/<project-key>/<session-id>/remote-agents/remote-agent-<id>.meta.json | Metadata for remote (cloud) agents launched from the session. |
~/.claude/projects/<project-key>/<session-id>.ccr-tip.json | .precompact.json | .dir-sync.json | Project-level sibling files reserved per session by the storage layer (cloud-resume tip, pre-compaction copy, cloud session dir-sync record). |
~/.claude/projects/<project-key>/sessions-index.json | Legacy per-project session index {version, originalPath, entries[{sessionId, fullPath, fileMtime, firstPrompt, summary, messageCount, created, modified, gitBranch, projectPath, isSidechain}]}. No longer written by current versions. |
~/.claude/projects/<project-key>/memory/ | Auto-memory markdown files for the project (not per session). |
~/.claude/file-history/<session-id>/<16-hex>@v<n> | Checkpoint backups of edited files, named by path hash + version; referenced by file-history-snapshot/delta backupFileName. Used by /rewind. |
~/.claude/history.jsonl | Global prompt history (up-arrow / Ctrl+R): one line per submitted prompt {display, pastedContents{<id>:{id,type,content|contentHash}}, project, sessionId, timestamp(ms)}. Large pastes store contentHash referencing ~/.claude/paste-cache/<hash>.txt. |
~/.claude/paste-cache/<hash>.txt | Pasted text bodies referenced from history.jsonl pastedContents[].contentHash. |
~/.claude/sessions/<pid>.json | Live-process registry for running sessions {pid, sessionId, cwd, startedAt, version, entrypoint, kind, name, status, ...} (+ <pid>.<hex>.key). Not a transcript. |
~/.claude/session-env/<session-id>/ | Per-session environment scripts captured from SessionStart hooks (e.g. sessionstart-hook-<n>.sh). |
~/.claude/shell-snapshots/, ~/.claude/debug/, ~/.claude/todos|tasks/, ~/.claude/backups/ | Shell snapshots, debug logs and task state swept by cleanupPeriodDays; not part of the transcript format. |
Fields on every record
Record type is chosen by type, then subtype for system records and attachment.type for attachment records. Message content blocks are typed by message.content[].type..
| Field | Type | Meaning |
|---|---|---|
type | string | Record discriminator. Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
uuid | string | Unique id of this transcript node (UUID v4). Target of parentUuid links. Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
parentUuid | string|null | uuid of the preceding node in the conversation DAG; null for a chain root (first entry, compact boundary, subagent first entry). Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
logicalParentUuidoptional | string | On compact_boundary: the uuid of the last pre-compaction node, preserving logical continuity while parentUuid is null. Only on system/compact_boundary. Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
isSidechain | boolean | true for entries belonging to a subagent (all lines in subagents/agent-*.jsonl); false in the main transcript. Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
session_idoptional | string | Duplicate snake_case session id stamped on some records (Values include on assistant/user/attachment/stop_hook_summary). Same value as sessionId. Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
timestamp | string | ISO-8601 UTC write time. Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
version | string | Claude Code version string that wrote the entry (semver). Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
cwd | string | Working directory at the time the entry was written (private; absolute path). Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
gitBranchoptional | string | Git branch of cwd when written ('' or 'HEAD' outside a branch). Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
userType | string | Account class; 'external' for public users ('ant' is internal). Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
entrypointoptional | string | How Claude Code was launched (cli, or sdk/desktop/remote entrypoints).. Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
slugoptional | string | Human-readable session slug (three-word style). Present on a subset of entries. Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
agentIdoptional | string | Subagent id (17 hex chars) on entries written by/for a subagent; matches the agent-<agentId>.jsonl filename. Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
isMetaoptional | boolean | true for system-injected entries not typed by the user (caveats, reminders, hook output, notices). Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
promptIdoptional | string | Id grouping all entries produced in response to one user prompt. Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
requestIdoptional | string | Anthropic API request id ('req_...') of the response this assistant line came from. Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId. |
Records (179)
user
A user-role message: a typed prompt, a slash-command expansion, injected meta text, or (most often) one tool_result answering a tool_use.
Written on prompt submit; after every tool execution (one line per tool_result); for meta/caveat injections and compaction summaries.
| Field | Type | Meaning |
|---|---|---|
agentIdoptional | string | Subagent id (17 hex chars) on entries written by/for a subagent; matches the agent-<agentId>.jsonl filename. |
cwd | string | Working directory at the time the entry was written (private; absolute path). |
entrypoint | string | How Claude Code was launched (cli, or sdk/desktop/remote entrypoints). |
gitBranch | string | Git branch of cwd when written ('' or 'HEAD' outside a branch). |
imagePasteIdsoptional | array | Ids of pasted images referenced by the prompt (history pastedContents ids).since 2.1.302 |
imagePasteIds[]optional | number | Ids of pasted images referenced by the prompt (history pastedContents ids).since 2.1.302 |
interruptedMessageIdoptional | string | message.id of an assistant response that was interrupted by this user entry. |
isCompactSummaryoptional | boolean | true on the user entry that carries the compaction summary text. |
isMetaoptional | boolean | true for system-injected entries not typed by the user (caveats, reminders, hook output, notices). |
isSidechain | boolean | true for entries belonging to a subagent (all lines in subagents/agent-*.jsonl); false in the main transcript. |
isVisibleInTranscriptOnlyoptional | boolean | true when the entry is shown in the transcript view but not sent to the model as-is (compact summary). |
mcpMetaoptional | object | MCP tool-result metadata: {_meta?, structuredContent?} copied from the MCP CallToolResult. |
mcpMeta._metaoptional | object | — |
mcpMeta.structuredContentoptional | object | — |
message | object | Anthropic Messages API message object (role + content + for assistant: id/model/usage/stop fields). |
message.content | string|array | String (plain prompt or command output) or array of content blocks; see contentBlocks. |
message.role | string | Message role. Values include: user. |
originoptional | object | Provenance of a non-typed or queued prompt: {kind, name?, from?, body?, producer?, runId?, senderTaskId?, handback?, handbackReportText?}. |
origin.bodyoptional | string | — |
origin.fromoptional | string | — |
origin.handbackoptional | boolean | — |
origin.handbackReportTextoptional | string | —since 2.1.300 |
origin.kindoptional | string | Values include: human, peer, task-notification, coordinator. |
origin.nameoptional | string | —since 2.1.288 |
origin.produceroptional | string | Values include: session-task. |
origin.runIdoptional | string | —since 2.1.293 |
origin.senderTaskIdoptional | string | — |
parentUuid | string|null | uuid of the preceding node in the conversation DAG; null for a chain root (first entry, compact boundary, subagent first entry). |
permissionDecisionoptional | object | Permission decision for the tool call answered by this tool_result: {decision accept|reject, source, reasonType, reasonCode?, ruleSource?, grantScope?, classifierCategory?}.since 2.1.293 |
permissionDecision.classifierCategoryoptional | string | —since 2.1.309 |
permissionDecision.decisionoptional | string | Values include: accept, reject.since 2.1.293 |
permissionDecision.grantScopeoptional | string | Values include: once.since 2.1.307 |
permissionDecision.reasonCodeoptional | string | —since 2.1.307 |
permissionDecision.reasonTypeoptional | string | Values include: classifier, mode, other, rule, subcommandResults, safetyCheck.since 2.1.293 |
permissionDecision.ruleSourceoptional | string | Values include: localSettings.since 2.1.307 |
permissionDecision.sourceoptional | string | Values include: config, user_temporary, user_reject.since 2.1.293 |
permissionModeoptional | string | Permission mode in force when the prompt was submitted (default/acceptEdits/plan/auto/bypassPermissions...). Values include: auto. |
promptIdoptional | string | Id grouping all entries produced in response to one user prompt. |
promptSourceoptional | string | How the prompt arrived (typed, queued, system...). Values include: typed, system, queued. |
queueSkipAttachmentsoptional | boolean | Queued prompt delivered without re-running attachment collection. |
queueSkipSlashCommandsoptional | boolean | Queued prompt delivered without slash-command expansion.since 2.1.300 |
queueTranscriptOnlyoptional | boolean | Queued prompt recorded in the transcript only.since 2.1.296 |
repeatsCompactSummaryoptional | boolean | Entry repeats an earlier compact summary.since 2.1.296 |
sandboxedoptional | boolean | Whether the tool call ran under the OS sandbox.since 2.1.307 |
serverClassifierContextoptional | object | Auto-mode safety-classifier context sent with the request: {request, context:{git_state, live_cwd, platform}}. |
serverClassifierContext.contextoptional | object | — |
serverClassifierContext.context.git_stateoptional | object | — |
serverClassifierContext.context.live_cwdoptional | string | — |
serverClassifierContext.context.platformoptional | string | — |
serverClassifierContext.requestoptional | string | — |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
session_idoptional | string | Duplicate snake_case session id stamped on some records (Values include on assistant/user/attachment/stop_hook_summary). Same value as sessionId. |
slugoptional | string | Human-readable session slug (three-word style). Present on a subset of entries. |
sourceToolAssistantUUIDoptional | string | uuid of the assistant line containing the tool_use this tool_result answers. |
sourceToolUseIDoptional | string | tool_use id that caused this entry (e.g. skill/command expansion). |
summarizedTurnPromptUuidsoptional | array | Prompt uuids folded into a summarize-from-here (/rewind summarize) entry.since 2.1.305 |
summarizedTurnPromptUuids[]optional | string | Prompt uuids folded into a summarize-from-here (/rewind summarize) entry.since 2.1.305 |
timestamp | string | ISO-8601 UTC write time. |
toolDenialKindoptional | string | Why a tool call was denied (user-rejected, automode-blocked, permission-rule, automode-unavailable...). Values include: user-rejected, automode-blocked, permission-rule, automode-unavailable. |
toolEndsTurnoptional | boolean | The tool result ends the turn (e.g. handback).since 2.1.288 |
turnCompanionoptional | boolean | Entry accompanies a turn without being a turn itself. |
turnOriginoptional | string | Origin of the turn (human, peer, task_notification...). Values include: human, peer, task_notification. |
turnPositionoptional | object | {promptIndex, turnIndex} position of a human turn. |
turnPosition.promptIndexoptional | number | — |
turnPosition.turnIndexoptional | number | — |
userFeedbackoptional | string | Free-text feedback attached to a rejection.since 2.1.296 |
userType | string | Account class; 'external' for public users ('ant' is internal). Values include: external. |
uuid | string | Unique id of this transcript node (UUID v4). Target of parentUuid links. |
version | string | Claude Code version string that wrote the entry (semver). |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"user","promptId":"33333333-3333-4333-8333-333333333333","message":{"role":"user","content":"Add a README section on setup."},"permissionMode":"default","promptSource":"typed","turnOrigin":"human"}Tool-result user lines carry message.content=[{type:tool_result,...}], plus toolUseResult and sourceToolAssistantUUID.
message.content is a plain string for typed prompts and command output and an array otherwise.
Fields omitted at depth >2 under mcpMeta.structuredContent are MCP-server-specific and pass through unchanged.
Other user fields that can appear include replacesSpan, forkedFrom {sessionId,messageUuid}, sessionKind, isVirtual, virtualInResumeRun, resumedFromIncompleteThinking (assistant).
assistant
One content block of a model response. A streamed response with N content blocks is written as N lines that share message.id and requestId.
Written as each content block of an API response completes (thinking, text, tool_use).
| Field | Type | Meaning |
|---|---|---|
advisorModeloptional | string | Advisor (server-side advisor tool) model id configured for this response. |
agentIdoptional | string | Subagent id (17 hex chars) on entries written by/for a subagent; matches the agent-<agentId>.jsonl filename. |
apiBlockIndexoptional | number | Index of this line's content block within the streamed API response (0-based). |
attributionAgentoptional | string | Agent type attribution for the response (for subagents). |
attributionMcpServeroptional | string | MCP server attribution for the response. |
attributionMcpTooloptional | string | MCP tool attribution. |
attributionPluginoptional | string | Plugin attribution.since 2.1.310 |
attributionSkilloptional | string | Skill attribution. |
cwd | string | Working directory at the time the entry was written (private; absolute path). |
effortoptional | string | Effort level of the request (low/medium/high/xhigh/max). Values include: medium. |
entrypoint | string | How Claude Code was launched (cli, or sdk/desktop/remote entrypoints). |
erroroptional | string | API error class on a synthetic error assistant message (server_error, authentication_failed, rate_limit...). Values include: server_error, authentication_failed. |
gitBranch | string | Git branch of cwd when written ('' or 'HEAD' outside a branch). |
isApiErrorMessageoptional | boolean | true on a synthetic assistant message that reports an API error. |
isSidechain | boolean | true for entries belonging to a subagent (all lines in subagents/agent-*.jsonl); false in the main transcript. |
message | object | Anthropic Messages API message object (role + content + for assistant: id/model/usage/stop fields). |
message.container | null | API container field (null). |
message.content | array | String (plain prompt or command output) or array of content blocks; see contentBlocks. |
message.context_management | null | API context-management response field (null when no edits applied). |
message.diagnostics | null|object | API diagnostics; cache_miss_reason {type, cache_missed_input_tokens} when the prompt cache missed. |
message.diagnostics.cache_miss_reasonoptional | object | — |
message.diagnostics.cache_miss_reason.cache_missed_input_tokensoptional | number | — |
message.diagnostics.cache_miss_reason.typeoptional | string | Record discriminator. Values include: tools_changed, previous_message_not_found, unavailable, messages_changed. |
message.id | string | API message id ('msg_...'). Shared by every line split from one streamed response. |
message.input_transformationsoptional | array | Client-side transformations applied to the request input, e.g. {type:thinking_dropped, reason:prefix_binding_mismatch, path}. |
message.input_transformations[]optional | object | — |
message.input_transformations[].pathoptional | string | — |
message.input_transformations[].reasonoptional | string | Values include: prefix_binding_mismatch. |
message.input_transformations[].typeoptional | string | Record discriminator. Values include: thinking_dropped. |
message.model | string | Model id that produced the response. Values include: claude-opus-5-5, claude-sonnet-5-5. |
message.role | string | Message role. Values include: assistant. |
message.stop_details | null | API stop details object or null. |
message.stop_reason | string|null | API stop reason (tool_use, end_turn, stop_sequence, max_tokens, refusal...). null in some subagent transcripts before 2.1.307 (placeholder bug). Values include: tool_use, end_turn, stop_sequence. |
message.stop_sequence | null|string | Matched stop sequence or null. |
message.type | string | Always 'message'. Values include: message. |
message.usage | object | Token usage for the whole API response (repeated identically on every split line). |
message.usage.cache_creation | object | — |
message.usage.cache_creation.ephemeral_1h_input_tokens | number | — |
message.usage.cache_creation.ephemeral_5m_input_tokens | number | — |
message.usage.cache_creation_input_tokens | number | — |
message.usage.cache_read_input_tokens | number | — |
message.usage.fallback_creditoptional | null | —since 2.1.285 |
message.usage.inference_geo | string|null | Values include: global, not_available. |
message.usage.input_tokens | number | — |
message.usage.iterationsoptional | array|null | — |
message.usage.iterations[]optional | object | — |
message.usage.output_tokens | number | — |
message.usage.output_tokens_detailsoptional | object|null | — |
message.usage.output_tokens_details.thinking_tokensoptional | number | — |
message.usage.server_tool_useoptional | object | — |
message.usage.server_tool_use.web_fetch_requestsoptional | number | — |
message.usage.server_tool_use.web_search_requestsoptional | number | — |
message.usage.service_tier | string|null | Values include: standard. |
message.usage.speedoptional | string|null | Values include: standard. |
parentUuid | string|null | uuid of the preceding node in the conversation DAG; null for a chain root (first entry, compact boundary, subagent first entry). |
perTurnEffortoptional | string | Effort level chosen for this turn. Values include: medium. |
requestIdoptional | string | Anthropic API request id ('req_...') of the response this assistant line came from. |
requestRefoptional | string | id of the api-request record that produced this response (since 2.1.300).since 2.1.300 |
requestedModeloptional | string | Model requested before any fallback/alias resolution.since 2.1.295 |
serverClassifierRequestoptional | string | Opaque classifier request reference on assistant lines. |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
session_idoptional | string | Duplicate snake_case session id stamped on some records (Values include on assistant/user/attachment/stop_hook_summary). Same value as sessionId. |
slugoptional | string | Human-readable session slug (three-word style). Present on a subset of entries. |
thinkingDisplayoptional | string | Thinking display mode ('updates' = thinking text summarised/omitted, signature kept). Values include: updates.since 2.1.296 |
thinkingDurationMsoptional | number | Wall time spent in thinking for this response.since 2.1.287 |
timestamp | string | ISO-8601 UTC write time. |
truncatedAfterOutputoptional | boolean | Response truncated after output was produced.since 2.1.302 |
userType | string | Account class; 'external' for public users ('ant' is internal). Values include: external. |
uuid | string | Unique id of this transcript node (UUID v4). Target of parentUuid links. |
version | string | Claude Code version string that wrote the entry (semver). |
wireIngestContextoptional | object | Map tool_use id -> {cwd} context captured when the tool input was ingested. |
wireIngestContext.<dynamic-key>optional | object | — |
wireIngestContext.<dynamic-key>.cwdoptional | string | Working directory at the time the entry was written (private; absolute path). |
wireToolInputsoptional | object | Map tool_use id -> the exact input object as sent on the wire, when it differs from message.content tool_use input (normalised/echoed inputs). |
{"parentUuid":"22222222-2222-4222-8222-222222222222","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"44444444-4444-4444-8444-444444444444","type":"assistant","requestId":"req_011Example","message":{"id":"msg_01Example","type":"message","role":"assistant","model":"claude-opus-5-5","content":[{"type":"text","text":"Done."}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":10,"output_tokens":5,"cache_creation_input_tokens":0,"cache_read_input_tokens":1200}}}A streamed response is split across lines that share message.id. Every split line holds exactly one content block, the same requestId, identical usage and the same stop_reason.
wireToolInputs keys and tool inputs are tool-specific; only top-level shape recorded here.
Synthetic API-error assistant messages have isApiErrorMessage=true, error=<class>, and a non-msg_ message.id.
system / turn_duration
Marks the end of a turn with its wall time and message count.
Written when the main loop finishes a turn.
| Field | Type | Meaning |
|---|---|---|
durationMs | number | — |
messageCount | number | — |
pendingBackgroundAgentCountoptional | number | — |
subtype | string | System-record sub-discriminator. |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"turn_duration","durationMs":42000,"messageCount":12,"isMeta":false}Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
system / stop_hook_summary
Summary of Stop/SubagentStop hooks run at the end of a turn.
Written after Stop hooks execute.
| Field | Type | Meaning |
|---|---|---|
hasOutput | boolean | — |
hookAdditionalContext | array | — |
hookCount | number | — |
hookErrors | array | — |
hookInfos | array | — |
hookInfos[]optional | object | — |
hookInfos[].commandoptional | string | — |
hookInfos[].durationMsoptional | number | — |
level | string | Values include: suggestion. |
preventedContinuation | boolean | — |
stopReason | string | — |
subtype | string | System-record sub-discriminator. |
toolUseID | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"stop_hook_summary","hookCount":1,"hookInfos":[{"command":"echo ok","durationMs":12}],"hookErrors":[],"preventedContinuation":false,"stopReason":"","hasOutput":false,"level":"suggestion","toolUseID":"55555555-5555-4555-8555-555555555555"}Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
system / away_summary
A recap ('while you were away') summarising recent work, shown when the user returns.
Written after idle periods / background completion.
| Field | Type | Meaning |
|---|---|---|
content | string | — |
subtype | string | System-record sub-discriminator. |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"away_summary","content":"Example notice","isMeta":false,"level":"info"}Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
system / compact_boundary
Compaction marker: everything before it is replaced by the following isCompactSummary user entry for model context.
Written on /compact or auto-compact.
| Field | Type | Meaning |
|---|---|---|
compactMetadata | object | — |
compactMetadata.cumulativeDroppedTokens | number | — |
compactMetadata.durationMs | number | — |
compactMetadata.postTokens | number | — |
compactMetadata.preCompactArtifactReadVersionsoptional | array | —since 2.1.296 |
compactMetadata.preCompactDiscoveredToolsoptional | array | — |
compactMetadata.preTokens | number | — |
compactMetadata.preservedMessages | object | — |
compactMetadata.preservedMessages.allUuids | array | — |
compactMetadata.preservedMessages.anchorUuid | string | — |
compactMetadata.preservedMessages.uuids | array | — |
compactMetadata.preservedSegment | object | — |
compactMetadata.preservedSegment.anchorUuid | string | — |
compactMetadata.preservedSegment.headUuid | string | — |
compactMetadata.preservedSegment.tailUuid | string | — |
compactMetadata.trigger | string | Values include: auto, manual. |
content | string | — |
level | string | Values include: info. |
logicalParentUuid | string | On compact_boundary: the uuid of the last pre-compaction node, preserving logical continuity while parentUuid is null. |
subtype | string | System-record sub-discriminator. |
{"parentUuid":null,"isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"compact_boundary","logicalParentUuid":"99999999-9999-4999-8999-999999999999","content":"Conversation compacted","level":"info","compactMetadata":{"trigger":"auto","preTokens":180000,"postTokens":22000,"durationMs":30000}}Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
system / local_command
Output/record of a local slash command (e.g. /model, /cost).
Written when a local command runs.
| Field | Type | Meaning |
|---|---|---|
commandRunoptional | object | — |
commandRun.argsoptional | string | — |
commandRun.commandoptional | string | — |
content | string | — |
level | string | Values include: info. |
subtype | string | System-record sub-discriminator. |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"local_command","content":"Example notice","isMeta":false,"level":"info"}Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
system / informational
Informational notice line shown in the transcript.
Written on notices (e.g. instruction file not loaded).
| Field | Type | Meaning |
|---|---|---|
content | string | — |
level | string | Values include: notice. |
subtype | string | System-record sub-discriminator. |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"informational","content":"Example notice","isMeta":false,"level":"info"}Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
system / api_error
System transcript message subtype 'api_error'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"api_error","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / microcompact_boundary
System transcript message subtype 'microcompact_boundary'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"microcompact_boundary","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / permission_retry
System transcript message subtype 'permission_retry'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"permission_retry","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / memory_saved
System transcript message subtype 'memory_saved'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"memory_saved","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / agents_killed
System transcript message subtype 'agents_killed'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"agents_killed","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / thinking
System transcript message subtype 'thinking'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"thinking","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / file_snapshot
System transcript message subtype 'file_snapshot'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"file_snapshot","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / bridge_status
System transcript message subtype 'bridge_status'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"bridge_status","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / scheduled_task_fire
System transcript message subtype 'scheduled_task_fire'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"scheduled_task_fire","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / read_divider
System transcript message subtype 'read_divider'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"read_divider","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / model_fallback
System transcript message subtype 'model_fallback'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"model_fallback","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / model_consent_fallback
System transcript message subtype 'model_consent_fallback'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"model_consent_fallback","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / model_refusal_fallback
System transcript message subtype 'model_refusal_fallback'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"model_refusal_fallback","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / model_refusal_no_fallback
System transcript message subtype 'model_refusal_no_fallback'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"model_refusal_no_fallback","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / rewind_stand_in
System transcript message subtype 'rewind_stand_in'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"rewind_stand_in","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
system / cloud_session_status
System transcript message subtype 'cloud_session_status'.
Stored only system messages with persist:false are dropped by the persistence filter aE()
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"system","subtype":"cloud_session_status","content":"...","level":"info","isMeta":false}Field set not established beyond the common system envelope (content, level, isMeta, uuid, parentUuid...).
attachment / agent_listing_delta
Delta of available subagent types announced to the model.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.addedLines | array | — |
attachment.addedTypes | array | — |
attachment.builtInPluginTypesoptional | array | —since 2.1.304 |
attachment.builtInTypesoptional | array | —since 2.1.285 |
attachment.isInitial | boolean | — |
attachment.removedTypes | array | — |
attachment.showConcurrencyNote | boolean | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"agent_listing_delta"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / auto_mode
Auto-mode (classifier permission mode) reminder/configuration.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.autoModeConsentFlow | boolean | — |
attachment.bashFirst | boolean | — |
attachment.bashFirstSteer | string | — |
attachment.bypass | boolean | — |
attachment.finishExposedWorkoptional | boolean | —since 2.1.307 |
attachment.steerOnly | boolean | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"auto_mode"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / command_permissions
Tools allowed by a slash command (allowedTools).
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.allowedTools | array | — |
attachment.type | string | Record discriminator. |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"command_permissions"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / compact_file_reference
Reference to a file that was read before compaction (re-read hint).
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.displayPath | string | — |
attachment.filename | string | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.296 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"compact_file_reference"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / credential_org
Organization id of the credential in use.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.organizationUuid | string | — |
attachment.type | string | Record discriminator. |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"credential_org"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / date
Today's date injected into context.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.date | string | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"date"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / deferred_tools_delta
Delta of deferred (search-loaded) tools, MCP failures and surfaced definitions.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.addedLines | array | — |
attachment.addedNames | array | — |
attachment.failedMcpServersoptional | array | — |
attachment.failedMcpServers[]optional | object | — |
attachment.pendingMcpServersoptional | array | — |
attachment.readdedNames | array | — |
attachment.removedNames | array | — |
attachment.surfacedDefinitionsoptional | array | — |
attachment.surfacedDefinitions[]optional | object | — |
attachment.surfacedNamesoptional | array | — |
attachment.type | string | Record discriminator. |
attachment.wireHiddenNames | array | — |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"deferred_tools_delta"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / deferred_tools_record
Record of deferred tool definitions loaded and verbatim tool-input copies.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.entries | array | — |
attachment.entries[]optional | object | — |
attachment.nameOnlyAnnouncementsoptional | array | — |
attachment.toolInputCopiesoptional | array | — |
attachment.toolInputCopies[]optional | object | — |
attachment.type | string | Record discriminator. |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"deferred_tools_record"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / edited_text_file
Notice that a file the model read was edited externally, with a snippet.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.filename | string | — |
attachment.snippet | string | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"edited_text_file"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / environment
Environment snapshot (platform, shell, OS, working dir, git/worktree flags) and changes.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.changesoptional | array | — |
attachment.changes[]optional | object | — |
attachment.snapshot | object | — |
attachment.snapshot.additionalWorkingDirectories | array | — |
attachment.snapshot.isGitRepo | boolean | — |
attachment.snapshot.isWorktree | boolean | — |
attachment.snapshot.osVersion | string | — |
attachment.snapshot.platform | string | — |
attachment.snapshot.scratchpadDirectoryoptional | string | — |
attachment.snapshot.shell | string | — |
attachment.snapshot.workingDirectory | string | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"environment"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / file
@-mentioned file content attached to a prompt.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.content | object | — |
attachment.content.file | object | — |
attachment.content.type | string | Record discriminator. Values include: text. |
attachment.displayPath | string | — |
attachment.filename | string | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.296 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"file"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / hook_additional_context
additionalContext returned by a hook (e.g. SessionStart).
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.content | array | — |
attachment.hookEvent | string | Values include: SessionStart. |
attachment.hookName | string | Values include: SessionStart. |
attachment.toolUseID | string | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"hook_additional_context"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / hook_success
A hook ran successfully; command, exit code, stdout/stderr, duration.
Written collected before a model request (or by the triggering event) and persisted as its own line.
Stored only dropped when content, stdout and stderr are all empty
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.command | string | — |
attachment.content | string | — |
attachment.durationMs | number | — |
attachment.exitCode | number | — |
attachment.hookEvent | string | Values include: SessionStart. |
attachment.hookName | string | Values include: SessionStart:startup, SessionStart:clear, SessionStart:compact, SessionStart:resume. |
attachment.stderr | string | — |
attachment.stdout | string | — |
attachment.toolUseID | string | — |
attachment.type | string | Record discriminator. |
renderedoptional | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"hook_success"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / instructions
CLAUDE.md / memory instruction files loaded (path, type User|Project|AutoMem, content).
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.changedoptional | boolean | — |
attachment.files | array | — |
attachment.files[]optional | object | — |
attachment.reasonoptional | string | Values include: compaction, session_start. |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"instructions"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / invoked_skills
Skills invoked so far (re-attached after compaction).
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.skills | array | — |
attachment.skills[]optional | object | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.296 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"invoked_skills"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / mcp_instructions_delta
Delta of MCP server instructions blocks.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.addedBlocks | array | — |
attachment.addedNames | array | — |
attachment.removedNames | array | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"mcp_instructions_delta"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / model
Model identity (modelId, marketingName, knowledgeCutoff).
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.identity | object | — |
attachment.identity.knowledgeCutoff | string | — |
attachment.identity.marketingName | string | — |
attachment.identity.modelId | string | — |
attachment.text | string | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"model"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / nested_memory
Nested CLAUDE.md discovered under a directory touched by a tool.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.content | object | — |
attachment.content.content | string | — |
attachment.content.contentDiffersFromDisk | boolean | — |
attachment.content.path | string | — |
attachment.content.type | string | Record discriminator. Values include: Project. |
attachment.displayPath | string | — |
attachment.path | string | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRole | string | — |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"nested_memory"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / prompt_snapshot
Snapshot of the system prompt sections and tool list in force.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.cliPrefixoptional | string | — |
attachment.contextRendering | string | — |
attachment.echoWireToolInputs | boolean | — |
attachment.inlineToolsoptional | boolean | — |
attachment.keptRemindersoptional | boolean | — |
attachment.reminderFold | boolean | — |
attachment.systemPrompt | array | — |
attachment.systemTurnsoptional | boolean | — |
attachment.toolChangeHeaderoptional | boolean | — |
attachment.toolsoptional | array | — |
attachment.tools[]optional | object | — |
attachment.type | string | Record discriminator. |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"prompt_snapshot"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / queued_command
A queued prompt or task notification delivered mid-turn.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.commandModeoptional | string | Values include: task-notification, prompt. |
attachment.delivery_idoptional | string | —since 2.1.287 |
attachment.humanTurnoptional | boolean | — |
attachment.isMetaoptional | boolean | true for system-injected entries not typed by the user (caveats, reminders, hook output, notices). |
attachment.originoptional | object | Provenance of a non-typed or queued prompt: {kind, name?, from?, body?, producer?, runId?, senderTaskId?, handback?, handbackReportText?}. |
attachment.origin.bodyoptional | string | — |
attachment.origin.fromoptional | string | — |
attachment.origin.handbackoptional | boolean | — |
attachment.origin.handbackReportTextoptional | string | —since 2.1.300 |
attachment.origin.kindoptional | string | Values include: task-notification, human, peer, coordinator. |
attachment.origin.nameoptional | string | —since 2.1.288 |
attachment.origin.produceroptional | string | Values include: session-task. |
attachment.origin.senderTaskIdoptional | string | — |
attachment.prompt | string | — |
attachment.reminderIdoptional | string | —since 2.1.288 |
attachment.runIdoptional | string | —since 2.1.293 |
attachment.source_uuid | string | — |
attachment.timestampoptional | string | ISO-8601 UTC write time. |
attachment.type | string | Record discriminator. |
attachment.usageoptional | object | — |
attachment.usage.durationMsoptional | number | — |
attachment.usage.toolUsesoptional | number | — |
attachment.usage.totalTokensoptional | number | — |
rendered | array | — |
renderedInHumanTurnoptional | array | — |
renderedInHumanTurn[]optional | object | — |
renderedInHumanTurn[].contentoptional | string | — |
renderedRoleoptional | string | —since 2.1.287 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"queued_command"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / read_truncation_notice
Notice that a Read result was truncated.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.banner | string | — |
attachment.toolUseID | string | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.295 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"read_truncation_notice"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / session_context
Session context (user email, git status) injected at start.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.context | object | — |
attachment.context.gitStatusoptional | string | — |
attachment.context.userEmail | string | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"session_context"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / silent_turn_reminder
Reminder injected after several silent tool-only turns.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.text | string | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"silent_turn_reminder"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / skill_listing
Listing of available skills (names, digests).
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.content | string | — |
attachment.digestsoptional | array | —since 2.1.304 |
attachment.isInitial | boolean | — |
attachment.names | array | — |
attachment.skillCount | number | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"skill_listing"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / task_status
Status of a background task/monitor.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.deltaSummary | null | — |
attachment.description | string | — |
attachment.outputFilePath | string | — |
attachment.shell | object | — |
attachment.shell.command | string | — |
attachment.shell.kind | string | Values include: monitor. |
attachment.shell.toolUseId | string | — |
attachment.status | string | Values include: running. |
attachment.taskId | string | — |
attachment.taskType | string | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRole | string | — |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"task_status"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / thinking_drop
Diagnostic: thinking blocks dropped from the request due to prefix mismatch.
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.blockHashes | array | — |
attachment.clientChange | object | — |
attachment.clientChange.baseline | string | — |
attachment.clientChange.callNumber | number | — |
attachment.clientChange.firstChangedMessageIndex | number | — |
attachment.clientChange.kinds | string | — |
attachment.firstReportForThreadInProcess | boolean | — |
attachment.model | string | — |
attachment.newlyDropped | object | — |
attachment.newlyDropped.blockCount | number | — |
attachment.newlyDropped.first | object | — |
attachment.newlyDropped.last | object | — |
attachment.newlyDropped.reason | string | Values include: prefix_mismatch. |
attachment.newlyDropped.reasonCounts | object | — |
attachment.newlyDropped.turnCount | number | — |
attachment.querySource | string | — |
attachment.requestId | string | Anthropic API request id ('req_...') of the response this assistant line came from. |
attachment.thinkingBlocksSent | number | — |
attachment.thinkingTurnsSent | number | — |
attachment.type | string | Record discriminator. |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"thinking_drop"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / total_tokens_reminder
Context-budget reminder (tokens left).
Written collected before a model request (or by the triggering event) and persisted as its own line.
| Field | Type | Meaning |
|---|---|---|
attachment | object | — |
attachment.text | string | — |
attachment.type | string | Record discriminator. |
rendered | array | — |
renderedRoleoptional | string | —since 2.1.285 |
rendered[]optional | object | — |
rendered[].contentoptional | string | — |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"total_tokens_reminder"}}rendered[] holds the text actually sent to the model; renderedRole is its role.
Also carries the conversation envelope (see top-level envelope): uuid, parentUuid, isSidechain, sessionId, timestamp, version, cwd, gitBranch, userType, entrypoint, slug?, agentId? (subagent files), session_id? (some lines).
attachment / account_memory_recall
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"account_memory_recall"}}attachment / advisor_stripped
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"advisor_stripped"}}attachment / advisor_tool
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"advisor_tool"}}attachment / agent_mention
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"agent_mention"}}attachment / already_read_file
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"already_read_file"}}attachment / artifact_opening_prefetch
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"artifact_opening_prefetch"}}attachment / async_hook_response
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"async_hook_response"}}attachment / async_hook_response_batch
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"async_hook_response_batch"}}attachment / at_mention_reference
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"at_mention_reference"}}attachment / attention_budget
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"attention_budget"}}attachment / auto_mode_exit
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"auto_mode_exit"}}attachment / bash_output_audience_note
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"bash_output_audience_note"}}attachment / batching_reminder
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"batching_reminder"}}attachment / batching_reminder_sent
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"batching_reminder_sent"}}attachment / budget_usd
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"budget_usd"}}attachment / context_efficiency
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"context_efficiency"}}attachment / context_sections
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"context_sections"}}attachment / coordinator_context
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"coordinator_context"}}attachment / cowork_memory_context
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"cowork_memory_context"}}attachment / critical_system_reminder
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"critical_system_reminder"}}attachment / date_change
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"date_change"}}attachment / diagnostics
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"diagnostics"}}attachment / directory
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"directory"}}attachment / dir_sync_notice
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"dir_sync_notice"}}attachment / dynamic_skill
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"dynamic_skill"}}attachment / edited_image_file
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"edited_image_file"}}attachment / elapsed_time_reminder
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"elapsed_time_reminder"}}attachment / fork_briefing
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"fork_briefing"}}attachment / goal_status
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"goal_status"}}attachment / goals
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"goals"}}attachment / hook_blocking_error
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"hook_blocking_error"}}attachment / hook_cancelled
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"hook_cancelled"}}attachment / hook_deferred_tool
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"hook_deferred_tool"}}attachment / hook_error_during_execution
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"hook_error_during_execution"}}attachment / hook_non_blocking_error
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"hook_non_blocking_error"}}attachment / hook_permission_decision
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"hook_permission_decision"}}attachment / hook_plugin_listing
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"hook_plugin_listing"}}attachment / hook_stopped_continuation
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"hook_stopped_continuation"}}attachment / hook_system_message
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"hook_system_message"}}attachment / inlined_image_paths
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"inlined_image_paths"}}attachment / language
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"language"}}attachment / max_turns_reached
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"max_turns_reached"}}attachment / mcp_dropped_tools_delta
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"mcp_dropped_tools_delta"}}attachment / mcp_resource
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"mcp_resource"}}attachment / memory_update
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"memory_update"}}attachment / opened_file_in_ide
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"opened_file_in_ide"}}attachment / output_limit_note
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"output_limit_note"}}attachment / output_style
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"output_style"}}attachment / output_style_instructions
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"output_style_instructions"}}attachment / output_token_usage
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"output_token_usage"}}attachment / pdf_reference
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"pdf_reference"}}attachment / peer_mention
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"peer_mention"}}attachment / plan_file_reference
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"plan_file_reference"}}attachment / plan_mode
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"plan_mode"}}attachment / plan_mode_exit
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"plan_mode_exit"}}attachment / plan_mode_reentry
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"plan_mode_reentry"}}attachment / poll_events
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"poll_events"}}attachment / prefix_delta
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"prefix_delta"}}attachment / proactivity
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"proactivity"}}attachment / project_doc_reads
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"project_doc_reads"}}attachment / projects_thread_ask
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"projects_thread_ask"}}attachment / prompt_render_point
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"prompt_render_point"}}attachment / relevant_memories
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"relevant_memories"}}attachment / remote_session_change
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"remote_session_change"}}attachment / sandbox_instructions
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"sandbox_instructions"}}attachment / secondary_reminder
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"secondary_reminder"}}attachment / secondary_reminder_sent
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"secondary_reminder_sent"}}attachment / selected_lines_in_diff
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"selected_lines_in_diff"}}attachment / selected_lines_in_ide
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"selected_lines_in_ide"}}attachment / session_cron_carry
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"session_cron_carry"}}attachment / session_settings
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"session_settings"}}attachment / skill_mention
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"skill_mention"}}attachment / structured_output
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"structured_output"}}attachment / task_reminder
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"task_reminder"}}attachment / team_context
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"team_context"}}attachment / teammate_mailbox
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"teammate_mailbox"}}attachment / teammate_shutdown_batch
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"teammate_shutdown_batch"}}attachment / thinking_stripped
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"thinking_stripped"}}attachment / thread_state
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"thread_state"}}attachment / todo_reminder
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"todo_reminder"}}attachment / token_usage
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"token_usage"}}attachment / tool_host_result_lines
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"tool_host_result_lines"}}attachment / tool_hosts_correction
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"tool_hosts_correction"}}attachment / tool_hosts_notice
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"tool_hosts_notice"}}attachment / tool_search_usage_reminder
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"tool_search_usage_reminder"}}attachment / ultra_effort_enter
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"ultra_effort_enter"}}attachment / ultra_effort_exit
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"ultra_effort_exit"}}attachment / ultrathink_effort
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"ultrathink_effort"}}attachment / unknown_command_fallback
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"unknown_command_fallback"}}attachment / withheld_memory
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"withheld_memory"}}attachment / workflow_keyword_request
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"workflow_keyword_request"}}attachment / workflow_size_guideline_change
Its fields are not established for this version.
Stored only subject to persistence filter aE(); some types are rendered-only or ant-only
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"attachment","attachment":{"type":"workflow_size_guideline_change"}}progressuntil not written by 2.1.310 (exact removal version not established)
Legacy streaming progress line for a running tool/hook/agent (data.type bash_progress, mcp_progress, agent_progress, hook_progress, tool_heartbeat, ...).
Written historically written while tools ran. In 2.1.310 the persistence filter aE() returns false for every progress entry, so new files do not contain them.
Stored never-on-disk (2.1.310: filtered at write); legacy files may contain them
| Field | Type | Meaning |
|---|---|---|
data | object | Progress payload discriminated by data.type. |
toolUseIDoptional | string | tool_use id the progress belongs to. |
parentToolUseIDoptional | string | Parent tool_use id (for nested agent progress). |
{"parentUuid":"11111111-1111-4111-8111-111111111111","isSidechain":false,"userType":"external","cwd":"/home/user/project","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","version":"2.1.310","gitBranch":"main","entrypoint":"cli","timestamp":"2026-10-20T10:00:00.000Z","uuid":"22222222-2222-4222-8222-222222222222","type":"progress","toolUseID":"toolu_01Example","parentToolUseID":"toolu_01Example","data":{"type":"bash_progress","output":"...","elapsedTimeSeconds":3}}Loader still reads legacy progress lines: it records their parentUuid and re-parents any child whose parentUuid points at a progress uuid onto the progress line's own parent (progress lines are skipped, not kept in the chain).
Known data.type values: bash_progress, powershell_progress, mcp_progress, tool_heartbeat, agent_api_retry, artifact_publish_retry, agent_progress, hook_progress, skill_progress, search_results_received, workflow_agent, workflow_log.
ai-title
AI-generated session title.
Written when a title is generated; re-appended to the file tail repeatedly (see gotchas).
| Field | Type | Meaning |
|---|---|---|
aiTitle | string | — |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
{"type":"ai-title","aiTitle":"Setup docs update","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}No timestamp/version/uuid. Repeated many times per file. Last one wins.
last-prompt
Leaf pointer: which node is the current conversation tip (leafUuid) and the last prompt text.
Written after each turn and on rewind; re-appended to the tail.
| Field | Type | Meaning |
|---|---|---|
explicitoptional | boolean | — |
lastPromptoptional | string | — |
leafUuid | string | — |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
{"type":"last-prompt","lastPrompt":"Add a README section","leafUuid":"44444444-4444-4444-8444-444444444444","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}explicit:true marks a user-chosen leaf (e.g. /rewind); rewound:true marks a rewind; leafUuid:null + explicit:true withdraws the leaf (fresh start after /clear-style reset).
mode
Session mode (normal / other UI modes). Last wins.
Written re-appended with session metadata.
| Field | Type | Meaning |
|---|---|---|
mode | string | Values include: normal. |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
{"type":"mode","mode":"normal","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}permission-mode
Current permission mode. Last wins.
Written when the mode changes; re-appended with metadata.
| Field | Type | Meaning |
|---|---|---|
permissionMode | string | Permission mode in force when the prompt was submitted (default/acceptEdits/plan/auto/bypassPermissions...). Values include: auto. |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
{"type":"permission-mode","permissionMode":"default","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}atis-latch
Opaque printable-ASCII latch value for the session (internal feature latch).
Written re-appended with metadata.
| Field | Type | Meaning |
|---|---|---|
atis | string | — |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
{"type":"atis-latch","atis":"x1","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}Loader accepts only /^[\x21-\x7e]*$/ values.
cost-state
Cumulative session cost and per-model token totals; restores /cost on resume.
Written periodically and on exit.
| Field | Type | Meaning |
|---|---|---|
sessionId | string | Session id. |
totalCostUSD | number | Estimated cumulative USD cost. |
totalAPIDuration | number | ms spent in API calls incl. retries. |
totalAPIDurationWithoutRetries | number | ms in API calls excluding retries. |
totalToolDuration | number | ms spent executing tools. |
totalLinesAdded | number | Lines added by edits. |
totalLinesRemoved | number | Lines removed. |
totalDuration | number | Session wall ms. |
startTime | number | Epoch ms of session start. |
modelUsage.<model> | object | {inputTokens, outputTokens, thinkingTokens?, cacheReadInputTokens, cacheCreationInputTokens, webSearchRequests, costUSD} per model id. |
hasUnknownModelCostoptional | boolean | A model without a price table was used. |
{"type":"cost-state","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","totalCostUSD":1.23,"totalAPIDuration":60000,"totalAPIDurationWithoutRetries":59000,"totalToolDuration":20000,"totalLinesAdded":10,"totalLinesRemoved":2,"totalDuration":300000,"startTime":1760000000000,"modelUsage":{"claude-opus-5-5":{"inputTokens":100,"outputTokens":50,"thinkingTokens":10,"cacheReadInputTokens":9000,"cacheCreationInputTokens":500,"webSearchRequests":0,"costUSD":1.23}},"hasUnknownModelCost":false}modelUsage is keyed by model id (dynamic keys). Zod-validated on load (Wnn): numbers nonnegative/finite; totalCostUSD <= 1e9.
pr-link
Links the session to a pull request.
Written when Claude Code detects/creates a PR for the session.
| Field | Type | Meaning |
|---|---|---|
prNumber | number | — |
prRepository | string | — |
prUrl | string | — |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
timestamp | string | ISO-8601 UTC write time. |
{"type":"pr-link","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","prNumber":42,"prUrl":"https://github.com/example/repo/pull/42","prRepository":"example/repo","timestamp":"2026-10-20T10:00:00.000Z"}queue-operation
Prompt-queue journal: a prompt was enqueued, dequeued or removed while Claude was busy.
Written on queue changes.
| Field | Type | Meaning |
|---|---|---|
commandUuidoptional | string | — |
contentoptional | string | — |
deliveryIdoptional | string | — |
operation | string | Values include: enqueue, dequeue, remove. |
reasonoptional | string | Values include: absorbed_mid_turn, delivered_to_agent. |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
timestamp | string | ISO-8601 UTC write time. |
{"type":"queue-operation","operation":"enqueue","timestamp":"2026-10-20T10:00:00.000Z","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","content":"also update the tests"}operation ∈ enqueue|dequeue|remove; Claude Code also passes popAll/clear-style ops through the same writer. content is the queued prompt text.
file-history-snapshot
Checkpoint of tracked files for /rewind, keyed to a user message.
Written at each user prompt (initial) and when tracked files change (isSnapshotUpdate:true).
| Field | Type | Meaning |
|---|---|---|
isSnapshotUpdate | boolean | — |
messageId | string | — |
snapshot | object | — |
snapshot.messageId | string | — |
snapshot.timestamp | string | ISO-8601 UTC write time. |
snapshot.trackedFileBackups | object | — |
snapshot.trackedFileBackups.<dynamic-key> | object | — |
{"type":"file-history-snapshot","messageId":"22222222-2222-4222-8222-222222222222","snapshot":{"messageId":"22222222-2222-4222-8222-222222222222","trackedFileBackups":{"src/app.ts":{"backupFileName":"0123456789abcdef@v2","version":2,"backupTime":"2026-10-20T10:00:00.000Z","realParentDir":"/home/user/project/src"}},"timestamp":"2026-10-20T10:00:00.000Z"},"isSnapshotUpdate":false}trackedFileBackups keys are file paths (dynamic). backupFileName null means the file did not exist at that version.
backupFileName names a file in ~/.claude/file-history/<sessionId>/ (names match /^[0-9a-f]{16}@v\d+$/). Names can also be a 48-hex suffix.
file-history-delta
Incremental file-history backup for one tracked path, attached to an existing snapshot (smaller than re-writing the snapshot).
Written when a tracked file is backed up after the snapshot was written.
| Field | Type | Meaning |
|---|---|---|
backup | object | — |
backup.backupFileName | null|string | — |
backup.backupTime | string | — |
backup.realParentDir | string | — |
backup.version | number | Claude Code version string that wrote the entry (semver). |
messageId | string | — |
snapshotMessageId | string | — |
timestamp | string | ISO-8601 UTC write time. |
trackingPath | string | — |
{"type":"file-history-delta","messageId":"22222222-2222-4222-8222-222222222222","snapshotMessageId":"22222222-2222-4222-8222-222222222222","trackingPath":"src/app.ts","backup":{"backupFileName":"0123456789abcdef@v3","version":3,"backupTime":"2026-10-20T10:00:00.000Z","realParentDir":"/home/user/project/src"},"timestamp":"2026-10-20T10:00:00.000Z"}Loader groups deltas by messageId and applies them on top of the snapshot with the same messageId. Probably introduced with 2.1.208 file-history pruning (not established).
api-requestsince 2.1.300
Request-replay record: parameters of one API request, with messages expressed as content-addressed blob hashes (base + keep + tail).
Written before each main-thread or subagent API call (since 2.1.300).
| Field | Type | Meaning |
|---|---|---|
agentIdoptional | string | Subagent id (17 hex chars) on entries written by/for a subagent; matches the agent-<agentId>.jsonl filename. |
baseoptional | string | — |
cacheControl | array | — |
cacheControl[]optional | object | — |
cacheControl[].pathoptional | array | — |
cacheControl[].valueoptional | object | — |
id | string | — |
keep | number | — |
params | object | — |
params.betas | array | — |
params.context_management | object | — |
params.context_management.edits | array | — |
params.max_tokens | number | — |
params.model | string | Values include: claude-opus-5-5, claude-sonnet-5-5. |
params.output_config | object | — |
params.output_config.effort | string | Effort level of the request (low/medium/high/xhigh/max). Values include: medium. |
params.safeguardsoptional | array | — |
params.safeguards[]optional | object | — |
params.thinking | object | — |
params.thinking.display | string | Values include: updates. |
params.thinking.type | string | Record discriminator. Values include: adaptive. |
querySource | string | Values include: repl_main_thread, agent:builtin:general-purpose, agent:builtin:Explore, agent:custom, agent:custom:<plugin-agent>. |
requestDigest | string | — |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
shapeHash | string | — |
tail | array | — |
tail[]optional | string | — |
timestamp | string | ISO-8601 UTC write time. |
version | string | Claude Code version string that wrote the entry (semver). |
{"type":"api-request","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","id":"r_example1","timestamp":"2026-10-20T10:00:00.000Z","version":1,"querySource":"repl_main_thread","shapeHash":"ab12","params":{"model":"claude-opus-5-5","max_tokens":64000,"thinking":{"type":"adaptive"}},"base":"r_example0","keep":12,"tail":["cd34","ef56"],"cacheControl":[],"requestDigest":"9a8b"}messages = (messages of api-request base)[0:keep] + tail; each hash resolves to an api-request-blob.message in the same file. base usually points at an earlier api-request.
shapeHash resolves to an api-request-shape record (system + tools). version here is the replay-format version (number), NOT the Claude Code version.
Optional: agentId (subagent requests are routed to the subagent file), withheld (param names withheld because they came from CLAUDE_CODE_EXTRA_BODY), cut + cutRequestDigest (when memory-cut messages were substituted).
params.safeguards[].classifier_context (full auto-mode classifier context) appears only 2.1.300–2.1.303; 2.1.304 changelog: classifier context no longer stored with every request.
api-request-blobsince 2.1.300
Content-addressed copy of one request message (system/user/assistant) referenced by api-request.tail hashes.
Written written once per new hash, before the api-request that references it.
| Field | Type | Meaning |
|---|---|---|
agentIdoptional | string | Subagent id (17 hex chars) on entries written by/for a subagent; matches the agent-<agentId>.jsonl filename. |
hash | string | — |
message | object | Anthropic Messages API message object (role + content + for assistant: id/model/usage/stop fields). |
message.content | array|string | String (plain prompt or command output) or array of content blocks; see contentBlocks. |
message.output_configoptional | object | — |
message.output_config.effortoptional | string | Effort level of the request (low/medium/high/xhigh/max). |
message.role | string | Message role. Values include: system, assistant, user. |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
{"type":"api-request-blob","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","hash":"cd34","message":{"role":"user","content":[{"type":"text","text":"Hello"}]}}message.role includes "system" (system blocks and tool_addition blocks), which is not an Anthropic API role: these are replay-internal.
api-request-shapesince 2.1.300
Content-addressed request shape: the system prompt blocks and tool definitions of a request.
Written once per distinct shapeHash per file.
| Field | Type | Meaning |
|---|---|---|
agentIdoptional | string | Subagent id (17 hex chars) on entries written by/for a subagent; matches the agent-<agentId>.jsonl filename. |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
shape | object | — |
shape.system | array | — |
shape.system[]optional | object | — |
shape.tools | array | — |
shape.tools[]optional | object | — |
shapeHash | string | — |
timestamp | string | ISO-8601 UTC write time. |
version | string | Claude Code version string that wrote the entry (semver). |
{"type":"api-request-shape","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","shapeHash":"ab12","timestamp":"2026-10-20T10:00:00.000Z","version":1,"shape":{"system":[{"type":"text","text":"You are ..."}],"tools":[{"name":"Read","description":"...","input_schema":{"type":"object"}}]}}Shapes larger than the cap are not recorded (oversize shapes are remembered and their requests skipped).
fork-context-ref
In a forked subagent transcript: points at the parent conversation prefix the fork inherited instead of copying it.
Written at fork-subagent start.
| Field | Type | Meaning |
|---|---|---|
agentId | string | Subagent id (17 hex chars) on entries written by/for a subagent; matches the agent-<agentId>.jsonl filename. |
contextLength | number | — |
parentLastUuid | string | — |
parentSessionId | string | — |
{"type":"fork-context-ref","agentId":"a0123456789abcdef","parentSessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","parentLastUuid":"44444444-4444-4444-8444-444444444444","contextLength":120}Values include only in subagent files. parentSessionId is the containing session.
frame-link
Count/link of artifacts (frames) published from the session.
Written when an artifact is published; re-appended with metadata.
| Field | Type | Meaning |
|---|---|---|
artifactCount | number | — |
frameUrloptional | string | — |
pathoptional | string | — |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
timestamp | string | ISO-8601 UTC write time. |
titleoptional | string | — |
{"type":"frame-link","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","artifactCount":1,"timestamp":"2026-10-20T10:00:00.000Z"}artifact-comment-monitor
State of armed artifact comment watchers, keyed by artifact id.
Written when watchers change.
| Field | Type | Meaning |
|---|---|---|
artifacts | object | — |
artifacts.<dynamic-key> | object | — |
artifacts.<dynamic-key>.state | string | — |
artifacts.<dynamic-key>.title | string | — |
artifacts.<dynamic-key>.writtenAtMs | number | — |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
v | number | — |
{"type":"artifact-comment-monitor","v":1,"sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","artifacts":{"art_1":{"state":"armed","title":"Example","writtenAtMs":1760000000000}}}artifact-autoreact-ledger
Ledger of artifact comment threads already reacted to, per artifact.
Written when the auto-react ledger changes.
| Field | Type | Meaning |
|---|---|---|
accountUuid | string | — |
artifacts | object | — |
artifacts.<dynamic-key> | object | — |
artifacts.<dynamic-key>.everBaselined | boolean | — |
artifacts.<dynamic-key>.everHadThreads | boolean | — |
artifacts.<dynamic-key>.savedAt | number | — |
artifacts.<dynamic-key>.stampHighWater | string | — |
artifacts.<dynamic-key>.threads | array | — |
artifacts.<dynamic-key>.turnTimestamps | array | — |
sessionId | string | Session UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id. |
v | number | — |
{"type":"artifact-autoreact-ledger","v":1,"sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","accountUuid":"00000000-0000-4000-8000-000000000000","artifacts":{}}summary
Legacy conversation summary keyed to a leaf (pre-compact_boundary era). Loader still maps leafUuid -> summary.
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
summary | string | Summary text. |
leafUuid | string | Leaf node the summary describes. |
{"type":"summary","summary":"Setup docs work","leafUuid":"44444444-4444-4444-8444-444444444444"}custom-title
User-set session title (/rename, --name, hook sessionTitle). Takes precedence over ai-title.
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
customTitle | string | Title; empty string clears. |
sessionId | string | — |
{"type":"custom-title","customTitle":"Docs work","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}tag
Session tag.
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
tag | string | — |
sessionId | string | — |
{"type":"tag","tag":"docs","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}agent-name
Name of the session when run as a named agent/teammate.
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
agentName | string | — |
sessionId | string | — |
{"type":"agent-name","agentName":"reviewer","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}agent-color
Display color for a named agent.
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
agentColor | string | — |
sessionId | string | — |
{"type":"agent-color","agentColor":"blue","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}agent-setting
Agent definition/setting the session runs under (--agent).
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
agentSetting | string | — |
sessionId | string | — |
{"type":"agent-setting","agentSetting":"reviewer","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}relocated
The session transcript was relocated to another cwd/project directory (/cd).
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
relocatedCwd | string | New working directory. |
sessionId | string | — |
{"type":"relocated","relocatedCwd":"/home/user/other","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}ended-by-model
The model ended the session (end-session tool).
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
sessionId | string | — |
timestamp | string | — |
{"type":"ended-by-model","timestamp":"2026-10-20T10:00:00.000Z","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}continued-in
Forward pointer: this session continues in another session id.
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
sessionId | string | — |
continuedInSessionId | string | Successor session id. |
timestamp | string | — |
{"type":"continued-in","timestamp":"2026-10-20T10:00:00.000Z","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","continuedInSessionId":"bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb"}worktree-state
Git worktree the session runs in (EnterWorktree/--worktree).
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
worktreeSession | object|null | Worktree session descriptor (path/branch...); shape not established. |
sessionId | string | — |
{"type":"worktree-state","worktreeSession":{"worktreePath":"/home/user/project/.claude/worktrees/x","worktreeBranch":"x"},"sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}isolation-latch
Which side of an isolation boundary the session is latched to.
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
side | string | — |
sessionId | string | — |
{"type":"isolation-latch","side":"local","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}dev-mods
Folder of development mods loaded for the session (validated to belong to the session).
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
folder | string | — |
sessionId | string | — |
{"type":"dev-mods","folder":"/home/user/.claude/mods/dev","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}memory-mode
Memory on/off stamp positioned after a message uuid.
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
mode | enum(on,off) | — |
afterUuid | string|null | Node after which the mode applies. |
timestamp | string | — |
reasonoptional | enum(paused,account_off,account_read_only,session_shape,server_off) | — |
accountoptional | string | — |
accountChoiceoptional | enum(on,read_only,off) | — |
sessionId | string | — |
{"type":"memory-mode","mode":"off","afterUuid":null,"timestamp":"2026-10-20T10:00:00.000Z","reason":"paused","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}bridge-session
Remote Control / bridge binding of the local session to a remote session id.
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
bridgeSessionId | string | Remote session id ('' clears). |
lastSequenceNum | number | — |
declaredDialogKindsoptional | array | — |
sessionGroupingIdoptional | string | — |
noHistoryBackfilloptional | boolean | — |
ownerAccountUuidoptional | string | — |
ownerOrganizationUuidoptional | string | — |
sessionId | string | — |
{"type":"bridge-session","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","bridgeSessionId":"session_example","lastSequenceNum":0}history-suppression
Marks the session as suppressed from prompt history / listing.
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
cause | string | e.g. 'migration', 'fork_inherit'. |
vetoedAgainstAccountUuidoptional | string | — |
ts | string | ISO time. |
sessionId | string | — |
{"type":"history-suppression","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","cause":"fork_inherit","ts":"2026-10-20T10:00:00.000Z"}attribution-snapshot
Code-attribution snapshot keyed to a message (which lines Claude authored). Only the latest is kept on load.
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
messageId | string | — |
(other)optional | object | Attribution payload; shape not established. |
{"type":"attribution-snapshot","messageId":"22222222-2222-4222-8222-222222222222"}content-replacement
Records tool-result contents replaced in context (e.g. large results persisted to tool-results/ or cleared), so resume rebuilds the same request.
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
sessionId | string | — |
agentIdoptional | string | Routes replacement to a subagent. |
replacements | array | Replacement descriptors; shape not established. |
{"type":"content-replacement","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa","replacements":[{}]}observer-ref
Reference record for an observer agent (spread of an observer descriptor plus timestamp).
Stored only only when the feature is used
| Field | Type | Meaning |
|---|---|---|
timestamp | string | — |
(observer fields)optional | object | Spread from caller; shape not established. |
{"type":"observer-ref","timestamp":"2026-10-20T10:00:00.000Z"}Content blocks (15)
text
Plain text block (assistant reply text, or user text).
Written assistant/user message.content[]
| Field | Type | Meaning |
|---|---|---|
text | string | — |
{"type":"text","text":"Done."}Also appears as a user content block and inside tool_result.content.
thinking
Extended-thinking block with signature.
Written assistant message.content[] (own line)
| Field | Type | Meaning |
|---|---|---|
signature | string | — |
thinking | string | — |
{"type":"thinking","thinking":"","signature":"EqQBCkgIBx..."}thinking text is usually empty (thinkingDisplay 'updates' / omitted display); signature always present.
redacted_thinking
Redacted thinking block (encrypted data).
Written assistant message.content[]
Stored conditional
{"type":"redacted_thinking","data":"EmwKAhgB..."}tool_use
Client tool invocation.
Written assistant message.content[] (own line)
| Field | Type | Meaning |
|---|---|---|
calleroptional | object | — |
caller.typeoptional | string | Record discriminator. Values include: direct. |
id | string | — |
input | object | — |
name | string | — |
{"type":"tool_use","id":"toolu_01Example","name":"Read","input":{"file_path":"/home/user/project/README.md"},"caller":{"type":"direct"}}caller {type:'direct'} Values include on all but one; MCP tools are named mcp__<server>__<tool>.
server_tool_use
Server-side tool invocation (web search/fetch, advisor).
Written assistant message.content[]
Stored conditional
{"type":"server_tool_use","id":"srvtoolu_01","name":"web_search","input":{"query":"x"}}web_search_tool_result
Server web-search result block.
Written assistant message.content[]
Stored conditional
{"type":"web_search_tool_result","tool_use_id":"srvtoolu_01","content":[]}advisor_tool_result
Result of the server-side advisor tool.
Written assistant message.content[]
Stored conditional
{"type":"advisor_tool_result","tool_use_id":"srvtoolu_02","content":{}}mcp_tool_use
API-side MCP connector tool use block.
Written assistant message.content[]
Stored conditional
{"type":"mcp_tool_use","id":"mcptoolu_01","name":"x","server_name":"y","input":{}}tool_result
Result for one tool_use, sent as user content.
Written user message.content[]
| Field | Type | Meaning |
|---|---|---|
content | string|array | — |
content[]optional | object | — |
content[].sourceoptional | object | — |
content[].textoptional | string | — |
content[].tool_nameoptional | string | — |
content[].typeoptional | string | Record discriminator. |
is_erroroptional | boolean | — |
tool_use_id | string | — |
{"type":"tool_result","tool_use_id":"toolu_01Example","content":"file contents...","is_error":false}content is a string or an array of text/image/tool_reference blocks.
Large outputs: content contains a <persisted-output> wrapper pointing at the tool-results/ sidecar.
Cleared results become '[Old tool result content cleared]' (microcompaction).
image
Base64 image (pasted by user or returned in a tool_result).
Written user message.content[] or tool_result.content[]
| Field | Type | Meaning |
|---|---|---|
source | object | — |
source.data | string | — |
source.media_type | string | — |
source.type | string | Record discriminator. Values include: base64. |
{"type":"image","source":{"type":"base64","media_type":"image/png","data":"iVBORw0KGgo..."}}585 images were inside tool_result.content.
document
PDF/document block.
Written user content / tool_result content
Stored conditional
{"type":"document","source":{"type":"base64","media_type":"application/pdf","data":"JVBERi0..."}}2.1.299: @-mentioned PDF bytes are no longer kept in the session transcript.
search_result
Search-result content block.
Written tool_result content
Stored conditional
{"type":"search_result","source":"https://example.com","title":"x","content":[]}tool_reference
Reference to a deferred tool definition returned by ToolSearch.
Written tool_result.content[]
| Field | Type | Meaning |
|---|---|---|
tool_name | string | — |
{"type":"tool_reference","tool_name":"WebFetch"}system: text
System-prompt text block, stored inside api-request-blob/api-request-shape (role "system").
Written api-request-blob.message.content[] / api-request-shape.shape.system[]
| Field | Type | Meaning |
|---|---|---|
text | string | — |
{"type":"text","text":"You are ..."}Only in request-replay records (since 2.1.300); not part of conversation messages.
system: tool_addition
Tool definition added mid-conversation, stored in request-replay blobs.
Written api-request-blob.message.content[] (role system)
| Field | Type | Meaning |
|---|---|---|
tool | object | — |
tool.definition | object | — |
tool.definition.description | string | — |
tool.definition.eager_input_streaming | boolean | — |
tool.definition.input_schema | object | — |
tool.definition.name | string | — |
tool.type | string | Record discriminator. Values include: tool_definition. |
{"type":"tool_addition","tool":{"type":"tool_definition","definition":{"name":"WebFetch"}}}Rebuilding the conversation
- ordering
- File order is append order and is NOT conversation order. Lines are appended as they are produced; metadata records are re-appended near the tail; branches from rewinds interleave. Reconstruct conversation order only via parentUuid.
- message parent links
- Conversation records (user/assistant/system/attachment) form a tree via uuid -> parentUuid. Each main file starts with an attachment root (parentUuid null). Every other node's parentUuid resolved to an earlier line in the same file. Metadata records have no uuid and are outside the tree.
- message parent links
- A streamed assistant response becomes N lines (one content block each) sharing message.id and requestId; each line's parentUuid is the previous line of the same response. Merge consecutive same-message.id assistant lines to recover the API message; usage is repeated, count it once.
- tool call ↔ result
- tool_result.tool_use_id = tool_use.id. The user line carrying the result has parentUuid = uuid of the assistant line holding that tool_use and sourceToolAssistantUUID = same uuid. With parallel tool calls the assistant lines chain A1->A2 while result R1 hangs off A1: the assistant line therefore has two children. This is not a user branch.
- tool call ↔ result
- toolUseResult on the same user line is the tool's structured result (shape per tool name, string on error). Image base64 in toolUseResult may be blanked ("") when identical to the image in message.content (media dedup, Ie()/Epn() refill on read).
- turns
- A human turn starts at a user line with promptSource typed/queued (origin.kind human) and ends with system/turn_duration (durationMs, messageCount). promptId groups the prompt and all its descendants. system/stop_hook_summary follows when Stop hooks run.
- subagents
- Parent assistant tool_use (Agent/Task, or Skill fork) id == subagents/agent-<id>.meta.json toolUseId. The Agent toolUseResult has agentId and outputFile. Subagent file: every conversation line has isSidechain:true, agentId = filename id, sessionId = parent session id; first line parentUuid null. Forked subagents start with a fork-context-ref pointing at parentSessionId + parentLastUuid + contextLength instead of copying the prefix. Subagent api-request/blob/shape/content-replacement records are routed to the subagent file (route-by-agent).
- compaction
- system/compact_boundary has parentUuid:null (new chain root) and logicalParentUuid = last pre-compaction node. The next user line has isCompactSummary:true + isVisibleInTranscriptOnly:true and holds the summary. compactMetadata.preservedSegment {headUuid, anchorUuid, tailUuid} and preservedMessages.uuids name kept messages (52/52 resolved). On load, 'transcript' and 'boundary-cleared' records before the last boundary are dropped; 'last-wins'/'accumulate' metadata survive.
- compaction
- Microcompaction replaces old tool_result content with '[Old tool result content cleared]' or a <persisted-output> preview; content-replacement records log those substitutions so resume reproduces the same request.
- branches/rewind
- Rewind/edit appends new nodes whose parentUuid points back into the tree; abandoned branches stay in the file. The active leaf is the leafUuid of the last last-prompt record (explicit:true for user-chosen leaf, rewound:true after /rewind); a last-prompt with leafUuid:null + explicit:true withdraws the leaf. Without a usable last-prompt the loader picks the newest-timestamp non-sidechain message. Walk parentUuid from the leaf to the root, merging same-message.id assistant siblings and re-attaching parallel tool results.
- forks
- /branch (fork) writes a NEW <new-session-id>.jsonl: copies the selected path with original uuids, linearised parentUuid, new sessionId, isSidechain:false and forkedFrom {sessionId, messageUuid}; carries content-replacement, relocated, memory-mode, atis-latch and history-suppression(cause fork_inherit) forward.
- resume
- --resume/--continue reopen and keep appending to the same <session-id>.jsonl (hook_success attachments with hookName SessionStart:resume appear). A continued-in record can point to a successor session.
- sidecar references
- file-history-snapshot.snapshot.trackedFileBackups[path].backupFileName -> ~/.claude/file-history/<sessionId>/<name>; file-history-delta.messageId/snapshotMessageId -> user uuid; toolUseResult.persistedOutputPath -> <session-id>/tool-results/<id>.txt; api-request.shapeHash -> api-request-shape; api-request.tail[] -> api-request-blob.hash; api-request.base -> earlier api-request.id; assistant.requestRef -> api-request.id.
Token usage
assistant.message.usage.input_tokens- Uncached input tokens of the API response. Repeated on every line of a split response — dedupe by message.id.
assistant.message.usage.cache_creation_input_tokens / cache_creation.ephemeral_5m_input_tokens / ephemeral_1h_input_tokens- Prompt-cache write tokens, total and by TTL.
assistant.message.usage.cache_read_input_tokens- Prompt-cache read tokens.
assistant.message.usage.output_tokens / output_tokens_details.thinking_tokens- Output tokens and the thinking share.
assistant.message.usage.iterations[]- Per-iteration usage when the server ran multiple sampling iterations (e.g. server tools/advisor).
assistant.message.usage.server_tool_use.web_search_requests / web_fetch_requests- Server tool call counts.
assistant.message.usage.service_tier / speed / inference_geo / fallback_credit- Tier and routing metadata.
cost-state.totalCostUSD, modelUsage.<model>.costUSD- Client-estimated cumulative cost (last record wins).
attachment/queued_command.attachment.usage {totalTokens, toolUses, durationMs}- Usage summary of a finished background task/subagent delivered as a notification.
system/compact_boundary.compactMetadata.preTokens / postTokens / cumulativeDroppedTokens- Context size before/after compaction.
Versions
Every conversation record carries version (Claude Code semver of the writer); metadata records do not. There is no file-level header or schema version. Known boundaries: api-request / api-request-blob / api-request-shape records and assistant.requestRef appear from 2.1.300 (changelog 2.1.300: 'record each API request's system prompt, tools and parameters'); params.safeguards[].classifier_context stored only 2.1.300–2.1.303 (changelog 2.1.304); subagent placeholder usage/null stop_reason fixed 2.1.307; renderedRole on attachments from 2.1.285; requestedModel from 2.1.295; permissionDecision from 2.1.293; sandboxed from 2.1.307; thinkingDisplay from 2.1.296; file-history pruning 2.1.208 (changelog).
Parsing pitfalls
- Assistant usage is duplicated on every split line of one response; summing per line over-counts tokens 2x on average.
- parentUuid chains are not linear: parallel tool calls make the assistant line a parent of both the next assistant block and its own tool_result. Following only the last child loses results.
- Metadata (ai-title, last-prompt, mode, permission-mode, atis-latch, custom-title, tag, pr-link, ...) is re-appended to the tail repeatedly so tail-window readers find it; expect thousands of duplicates and take the last.
- Metadata records have no uuid, version or (mostly) timestamp; do not require the conversation envelope on every line.
- In subagent files sessionId is the parent session id, not the file stem; use agentId / filename.
- api-request.version is a replay-format number, not the Claude Code version string; api-request-blob.message.role can be "system".
- message.content can be a string or an array; user tool_result content can be a string or an array of text/image/tool_reference.
- Thinking blocks often have empty text with a valid signature (display mode updates); do not treat as corruption.
- Subagent transcripts before 2.1.307 recorded placeholder usage and null stop_reason for streamed responses.
- Progress records are not written by current builds but may exist in older files; their uuids can be parents of real messages, so re-parent through them rather than dropping the child.
- compact_boundary has parentUuid null: walking from the leaf stops there; use logicalParentUuid to stitch pre-compaction history.
- A torn last line is possible after a crash (2.1.300 fix); tolerate an unparsable final line.
- The session directory <session-id>/ may exist without the .jsonl being the only data: tool-results and subagents hold content referenced from the transcript.
- cwd, gitBranch, slug, prompts, file paths and tool inputs are private user data embedded in nearly every line.
- Claude Code strips envelope fields (cwd, gitBranch, version, userType, entrypoint, promptId, +requestId on assistant) for some storage paths and re-fill them from context on read (A3s/H8n); remote/storage-backed transcripts may lack them.
Cursor Agent 2026.10.12-d47ca18
No published schema or source; read from the installed build. One SQLite database per chat (store.db, WAL mode). Table meta holds one row whose value is hex-encoded JSON; table blobs maps a SHA-256 id to bytes that are protobuf messages, JSON prompt messages or raw file contents. A simplified JSON Lines copy is written per project.
Files
~/.cursor/ (moves with CURSOR_CONFIG_DIR, else $XDG_CONFIG_HOME/cursor) | CLI config root; chats/ and acp-sessions/ live under it. |
|---|---|
~/.cursor/chats/<md5hex(path.resolve(cwd))>/ | Per-workspace folder; name is the lowercase hex MD5 of the resolved absolute working directory (no trailing-slash normalisation beyond path.resolve). |
~/.cursor/chats/<md5>/<chatId>/ | One folder per chat; <chatId> is a v4 UUID equal to meta.agentId. Deleted automatically on dispose if the chat has no root and no blobs. |
~/.cursor/chats/<md5>/<chatId>/store.db (+ store.db-wal, store.db-shm) | SQLite (WAL mode, user_version=1) with tables meta(key TEXT PK, value TEXT) and blobs(id TEXT PK, data BLOB). Holds the whole conversation as a content-addressed blob graph rooted at meta.latestRootBlobId. This is the source of truth. |
~/.cursor/chats/<md5>/<chatId>/meta.json | Listing sidecar for the resume picker: {schemaVersion:1, createdAtMs, updatedAtMs?, hasConversation, title?, isSubagent?, cwd?}. Derived from store.db metadata; backfilled from store.db if missing. |
~/.cursor/chats/<md5>/<chatId>/prompt_history.json | Up-arrow input history for this chat: a JSON array of strings, newest first, de-duplicated, max 500. |
~/.cursor/projects/<slug(cwd)>/ (moves with CURSOR_DATA_DIR) | Project data dir shared with the Cursor editor; slug = cwd with every non-alphanumeric run replaced by '-', leading/trailing '-' trimmed. Also holds editor/CLI data unrelated to transcripts (mcps/, terminals/, canvases/, rules/, repo.json, worker.log, ...). |
~/.cursor/projects/<slug>/agent-transcripts/<chatId>/<chatId>.jsonl | Lossy, human-oriented JSONL mirror regenerated from store.db's prompt-message JSON blobs: user/assistant lines plus turn_ended lines. No tool results, no system prompt, no ids. <chatId> is encodeURIComponent'd with '%' -> '_' and truncated to 200 chars. |
~/.cursor/projects/<slug>/agent-transcripts/<parentChatId>/subagents/<subagentId>.jsonl | Same JSONL mirror for each subagent found in the parent root's subagent_states / subagent_state_refs. |
~/.cursor/projects/<slug>/agent-transcripts/<chatId>.jsonl | .txt (legacy flat layout) | Legacy path still probed by readers (paths.pr includeLegacy); a .txt rendering exists in the writer but the CLI configures writeText:false. |
~/.cursor/projects/<slug>/terminals/<n>.txt | Shell output files referenced from shell tool results (terminalsFolder / outputLocation.filePath). Not part of the blob graph. |
~/.cursor/acp-sessions/<sessionId>/meta.json (+ store.db) | Sessions created through agent acp: same store.db format at acp-sessions/<id>/store.db plus meta.json {schemaVersion:1, cwd, title?}. |
Fields on every record
Record type is chosen by Blobs carry no type tag: a blob's type follows from the field that references it, starting at latestRootBlobId in meta. Inside protobuf messages, oneof cases pick the variant; inside JSON prompt messages, role then content[].type. In the JSON Lines copy, type when present, otherwise role..
| Field | Type | Meaning |
|---|---|---|
blobs.id | string (64 hex) | SHA-256 of blobs.data, lowercase hex. Root blobs are hashed by the CLI; other blob ids are chosen by the server |
blobs.data | bytes | Payload. Type is NOT stored; it is implied by which field references the blob. Heuristic: first byte '{' => JSON prompt message (or raw file that happens to be JSON); otherwise protobuf or raw bytes. |
meta['0'] | string (hex of UTF-8 JSON) | Chat metadata object; see record 'meta / 0'. |
Records (24)
meta / '0'
Chat metadata: id, title, mode, timestamps and the pointer to the current conversation root.
Written created on store open (defaults), rewritten (INSERT OR REPLACE, debounced via microtask) whenever any key changes, e.g. after every checkpoint.
| Field | Type | Meaning |
|---|---|---|
agentId | string (uuid) | Chat id; equals the chat folder name. |
latestRootBlobId | string (64 hex) | '' | Blob id of the current ConversationStateStructure root. Empty string when the chat never got a checkpoint. |
name | string | Chat title; default 'New Agent'; forks get '<name> (forked)'. |
createdAt | number (ms epoch) | Creation time (readers normalise seconds/micro/nanoseconds too). |
mode | enum(default|plan|debug|search) | UI mode; legacy 'auto-run' is read as default + isRunEverything=true. Values include default, search. |
isRunEverything | boolean | Auto-run/yolo flag. |
approvalModeoptional | enum(allowlist|unrestricted|auto-review) | Approval policy. Values include unrestricted. |
lastUsedModeloptional | string | Model id last used. |
lastDebugServerPortoptional | integer | Debug-mode server port. |
currentPlanUrioptional | string | Plan file URI in plan mode. |
subagentInfooptional | object {parentAgentId, rootParentAgentId, toolCallId, typeName} | Set when this store belongs to a subagent run with its own store. |
blobEncryptionKeyoptional | string (64 hex) | Random 32-byte key generated in defaults by this build; its purpose is not known. |
{"agentId":"00000000-0000-4000-8000-000000000001","latestRootBlobId":"aa…(64 hex)","name":"Example chat","mode":"default","isRunEverything":false,"createdAt":1760000000000,"lastUsedModel":"example-model"} (stored as hex of this JSON)Value is hex-encoded: bytes.fromhex(value).decode('utf-8') then JSON.parse.
Keys outside the zod schema are dropped on load.
blob: agent.v1.ConversationStateStructure (root checkpoint)
The conversation checkpoint: ordered lists of blob ids for the model prompt and for UI turns, plus todos, token budget, file snapshots, subagents and compaction state.
Written every checkpoint the server streams (AgentServerMessage.conversation_checkpoint_update) is serialized, SHA-256 hashed and stored as a new blob; meta.latestRootBlobId is then pointed at it. Older roots are never deleted.
| Field | Type | Meaning |
|---|---|---|
1 root_prompt_messages_jsonoptional | repeated bytes (blob ids) | Ordered ids of JSON prompt-message blobs = the exact model context (system, user, assistant, tool). Primary source for a faithful transcript. |
8 turnsoptional | repeated bytes (blob ids) | Ordered ids of ConversationTurnStructure blobs (UI/turn view). |
3 todosoptional | repeated bytes (blob ids) | TodoItem blobs. |
4 pending_tool_callsoptional | repeated string | Tool call ids still awaiting a result. |
5 token_detailsoptional | ConversationTokenDetails {1 used_tokens u32, 2 max_tokens u32, 3 breakdown PromptTokenBreakdownSnapshot{total_used_tokens,max_tokens,categories[{id,label,character_count,estimated_tokens}]}, 4 prompt_context_usage_tree} | Context-window occupancy snapshot (not billing usage). |
6 summaryoptional | bytes (blob id) | ConversationSummary blob {1 summary string}. |
7 planoptional | bytes (blob id) | Plan blob; payload type not traced (opaque). |
9 previous_workspace_urisoptional | repeated string | Workspace URIs used earlier. |
10 modeoptional | enum AgentMode | AGENT_MODE_{UNSPECIFIED=0,AGENT=1,ASK=2,PLAN=3,DEBUG=4,TRIAGE=5,MULTITASK=7,CUSTOM=8}. |
11 summary_archiveoptional | bytes (blob id) | Legacy single archive pointer. |
12 file_statesoptional | map<string path, bytes blob id> | Legacy file snapshot map. |
13 summary_archivesoptional | repeated bytes (blob ids) | ConversationSummaryArchive blobs, one per compaction. |
14 turn_timingsoptional | repeated StepTiming {1 duration_ms u64, 2 timestamp_ms u64} | Per-turn timings. |
15 file_states_v2optional | map<string path, FileStateStructure {1 content bytes?, 2 initial_content bytes?}> | Per-file snapshots; both fields are 32-byte blob ids of raw file bytes. Used by rewind to restore files. |
16 subagent_statesoptional | map<string subagentId, SubagentPersistedState> | Inline subagent conversations (each has its own nested ConversationStateStructure). |
17 self_summary_countoptional | uint32 | Number of self-summarisations. |
18 read_pathsoptional | repeated string | Paths the agent has read (contains user paths). |
19 active_branch_nameoptional | string | — |
20 plansoptional | map<string, PlanRegistryEntry {1 id, 2 path}> | — |
21 tracked_git_repo_branchesoptional | repeated TrackedGitRepo {1 repo_path, 2 branch_name} | — |
22 agent_typeoptional | string | Values include on every current-format root. |
23 communicate_update_history / 25 communicate_update_final_summary / 28 communicate_update_completed_subtitle / 29 communicate_update_states_by_parent_tool_call_idoptional | various | Progress-update tool state (cloud/background agents). |
24 subagent_threadsoptional | map<string,string> | — |
26 conversation_started_timestamp_msoptional | uint64 | — |
27 conversation_started_time_zoneoptional | string | IANA zone. |
30 subagent_runs_by_parent_tool_call_idoptional | map<string, SubagentRunState {parent_tool_call_id, subagent_id?, environment, status SubagentRunStatus, title?, detail?, transcript_path?, output_path?, completed_timestamp_ms?, completion_reason?}> | SubagentRunStatus: UNSPECIFIED, RUNNING, BACKGROUNDED, SUCCESS, ERROR, ABORTED. |
31 subagent_state_refsoptional | map<string subagentId, bytes blob id> | Out-of-line SubagentPersistedState blobs (newer alternative to field 16). |
32 goal_stateoptional | GoalState | — |
33 is_root_project_conversationoptional | bool | — |
34 completed_ask_question_tool_call_idsoptional | repeated string | — |
35 durable_skill_blocks / 36 durable_custom_mode_idoptional | repeated string / string | — |
37 message_count_at_last_compactionoptional | uint32 | — |
38 recent_user_message_ids / 39 recent_user_message_ids_older_turn_countoptional | repeated string / uint32 | — |
40 turn_telemetryoptional | TurnTelemetryState {completed_turn_count_capped, last_completed_turn_timestamp_ms?} | — |
42 mentioned_agent_idsoptional | repeated string | — |
2 (unknown)optional | length-delimited | Field number 2 is absent from this build's descriptor but present in older roots: a removed field. Skip unknown fields. |
(protobuf) {root_prompt_messages_json:[<32B>,<32B>], turns:[<32B>], token_details:{used_tokens:12000,max_tokens:200000}, mode:AGENT_MODE_AGENT, agent_type:"example"}Field order in the descriptor is not numeric; decode by field number.
blob: agent.v1.ConversationTurnStructure / agent_conversation_turn
One user turn: pointer to the user message and ordered pointers to the assistant steps it produced.
Written written by the server when a turn starts and re-written (new blob id) as steps are appended.
| Field | Type | Meaning |
|---|---|---|
1 agent_conversation_turn.1 user_message | bytes (blob id) | UserMessage blob. |
…2 stepsoptional | repeated bytes (blob ids) | ConversationStep blobs in order. |
…3 request_idoptional | string (uuid) | Server request id; matches JSON user message providerOptions.cursor.requestId. |
…4 encrypted_modeloptional | string | Opaque encrypted model identifier (258/263 turns). |
…5 dynamic_tool_count / 9 dynamic_tool_namesoptional | uint32 / repeated string | — |
…6 send_message_step_indices / 13 assistant_text_step_indices / 14 assistant_text_steps_recordedoptional | repeated uint32 / bool | Indices into steps. |
…7 routed_model_display_nameoptional | string | Display name when auto-routed. |
…8 subagent_dispatch_stepsoptional | repeated SubagentDispatchStep {step_index, tool_call_id, tool, backgrounded} | — |
…10 user_message_idoptional | string | — |
…11 long_reasoning_reminder / 12 long_reasoning_reminder_exposure_loggedoptional | message / bool | — |
(protobuf) {agent_conversation_turn:{user_message:<32B>, steps:[<32B>,<32B>], request_id:"00000000-0000-4000-8000-000000000002"}}blob: agent.v1.ConversationTurnStructure / shell_conversation_turn
A user-run shell command turn (shell mode), stored as two blobs: command and output.
Written when the user runs a shell command directly instead of prompting the agent.
Stored only user shell-mode commands
| Field | Type | Meaning |
|---|---|---|
2 shell_conversation_turn.1 shell_command | bytes (blob id) | ShellCommand {1 command string}. |
…2 shell_output | bytes (blob id) | ShellOutput {1 stdout, 2 stderr, 3 exit_code int32}. |
(protobuf) {shell_conversation_turn:{shell_command:<32B>, shell_output:<32B>}}blob: agent.v1.UserMessage
The user's prompt as typed, with mode, attached context and the id of the root checkpoint that preceded it.
Written once per turn.
| Field | Type | Meaning |
|---|---|---|
1 text | string | Raw prompt text (without the <user_query> wrapper used in the JSON prompt message). |
2 message_id | string (uuid) | — |
3 selected_contextoptional | SelectedContext | Attached context: selected_images[] (SelectedImage {oneof data_or_blob_id: 1 blob_id | 8 data | 9 blob_id_with_data | 10 prompt_upload_ref; uuid, path, dimension, mime_type}), files, code_selections, terminals, folders, external_links, cursor_rules, git diffs/commits, past_chats, pull requests, subagents, browsers, documents, skills, … (28 fields). |
4 mode | enum AgentMode | Values include AGENT, ASK. |
5 is_simulated_msg / 9 simulated_msg_reason / 15 simulated_message_metadataoptional | bool / enum SimulatedMsgReason (35 values) / message | System-injected 'user' messages (e.g. BACKGROUND_TASK_COMPLETION, PLAN_EXECUTION, USER_QUEUED_TO_SUBAGENT, GOAL_CONTINUATION). |
10 conversation_state_blob_id | bytes (blob id) | Root checkpoint as it was before this turn; used as the rewind anchor. |
17 thread_idoptional | string | — |
18 text_blob_id / 19 rich_text_blob_idoptional | bytes (blob id) | Out-of-line large text. |
8 rich_textoptional | string | — |
21 hook_additional_contextsoptional | repeated HookAdditionalContext {hook_event_name, content} | Context added by hooks. |
24 turn_steeroptional | bool | Message sent while the agent was running (steering). |
25 started_at_ms / 26 completed_at_msoptional | uint64 | — |
27 sent_by_agent_id / 29 sender / 28 sent_by_voice_call / 30 forked_context / 31 reply_tooptional | various | Agent-to-agent and multi-agent provenance. |
6,7,11,13,14,16,22,23optional | various | best_of_n_group_id, try_use_best_of_n_promotion, subagent_system_reminder, triggering_user_info, execute_plan_info, prompt_reference_id, custom_mode_intent, project_details. |
(protobuf) {text:"Example prompt", message_id:"00000000-0000-4000-8000-000000000003", mode:AGENT_MODE_AGENT, conversation_state_blob_id:<32B>, thread_id:"…"}blob: agent.v1.ConversationStep / assistant_message
A visible assistant text segment.
Written per assistant text output within a turn.
| Field | Type | Meaning |
|---|---|---|
1 assistant_message.1 text | string | — |
…2 started_at_ms / 3 completed_at_msoptional | uint64 | — |
(protobuf) {assistant_message:{text:"Done."}}blob: agent.v1.ConversationStep / thinking_message
A reasoning step as shown in the UI.
Written per reasoning block.
| Field | Type | Meaning |
|---|---|---|
3 thinking_message.1 text | string | Often empty or summary text when the provider redacts reasoning. |
…2 duration_ms | uint32 | — |
…3 started_at_ms / 4 completed_at_msoptional | uint64 | — |
(protobuf) {thinking_message:{text:"", duration_ms:1200}}blob: agent.v1.ConversationStep / tool_call
A tool invocation with its structured arguments AND result in one message (ToolCall oneof tool, 68 cases).
Written re-written (new blob) as the call progresses from started to completed; the turn's steps list is updated to the newest id.
| Field | Type | Meaning |
|---|---|---|
2 tool_call.<case> | oneof tool | One of: shell_tool_call, delete_tool_call, glob_tool_call, grep_tool_call, read_tool_call, update_todos_tool_call, read_todos_tool_call, edit_tool_call, ls_tool_call, read_lints_tool_call, mcp_tool_call, sem_search_tool_call, create_plan_tool_call, web_search_tool_call, task_tool_call, list_mcp_resources_tool_call, read_mcp_resource_tool_call, apply_agent_diff_tool_call, ask_question_tool_call, fetch_tool_call, switch_mode_tool_call, generate_image_tool_call, record_screen_tool_call, computer_use_tool_call, write_shell_stdin_tool_call, reflect_tool_call, setup_vm_environment_tool_call, truncated_tool_call, start_grind_execution_tool_call, start_grind_planning_tool_call, web_fetch_tool_call, report_bugfix_results_tool_call, ai_attribution_tool_call, pr_management_tool_call, mcp_auth_tool_call, await_tool_call, blame_by_file_path_tool_call, get_mcp_tools_tool_call, report_bug_tool_call, set_active_branch_tool_call, communicate_update_tool_call, send_final_summary_tool_call, replace_env_tool_call, edit_pr_labels_tool_call, record_ci_investigation_findings_tool_call, send_message_tool_call, fetch_cloud_agent_data_tool_call, send_to_user_tool_call, pi_read_tool_call, pi_bash_tool_call, pi_edit_tool_call, pi_write_tool_call, pi_grep_tool_call, pi_find_tool_call, pi_ls_tool_call, connect_scm_tool_call, search_conversations_tool_call, create_goal_tool_call, update_goal_tool_call, get_agent_status_tool_call, send_to_agent_tool_call, read_agent_transcript_tool_call, create_agent_tool_call, stop_agent_tool_call, write_canvas_tool_call, read_canvas_tool_call, generate_video_tool_call, x_search_tool_call. Each case is a <Name>ToolCall {1 args <Name>Args, 2 result <Name>Result} (some add description etc.). |
…<case>.resultoptional | oneof result | Typical cases: success | error | rejected | failure | timeout | spawn_error | permission_denied (shell). Absent while pending. |
…57 tool_call_idoptional | string | e.g. 'tool_<uuid>'; equals JSON tool-call toolCallId. |
…59 started_at_ms / 60 completed_at_msoptional | uint64 | — |
…54 hook_additional_contextsoptional | repeated HookAdditionalContext | — |
(protobuf) {tool_call:{read_tool_call:{args:{path:"src/example.ts"}, result:{success:{path:"src/example.ts", total_lines:10, content:"…"}}}, tool_call_id:"tool_00000000-0000-4000-8000-000000000004"}}Edit results carry before_full_file_content and after_full_file_content (whole files).
ReadToolSuccess may hold content inline or as content_blob_id (raw bytes blob).
TaskSuccess.conversation_steps embeds the subagent's ConversationSteps inline.
blob: agent.v1.TodoItem
One todo-list entry.
Written when the todo tool updates the list.
Stored only todo tool used
| Field | Type | Meaning |
|---|---|---|
1 id | string | — |
2 content | string | — |
3 status | enum TodoStatus(UNSPECIFIED,PENDING,IN_PROGRESS,COMPLETED,CANCELLED) | — |
4 created_at / 5 updated_at | int64 ms | — |
6 dependenciesoptional | repeated string | — |
(protobuf) {id:"1", content:"Write tests", status:TODO_STATUS_PENDING, created_at:1760000000000, updated_at:1760000000000}blob: agent.v1.ConversationSummary
Running conversation summary text.
Written after summarisation.
Stored only summarisation
| Field | Type | Meaning |
|---|---|---|
1 summary | string | — |
(protobuf) {summary:"Summary of earlier work"}blob: agent.v1.ConversationSummaryArchive
Archive of the prompt messages replaced by a compaction, plus the summary that replaced them.
Written on /summarize or automatic summarisation; appended to root.summary_archives.
Stored only compaction
| Field | Type | Meaning |
|---|---|---|
1 summarized_messages | repeated bytes (blob ids) | The JSON prompt-message blobs that were compacted away. |
2 summary | string | — |
3 window_tail | uint32 | Number of trailing messages kept. |
4 summary_message | bytes (blob id) | JSON prompt message carrying the summary (providerOptions.cursor.isSummary=true). |
(protobuf) {summarized_messages:[<32B>,<32B>], summary:"…", window_tail:4, summary_message:<32B>}blob: agent.v1.SubagentPersistedState
A subagent's own conversation state, keyed by subagent id from the parent root.
Written when a Task/subagent runs; inline in root field 16 or out-of-line via field 31.
Stored only subagents
| Field | Type | Meaning |
|---|---|---|
1 conversation_state | ConversationStateStructure | Same structure as the parent; its blob ids live in the parent's store.db. |
2 created_timestamp_ms / 3 last_used_timestamp_ms | uint64 | — |
4 subagent_type | SubagentType (oneof type: unspecified | custom{name} | …) | — |
5 model_idoptional | string | — |
6 environment | SubagentExecutionEnvironment | — |
7 cloud_subagentoptional | CloudSubagentReference {bc_id, transcript_path?} | — |
8 first_class_bc_id / 9 cloud_requested_environment_build_id / 10 machineoptional | string / string / TargetMachine | — |
(protobuf) {conversation_state:{…}, created_timestamp_ms:1760000000000, last_used_timestamp_ms:1760000005000, subagent_type:{unspecified:{}}, model_id:"example-model"}blob: raw file content
Raw bytes of a file snapshot (FileStateStructure.content / initial_content) or of read-tool output (ReadToolSuccess.content_blob_id), or image data (SelectedImage.blob_id).
Written when the agent edits/reads files; used by rewind to restore files.
Stored only file edits/reads
| Field | Type | Meaning |
|---|---|---|
(whole blob) | bytes | No envelope. May itself be valid JSON (e.g. a package.json) - do not classify by first byte alone. |
(raw bytes) export const example = 1;\nblob: superseded root checkpoints and steps (unreachable)
Older ConversationStateStructure roots and superseded turn/step/user-message blobs that the latest root no longer references.
Written every checkpoint leaves the previous root in place; steps re-written with new content leave the old blob.
| Field | Type | Meaning |
|---|---|---|
(whole blob) | bytes | Same formats as above. |
(protobuf) older ConversationStateStructurePrevious roots are still meaningful: UserMessage.conversation_state_blob_id points at them for rewind.
blob: prompt message JSON / role=system
The system prompt sent to the model.
Written first entry of root_prompt_messages_json.
| Field | Type | Meaning |
|---|---|---|
role | "system" | — |
content | string | — |
{"role":"system","content":"You are an AI coding assistant."}blob: prompt message JSON / role=user
A user-role model message: either injected context (<user_info>, <system_reminder>, <system_notification>, <timestamp> …) or the user's query wrapped in <user_query> tags.
Written per user turn, plus context injections.
| Field | Type | Meaning |
|---|---|---|
role | "user" | — |
content | string | array of content parts | String for the initial <user_info> context; array of text parts for queries. |
providerOptions.cursor.requestIdoptional | string (uuid) | On query messages; equals AgentConversationTurnStructure.request_id. |
providerOptions.cursor.requestContextCompletenessoptional | object<string,bool> {agentSkills, customSubagents, env, gitRepos, gitStatus, mcp, mcpFileSystem, repositoryInfo, rules} | On the context message. |
providerOptions.cursor.isSummaryoptional | boolean | true on compaction summary messages; JSONL writer skips them. |
{"role":"user","content":[{"type":"text","text":"<user_query>\nExample prompt\n</user_query>"}],"providerOptions":{"cursor":{"requestId":"00000000-0000-4000-8000-000000000002"}}}blob: prompt message JSON / role=assistant
One model response message: reasoning, text and tool calls.
Written per model response (one per LLM call within a turn).
| Field | Type | Meaning |
|---|---|---|
role | "assistant" | — |
id | string | Short per-request counter-like id (Values include 1-char strings); not globally unique. |
content | array of parts (redacted-reasoning | reasoning | text | tool-call) | — |
providerOptions.cursor.pendingToolCallStartedAtMsoptional | number | Values include on 3 messages. |
{"role":"assistant","id":"1","content":[{"type":"redacted-reasoning","data":"ZXhhbXBsZQ==","providerOptions":{"cursor":{"modelName":"example-model"}}},{"type":"text","text":"Reading the file."},{"type":"tool-call","toolCallId":"tool_00000000-0000-4000-8000-000000000004","toolName":"Read","args":{"path":"src/example.ts"}}]}blob: prompt message JSON / role=tool
The result of exactly one tool call as sent back to the model, plus the structured result as JSON.
Written after each tool call completes.
| Field | Type | Meaning |
|---|---|---|
role | "tool" | — |
id | string | Equals the toolCallId (5,861/5,863). |
content | array with one tool-result part | — |
providerOptions.cursor.highLevelToolCallResultoptional | object {output: <camelCase JSON of the protobuf <Name>Result oneof, e.g. {success:{...}} | {failure:{...}} | {rejected:{...}} | {error:{...}}, plus isBackground, terminalsFolder, sandboxPolicy}, isError: bool, rawErrorMessages?: string[]} | Structured result (same data as ToolCall.result in the step blob). |
{"role":"tool","id":"tool_00000000-0000-4000-8000-000000000004","content":[{"type":"tool-result","toolCallId":"tool_00000000-0000-4000-8000-000000000004","toolName":"Read","result":"1|export const example = 1;","experimental_content":[{"type":"text","text":"1|export const example = 1;"}]}],"providerOptions":{"cursor":{"highLevelToolCallResult":{"output":{"success":{"path":"src/example.ts","totalLines":1}},"isError":false}}}}jsonl / role=user
A user prompt in the readable mirror.
Written appended when the corresponding prompt-message JSON blob appears in the root.
| Field | Type | Meaning |
|---|---|---|
role | "user" | — |
message.content[] | array of {type:'text', text} | Single text part; context tags (user_info, rules, system_reminder, git_status, attached_files, …24 tags) are stripped; <user_query> wrapper is kept. |
{"role":"user","message":{"content":[{"type":"text","text":"<user_query>\nExample prompt\n</user_query>"}]}}If the first two non-system messages are both user, the first (the <user_info> context) is dropped.
jsonl / role=assistant
One assistant prompt message flattened: text (+thinking) then tool_use parts.
Written appended per assistant prompt message.
| Field | Type | Meaning |
|---|---|---|
role | "assistant" | — |
message.content[] | array of text | tool_use | First part: text = visible text and thinking joined by blank line; redacted reasoning becomes the literal '[REDACTED]'; <think>/<thinking> tags removed. Then one {type:'tool_use', name, input} per tool call. |
{"role":"assistant","message":{"content":[{"type":"text","text":"[REDACTED]\n\nReading the file."},{"type":"tool_use","name":"Read","input":{"path":"src/example.ts"}}]}}jsonl / type=turn_ended
Marks the end of an agent turn with its outcome.
Written after each agent run completes, errors or is aborted.
Stored only survives only until the next full rewrite of the file; usually only the last turn's line remains
| Field | Type | Meaning |
|---|---|---|
type | "turn_ended" | — |
status | enum(success|error|aborted) | — |
erroroptional | string | Present for error and (optionally) aborted. |
{"type":"turn_ended","status":"success"}jsonl / type=metadata
Optional first line with a generated overview of the transcript.
Written only when the writer is given an overviewFactory (full write).
Stored only not configured by the CLI writer; other hosts may emit it
| Field | Type | Meaning |
|---|---|---|
type | "metadata" | — |
metadata.overview | string | — |
{"type":"metadata","metadata":{"overview":"Example overview"}}meta.json
Resume-picker sidecar for a chat.
Written on chat creation and whenever name or latestRootBlobId changes; backfilled from store.db if absent.
Stored only written by newer builds
| Field | Type | Meaning |
|---|---|---|
schemaVersion | 1 | — |
createdAtMs | number | — |
updatedAtMsoptional | number | — |
hasConversation | boolean | latestRootBlobId non-empty. |
titleoptional | string | Chat name (omitted for default). |
isSubagentoptional | true | Present when meta.subagentInfo is set. |
cwdoptional | string | Absolute workspace path. |
{"schemaVersion":1,"createdAtMs":1760000000000,"hasConversation":true,"title":"Example chat","updatedAtMs":1760000300000,"cwd":"/path/to/project"}prompt_history.json
Per-chat input history (up-arrow).
Written when the user submits a prompt.
Stored only chat had typed prompts in an interactive build ≥ June 2026
| Field | Type | Meaning |
|---|---|---|
[] | array of string | Newest first, de-duplicated after normalisation, max 500. |
["Second prompt","First prompt"]A global ~/.cursor/prompt_history.json from earlier builds may also exist.
Content blocks (9)
json part / text
Plain text in a user or assistant prompt message.
| Field | Type | Meaning |
|---|---|---|
type | "text" | — |
text | string | — |
{"type":"text","text":"Hello"}json part / redacted-reasoning
Provider-encrypted reasoning; content is not readable.
Written assistant messages from reasoning models.
| Field | Type | Meaning |
|---|---|---|
type | "redacted-reasoning" | — |
data | string (opaque, base64-like) | Opaque. |
providerOptions.cursor.modelNameoptional | string | Model that produced it. |
{"type":"redacted-reasoning","data":"ZXhhbXBsZQ==","providerOptions":{"cursor":{"modelName":"example-model"}}}json part / reasoning
Readable reasoning text.
Written models that expose reasoning.
Stored conditional
| Field | Type | Meaning |
|---|---|---|
type | "reasoning" | — |
text | string | — |
{"type":"reasoning","text":"Thinking about it"}json part / tool-call
A tool invocation by the model.
| Field | Type | Meaning |
|---|---|---|
type | "tool-call" | — |
toolCallId | string | 'tool_<uuid>'. |
toolName | string | Model-facing name: Read, StrReplace, Grep, Shell, Glob, Write, ReadLints, TodoWrite, SemanticSearch, Delete, WebFetch, AskQuestion, WebSearch, Task, ListMcpResources, Await, MCP tool names, … (may be null per aux). |
args | object | JSON arguments. |
{"type":"tool-call","toolCallId":"tool_00000000-0000-4000-8000-000000000004","toolName":"Grep","args":{"pattern":"example"}}json part / tool-result
Model-visible tool output.
| Field | Type | Meaning |
|---|---|---|
type | "tool-result" | — |
toolCallId | string | — |
toolName | string | — |
result | string | object | number | Usually string; objects for MCP results; a number once. |
experimental_contentoptional | array of {type:'text', text} | Multi-part version of result (5,866/5,869). |
{"type":"tool-result","toolCallId":"tool_00000000-0000-4000-8000-000000000004","toolName":"Grep","result":"No matches","experimental_content":[{"type":"text","text":"No matches"}]}json part / image
Image attached to a user message.
Stored conditional
| Field | Type | Meaning |
|---|---|---|
type | "image" | — |
imageoptional | string | {__type:'Uint8Array', hex} | Byte arrays are stored as {__type:'Uint8Array',hex} to bytes; field names follow the AI SDK CoreMessage shape. |
mimeTypeoptional | string | unknown |
{"type":"image","image":{"__type":"Uint8Array","hex":"89504e47"},"mimeType":"image/png"}Field names other than type are not established.
json part / file
File attached to a message.
Stored conditional
| Field | Type | Meaning |
|---|---|---|
type | "file" | — |
filenameoptional | string | Used by the writer. |
data / mimeTypeoptional | unknown | — |
{"type":"file","filename":"example.pdf","mimeType":"application/pdf","data":{"__type":"Uint8Array","hex":"25504446"}}jsonl part / text
Text in a JSONL mirror line.
| Field | Type | Meaning |
|---|---|---|
type | "text" | — |
text | string | — |
{"type":"text","text":"Hello"}jsonl part / tool_use
Tool call in a JSONL mirror assistant line (no id, no result).
| Field | Type | Meaning |
|---|---|---|
type | "tool_use" | — |
name | string | — |
input | object | — |
{"type":"tool_use","name":"Read","input":{"path":"src/example.ts"}}Rebuilding the conversation
- ordering
- Do NOT order blobs by rowid or id. Start at meta.latestRootBlobId, decode ConversationStateStructure, and follow root_prompt_messages_json in array order for the model transcript, or turns[] -> user_message + steps[] in array order for the UI transcript. rowid changes on INSERT OR REPLACE.
- message parent links
- There are no parent pointers between messages; order is positional within the root's lists. A turn links to its UserMessage and steps by 32-byte blob ids (bytes fields), hex-encode them to look up blobs.id.
- tool call ↔ result
- JSON: assistant part tool-call.toolCallId == tool message content[0].toolCallId == tool message id. Protobuf: ToolCall.tool_call_id; args and result are in the same ToolCall message. JSONL: no ids and no results.
- turns
- Each ConversationTurnStructure is one user turn; its request_id matches the JSON user message providerOptions.cursor.requestId. JSONL marks turn end with type=turn_ended (often only the last).
- subagents
- Subagents share the parent's store.db. Walk root.subagent_states (inline) and root.subagent_state_refs (blob ids of SubagentPersistedState); each has its own ConversationStateStructure. Link to the parent call via subagent_runs_by_parent_tool_call_id / AgentConversationTurnStructure.subagent_dispatch_steps. JSONL mirrors go to agent-transcripts/<parent>/subagents/<id>.jsonl. A separate store with meta.subagentInfo {parentAgentId, rootParentAgentId, toolCallId, typeName} is also possible.
- forks
- /fork copies every blob into a new chat folder (new uuid) in the same workspace, sets the same latestRootBlobId, name '<name> (forked)' and a new createdAt. No parent-chat id is recorded, so lineage can only be reconstructed from shared blob ids/roots.
- compaction
- Compaction appends a ConversationSummaryArchive (summarized_messages blob ids + summary_message blob id + window_tail) to root.summary_archives and replaces the head of root_prompt_messages_json with a summary message flagged providerOptions.cursor.isSummary. Full history = concat(archives[].summarized_messages) + current root_prompt_messages_json minus system and isSummary messages (this is what the JSONL writer does).
- resume
- Resume opens the same store.db and reloads the root from latestRootBlobId; new turns append to the same lists and a new root is written.
- branches/rewind
- Each UserMessage.conversation_state_blob_id is the root before that turn. Rewind sets the root back to that blob (conversation) and optionally restores files from file_states_v2 content/initial_content blob ids. Rewound-away blobs stay in the table as unreachable rows.
- sidecar references
- File snapshots, read content and images are separate raw blobs referenced by 32-byte ids. Shell output files are referenced by path under ~/.cursor/projects/<slug>/terminals/. Subagent cloud transcripts by transcript_path strings.
Token usage
root.token_details.used_tokens / max_tokens- Current context-window occupancy vs limit at the checkpoint; not cumulative and not billing.
root.token_details.breakdown.categories[] {id,label,character_count,estimated_tokens}- Estimated per-category context breakdown (rules, tools, history …).
(not persisted) InteractionUpdate.turn_ended TurnEndedUpdate {input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, reasoning_tokens, ended_at_ms}- Per-turn token usage exists only on the live stream / hooks; it is not written to store.db or JSONL. No cost field anywhere.
Versions
No format version inside blobs or JSONL. Signals: SQLite PRAGMA user_version=1 (set on every open by this build); meta.json schemaVersion=1; the CLI build is not recorded per chat. Protobuf is forward/backward compatible by field number: older roots carry a removed field 2 (seen in 113 local roots) and lack newer fields (e.g. agent_type, subagent_state_refs). Meta mode 'auto-run' is a legacy value mapped to default+isRunEverything. Because the server authors all non-root blobs, the JSON message shape can change independently of the CLI version. JSONL tool names CallDynamicTool/CallMcpTool appear only in older mirrors.
Parsing pitfalls
- Blob type is not stored. Decode by graph position from the root; a first-byte heuristic ('{' => JSON) misclassifies raw file snapshots that are JSON (package.json, tsconfig) and the aux 0x0a/0x12+0x20 reference scan can produce false references.
- Most rows are dead: every checkpoint writes a new root and never deletes the old one (≈9.4k of 28.8k local blobs are stale roots). Walking 'all blobs' double-counts messages.
- Two parallel transcripts live in one DB: root_prompt_messages_json (model context JSON, includes tool results and the system prompt) and turns (protobuf UI steps with structured args/results and timings). They are not 1:1 (one assistant JSON message per LLM call vs one step per text/thinking/tool segment).
- Blob ids in protobuf are raw 32-byte values; blobs.id is their lowercase hex. latestRootBlobId in meta is already hex.
- meta.value is hex-encoded JSON, not JSON.
- Open with WAL: copy store.db + -wal + -shm together, or open read-only with immutable=1 when -shm is missing; opening mode=ro without -shm fails ('unable to open database file').
- The JSONL mirror is not append-only: the writer rewrites the whole file after compaction, after a turn_ended write, or when the prefix changes (rewind), so older turn_ended lines disappear and lines can change.
- JSONL drops: system prompt, tool results, ids, timestamps, isSummary messages, the leading <user_info> message, and context tags inside user text; redacted reasoning is merged into the text part as '[REDACTED]'.
- Edit tool results embed full before/after file contents; read_paths and file_states_v2 keys are absolute user paths - treat the DB as sensitive.
- JSONL files can outlive their chat folder: deleting from the picker removes only ~/.cursor/chats/.../<chatId>.
- Forks copy every blob and record no parent id.
- Chats without a checkpoint have latestRootBlobId '' and may have no meta.json.
OpenCode 2.1.4
No published schema; defined by the open-source code. One SQLite database (opencode.db, WAL mode). Each transcript entry is a row in session_message whose data column holds JSON. Images and files are stored inline as base64 or data: URIs.
Files
~/.local/share/opencode/ (XDG_DATA_HOME/opencode, also on macOS) | Global data root. |
|---|---|
~/.local/share/opencode/opencode.db (+ -wal, -shm) | SQLite (WAL) shared by all projects: session_v2, session_message, session_inbox, instruction_*, event, event_sequence, kv, project, workspace, worktree, permission, credential, account*, migration, plus untouched 1.x tables (session, message, part, todo, session_share, ...) on upgraded installs. OPENCODE_DB overrides (relative to data dir; ':memory:' allowed); non-standard channels use opencode-<channel>.db unless OPENCODE_DISABLE_CHANNEL_DB. |
~/.local/share/opencode/opencode-next.db | Pre-release 2.x database imported on first start if present. |
~/.local/share/opencode/tool-output/tool_<26-char id>[.<ext>] | Full text of tool results truncated to 2000 lines / 50 KiB (and saved binary outputs); referenced by tool state metadata.outputPath and the inline marker. Deleted after 7 days. |
~/.local/share/opencode/shell/<project-id>/<sh_id>.out | Combined stdout/stderr capture for shells (Shell.Info.file); retained 7 days. |
~/.local/share/opencode/snapshot/<project-id>/<hash(worktree)>/ | Private git directory whose tree hashes are the snapshot ids in assistant.snapshot.start/end and revert.snapshot; diffs/reverts are computed from it. |
~/.local/share/opencode/storage/ (1.x remnant) | Older JSON storage (migration marker, session_diff) from pre-SQLite builds; not read for 2.x transcripts. on a 1.x install. |
Fields on every record
Record type is chosen by session_message.type, then data.status for compaction rows, data.content[].type for assistant content and state.status for tool blocks..
| Field | Type | Meaning |
|---|---|---|
id | text | msg_ + 12 hex time + 14 base62 (ascending). Event-derived rows reuse the event id suffix (evt_→msg_); fork copies use msg_<forkEventSuffix>_<seq>. |
session_id | text | FK session_v2.id (cascade delete). |
type | text | Discriminator. |
seq | integer | Durable event seq that inserted the row; unique per session; gaps are normal. |
time_created | integer ms | Mirrors data.time.created (assistant: request start). |
time_updated | integer ms | Last mutation. |
data | json text | — |
Records (20)
session_v2 (row)
One row per session: identity, lineage, location, title, current agent/model, running usage totals and state timestamps.
Written inserted on session.created (or session.forked); columns updated by later events.
| Field | Type | Meaning |
|---|---|---|
id | text ses_<26> | Descending time-sortable id (newest sorts first). |
project_id | text | FK project.id. |
workspace_idoptional | text | — |
parent_idoptional | text | Parent session for subagent/child sessions. |
fork_session_idoptional | text | Source session of a fork (parent_id is null on forks). |
fork_boundaryoptional | json {type:before|through, messageID} | — |
slug | text | — |
directory | text | Absolute working directory. |
pathoptional | text | Subpath relative to project worktree. |
titleoptional | text | Optional since the 2.x split (1.x required). |
version | text | opencode version that created the session. |
share_urloptional | text | Legacy/sharing. |
summary_additions/summary_deletions/summary_filesoptional | integer | Legacy 1.x diff summary. |
summary_diffsoptional | json FileDiff.LegacyInfo[] | Legacy 1.x. |
metadataoptional | json Record<string,Json> | Host annotations; inherited by children/forks. |
cost | real | USD total (steps + title + compaction usage). |
tokens_input/tokens_output/tokens_reasoning/tokens_cache_read/tokens_cache_write | integer | Running totals. |
revertoptional | json Revert {messageID, partID?, snapshot?, files?} | RevertV1 | Staged (uncommitted) revert. |
permissionoptional | json Permission.Ruleset | — |
agentoptional | text | Current agent id. |
modeloptional | json {id, providerID, variant?} | Current model. |
time_created/time_updated | integer ms | — |
time_idleoptional | integer ms | Last terminal execution. |
idle_outcomeoptional | text succeeded|failed|interrupted | — |
time_viewedoptional | integer ms | Read watermark. |
time_compactingoptional | integer | — |
time_archivedoptional | integer | — |
time_suspendedoptional | integer | Execution claim timestamp (historical name). |
resume_attempts | integer | — |
{"id":"ses_8f3a2b1c0d9eAbCdEfGhIjKlMn","project_id":"prj_example","parent_id":null,"slug":"quiet-river","directory":"/home/user/project","title":"Example","version":"2.1.4","cost":0.0123,"tokens_input":1200,"tokens_output":300,"tokens_reasoning":0,"tokens_cache_read":0,"tokens_cache_write":0,"agent":"build","model":{"id":"example-model","providerID":"example"},"time_created":1767261600000,"time_updated":1767261660000}session_message / user
A user prompt with optional inline file attachments, @agent and skill mentions.
Written projected when a queued/steered inbox item of type user is delivered (session.inbox.delivered).
| Field | Type | Meaning |
|---|---|---|
data.metadataoptional | Record<string,unknown> | Free-form metadata (event metadata, e.g. notice/source tags). |
data.time.created | number (epoch ms) | — |
data.text | string | — |
data.filesoptional | FileAttachment[] {data(base64), mime, source:{type:inline}|{type:uri,uri}, name?, description?, mention?{start,end,text}} | Attachment bytes are stored inline as base64. |
data.agentsoptional | {name, mention?}[] | — |
data.skillsoptional | {id, name, text?, mention?}[] | — |
{"id":"msg_0a1b2c3d4e5fAbCdEfGhIjKlMn","session_id":"ses_x","type":"user","seq":4,"time_created":1767261601000,"time_updated":1767261601000,"data":{"text":"Hello","time":{"created":1767261601000}}}session_message / synthetic
Host-injected user-role text (e.g. subagent completion notices, plugin input), not typed by the user.
Written session.synthetic events or delivered synthetic inbox items.
Stored conditional
| Field | Type | Meaning |
|---|---|---|
data.metadataoptional | Record<string,unknown> | Free-form metadata (event metadata, e.g. notice/source tags). |
data.time.created | number (epoch ms) | — |
data.text | string | Model-facing text. |
data.descriptionoptional | string | Short display summary. |
{"type":"synthetic","seq":9,"data":{"text":"<subagent sessionID=\"ses_y\" state=\"completed\" description=\"scan\">done</subagent>","description":"scan","metadata":{"source":"subagent","childID":"ses_y","agent":"explore","state":"completed"},"time":{"created":1767261700000}}}session_message / system
Chronological instruction update shown to the model (e.g. AGENTS.md/instructions changed), frozen at emit time.
Written session.instructions.updated with rendered text (initial baseline has no text and produces no row). Also the V1 migration's tool-rename notice.
Stored conditional
| Field | Type | Meaning |
|---|---|---|
data.metadataoptional | Record<string,unknown> | Free-form metadata (event metadata, e.g. notice/source tags). |
data.time.created | number (epoch ms) | — |
data.text | string | — |
data.descriptionoptional | string | e.g. 'Instructions updated: <keys>' |
data.metadata.noticeoptional | "instructions" | — |
data.metadata.instructionSourcesoptional | string[] | — |
{"type":"system","seq":2,"data":{"text":"<instructions>...</instructions>","description":"Instructions updated: project/agents.md","metadata":{"notice":"instructions","instructionSources":["project/agents.md"]},"time":{"created":1767261600100}}}session_message / skill
A skill was activated and its text injected.
Written session.skill.activated.
Stored conditional
| Field | Type | Meaning |
|---|---|---|
data.metadataoptional | Record<string,unknown> | Free-form metadata (event metadata, e.g. notice/source tags). |
data.time.created | number (epoch ms) | — |
data.skill | string (Skill.ID) | — |
data.name | string | — |
data.text | string | Injected skill body. |
{"type":"skill","seq":5,"data":{"skill":"skill_example","name":"example","text":"# Example skill","time":{"created":1767261602000}}}session_message / shell
A user-run shell command (! in the TUI) with status and final output page.
Written inserted on session.shell.started (status running); updated in place on session.shell.ended.
Stored conditional
| Field | Type | Meaning |
|---|---|---|
data.metadata.backgroundoptional | boolean | — |
data.shellID | string sh_<26> | — |
data.command | string | — |
data.status | enum(running,exited,timeout,killed) | — |
data.exitoptional | number | — |
data.outputoptional | {output, cursor, size, truncated} | Final page; full capture is in the shell output file. |
data.time.created | number ms | — |
data.time.completedoptional | number ms | — |
{"type":"shell","seq":12,"data":{"shellID":"sh_0a1b2c3d4e5fAbCdEfGhIjKlMn","command":"ls","status":"exited","exit":0,"output":{"output":"README.md\n","cursor":10,"size":10,"truncated":false},"time":{"created":1767261800000,"completed":1767261800200}}}session_message / assistant
One model step (one LLM request): ordered text/reasoning/tool content, model, finish reason, per-step usage, workspace snapshots, error and retry state.
Written inserted on session.step.started; mutated in place by text/reasoning/tool/retry/step.streamed/step.ended/step.failed events. A retry of the same step reuses the row (fields reset).
| Field | Type | Meaning |
|---|---|---|
data.agent | string | — |
data.model | {id, providerID, variant?} | — |
data.content | (text|reasoning|tool)[] | See contentBlocks. |
data.snapshotoptional | {start?, end?, files?:string[]} | Git tree hashes in the snapshot repo before/after the step; files changed. |
data.finishoptional | enum(stop,length,tool-calls,content-filter,error,unknown) | Absent while running. |
data.rawFinishoptional | string | Provider-native finish. |
data.nativeoptional | Record<string,unknown> | Step-level provider replay data (was providerState before 2.1). |
data.costoptional | number USD | Set at step end. |
data.tokensoptional | {input, output, reasoning, cache:{read, write}} (all numbers; no total field) | — |
data.erroroptional | {type:string, message:string, status?:100-599, response?:{body}, retryAfterMs?:int} | — |
data.retryoptional | {attempt, at(ms), error} | Pending retry; cleared when the step restarts or the turn idles. |
data.metadataoptional | Record | — |
data.time.created | number ms | Request dispatch time. |
data.time.streamedoptional | number ms | Provider body ended. |
data.time.completedoptional | number ms | Absent = still running or crashed. |
{"type":"assistant","seq":6,"data":{"agent":"build","model":{"id":"example-model","providerID":"example"},"content":[{"type":"text","text":"Hi!"}],"finish":"stop","cost":0.0004,"tokens":{"input":100,"output":5,"reasoning":0,"cache":{"read":0,"write":0}},"time":{"created":1767261602000,"streamed":1767261603000,"completed":1767261603000}}}session_message / compaction (running)
Compaction in progress placeholder.
Written session.compaction.started (row id = inbox inputID or msg_ from event).
Stored only transient; left behind if the process dies
| Field | Type | Meaning |
|---|---|---|
data.metadataoptional | Record<string,unknown> | Free-form metadata (event metadata, e.g. notice/source tags). |
data.time.created | number (epoch ms) | — |
data.status | "running" | — |
data.reason | enum(auto,manual) | — |
data.summary | string | Empty while running. |
{"type":"compaction","seq":30,"data":{"status":"running","reason":"auto","summary":"","time":{"created":1767262000000}}}session_message / compaction (completed)
Context checkpoint: history before this row is replaced by the summary (or provider-native window).
Written session.compaction.ended updates the running row (or appends one).
Stored conditional
| Field | Type | Meaning |
|---|---|---|
data.metadataoptional | Record<string,unknown> | Free-form metadata (event metadata, e.g. notice/source tags). |
data.time.created | number (epoch ms) | — |
data.status | "completed" | — |
data.reason | enum(auto,manual) | — |
data.modeloptional | {id, providerID, variant?} | — |
data.summary | string | — |
data.nativeoptional | Record; native.messages = provider compaction window | Was providerContext before 2.1. |
data.costoptional | number | Compaction request cost. |
data.tokensoptional | {input, output, reasoning, cache:{read, write}} (all numbers; no total field) | — |
data.metadata.keepIDoptional | msg id | First message kept verbatim after the summary (rows between keepID and this row). |
data.metadata.recentoptional | string | Pre-2.1 / V1-migrated kept text (was top-level recent). |
{"type":"compaction","seq":30,"data":{"status":"completed","reason":"auto","summary":"Goal: ...","cost":0.002,"tokens":{"input":9000,"output":400,"reasoning":0,"cache":{"read":0,"write":0}},"metadata":{"keepID":"msg_0a1b2c3d4e5fAbCdEfGhIjKlMp"},"time":{"created":1767262000000}}}session_message / compaction (failed)
Compaction attempt that failed.
Written session.compaction.failed.
Stored conditional
| Field | Type | Meaning |
|---|---|---|
data.metadataoptional | Record<string,unknown> | Free-form metadata (event metadata, e.g. notice/source tags). |
data.time.created | number (epoch ms) | — |
data.status | "failed" | — |
data.reason | enum(auto,manual) | — |
data.error | {type:string, message:string, status?:100-599, response?:{body}, retryAfterMs?:int} | — |
data.costoptional | number | — |
data.tokensoptional | {input, output, reasoning, cache:{read, write}} (all numbers; no total field) | — |
{"type":"compaction","seq":31,"data":{"status":"failed","reason":"manual","error":{"type":"provider","message":"overloaded"},"time":{"created":1767262000000}}}session_message / idle
Turn boundary: the session went idle; every step since the previous idle belongs to one turn.
Written session.execution.succeeded/failed/interrupted (not for interrupted reason=shutdown, which resumes the same turn).
Stored always (per completed turn)
| Field | Type | Meaning |
|---|---|---|
data.metadataoptional | Record<string,unknown> | Free-form metadata (event metadata, e.g. notice/source tags). |
data.time.created | number (epoch ms) | — |
data.outcome | enum(succeeded,failed,interrupted) | — |
data.erroroptional | {type:string, message:string, status?:100-599, response?:{body}, retryAfterMs?:int} | — |
{"type":"idle","seq":7,"data":{"outcome":"succeeded","time":{"created":1767261603100}}}session_message / agent-switched
Agent changed.
Written session.agent.selected.
Stored conditional
| Field | Type | Meaning |
|---|---|---|
data.metadataoptional | Record<string,unknown> | Free-form metadata (event metadata, e.g. notice/source tags). |
data.time.created | number (epoch ms) | — |
data.agent | string | — |
data.previousoptional | string | — |
{"type":"agent-switched","seq":1,"data":{"agent":"plan","previous":"build","time":{"created":1767261600050}}}session_message / model-switched
Model changed.
Written session.model.selected.
Stored conditional
| Field | Type | Meaning |
|---|---|---|
data.metadataoptional | Record<string,unknown> | Free-form metadata (event metadata, e.g. notice/source tags). |
data.time.created | number (epoch ms) | — |
data.model | {id, providerID, variant?} | — |
data.previousoptional | {id, providerID, variant?} | — |
{"type":"model-switched","seq":3,"data":{"model":{"id":"example-model","providerID":"example"},"time":{"created":1767261600060}}}session_message / location-switched
Session moved to another directory/workspace/project.
Written session.moved (also updates session_v2 location columns).
Stored conditional
| Field | Type | Meaning |
|---|---|---|
data.metadataoptional | Record<string,unknown> | Free-form metadata (event metadata, e.g. notice/source tags). |
data.time.created | number (epoch ms) | — |
data.location | {directory, workspaceID?} | — |
data.projectIDoptional | string | — |
data.subpathoptional | string | — |
data.previousoptional | {location, projectID?, subpath?} | — |
{"type":"location-switched","seq":20,"data":{"location":{"directory":"/home/user/other"},"time":{"created":1767261900000}}}session_inbox (row)
Queued or steering input admitted but not yet delivered to the transcript (user, synthetic, compaction request, move).
Written session.inbox.enqueued inserts; delivered/cancelled deletes; delivery.changed flips steer/queue. Revert deletes rows with enqueued_seq >= boundary.
Stored only transient
| Field | Type | Meaning |
|---|---|---|
id | text msg_ | Becomes the session_message id on delivery. |
session_id | text | — |
type | enum(user,synthetic,compaction,move) | — |
payload | json UserPayload|SyntheticPayload|{}|MovePayload | — |
delivery | enum(steer,queue) | — |
enqueued_seq | integer | Event seq at admission. |
time_created | integer ms | — |
{"id":"msg_0a1b2c3d4e5fAbCdEfGhIjKlMq","session_id":"ses_x","type":"user","payload":{"text":"also check tests"},"delivery":"queue","enqueued_seq":15,"time_created":1767261650000}instruction_entry / instruction_state / instruction_blob (rows)
Per-session instruction state: API-managed key/value entries, the current and epoch-initial instruction key→hash maps, and content-addressed instruction bodies.
Written instructions.updated, forks, compaction epochs, revert rewinds.
Stored conditional
| Field | Type | Meaning |
|---|---|---|
instruction_entry.(session_id,key) | pk | — |
instruction_entry.valueoptional | json | <=256 KiB |
instruction_entry.removed | boolean | — |
instruction_state.epoch_start/through_seq | integer | — |
instruction_state.initial_values/current_values | json Record<key,sha256> | — |
instruction_blob.hash | text sha256 hex | — |
instruction_blob.valueoptional | json | Instruction body. |
{"session_id":"ses_x","epoch_start":0,"through_seq":2,"initial_values":{"project/agents.md":"aaaaaaaa..."},"current_values":{"project/agents.md":"aaaaaaaa..."}}event (row)
Durable event log (event-sourcing input for the projections above), stored as type '<event>.<version>' with per-aggregate seq.
Written only when the server runs with events.persist=true (set by the Cloudflare workerd host). The CLI does not set it, so locally the table stays empty and only event_sequence advances.
Stored only events.persist only
| Field | Type | Meaning |
|---|---|---|
id | text evt_<26> | — |
aggregate_id | text (session id) | — |
seq | integer | — |
created | integer ms | — |
type | text e.g. session.tool.success.2 | — |
data | json | Event payload. |
{"id":"evt_0a1b2c3d4e5fAbCdEfGhIjKlMn","aggregate_id":"ses_x","seq":6,"created":1767261602000,"type":"session.step.started.1","data":{"sessionID":"ses_x","assistantMessageID":"msg_y","agent":"build","model":{"id":"m","providerID":"p"},"started":1767261602000}}Durable event types (52 definitions; ephemeral deltas/progress never stored): session.created, agent.selected, model.selected, moved, renamed, metadata.updated, permissions, viewed, archived, unarchived, deleted(v2), forked(v2), inbox.delivered, inbox.enqueued, inbox.cancelled, inbox.delivery.changed, execution.started/succeeded/failed/interrupted, instructions.updated(v2), synthetic, skill.activated, shell.started/ended, step.started/streamed/ended/failed, text.started/ended, reasoning.started/ended, tool.input.started/ended, tool.called, tool.success(v2), tool.failed(v2), retry.scheduled, compaction.started/ended/failed, revert.staged/cleared/committed, usage.recorded (internal), message.content.updated (replay-only), worktree.resolved
Ephemeral (never persisted): session.usage.updated, text.delta, reasoning.delta, tool.input.delta, tool.progress, compaction.delta.
event_sequence (row)
Last committed event seq per aggregate (session); session_message.seq values come from it.
Written every durable event commit.
| Field | Type | Meaning |
|---|---|---|
aggregate_id | text | — |
seq | integer | — |
owner_idoptional | text | — |
{"aggregate_id":"ses_x","seq":42,"owner_id":null}kv (row)
Key/value state; key migration.v1-v2 records the in-place 1.x to 2.x import.
Written migration and misc.
Stored conditional
| Field | Type | Meaning |
|---|---|---|
key | text | — |
value | text | — |
time_created/time_updated | integer | — |
{"key":"migration.v1-v2","value":"{...}","time_created":1767261600000,"time_updated":1767261600000}legacy message (1.x row)until 2.0.0
1.x message row (role user|assistant) left in the old message table after upgrade; the 2.x reader ignores it once imported.
Written written by 1.x only; remains after the V1→V2 import (tables are not dropped).
Stored legacy (1.x databases only)
| Field | Type | Meaning |
|---|---|---|
id | text msg_ | — |
session_id | text | FK legacy session table. |
time_created/time_updated | integer | — |
data.role | enum(user,assistant) | — |
data (user)optional | {time.created, format?, summary?{title?,body?,diffs}, agent, model{providerID,modelID,variant?}, system?, tools?} | — |
data (assistant)optional | {time{created,completed?}, error?{name,data}, parentID, modelID, providerID, mode, agent, path{cwd,root}, summary?, cost, tokens{total?,input,output,reasoning,cache{read,write}}, structured?, variant?, finish?} | — |
{"id":"msg_x","session_id":"ses_x","data":{"role":"assistant","parentID":"msg_u","modelID":"m","providerID":"p","mode":"build","agent":"build","path":{"cwd":"/p","root":"/p"},"cost":0,"tokens":{"input":1,"output":1,"reasoning":0,"cache":{"read":0,"write":0}},"time":{"created":1767261600000}}}Content blocks (23)
assistant.content / text
Assistant visible text segment.
Written session.text.started pushes empty text; text.ended fills it.
| Field | Type | Meaning |
|---|---|---|
type | "text" | — |
text | string | — |
nativeoptional | Record | Provider replay data (was state before 2.1). |
{"type":"text","text":"Done."}assistant.content / reasoning
Model reasoning segment.
Written reasoning.started/ended.
| Field | Type | Meaning |
|---|---|---|
type | "reasoning" | — |
text | string | — |
nativeoptional | Record | Encrypted/signature data. |
timeoptional | {created, completed?} | — |
{"type":"reasoning","text":"Check the config first.","time":{"created":1767261602100,"completed":1767261602500}}assistant.content / tool
A tool call and its result live in one block whose state advances streaming → running → completed | error.
Written tool.input.started creates it; input.ended, called, success/failed update it.
| Field | Type | Meaning |
|---|---|---|
type | "tool" | — |
id | string | Provider call id. |
name | string | e.g. shell, read, edit, write, patch, glob, grep, subagent, skill, todo, question, webfetch, websearch, mcp tools. |
executedoptional | boolean | true when OpenCode ran it (false for provider-executed tools). |
nativeoptional | Record | Call native data merged with result native data. |
state | ToolState | See tool state entries. |
time | {created, ran?, completed?} | — |
{"type":"tool","id":"call_1","name":"shell","executed":true,"state":{"status":"completed","input":{"command":"ls"},"content":[{"type":"text","text":"README.md"}],"metadata":{"truncated":false}},"time":{"created":1767261602600,"ran":1767261602700,"completed":1767261602900}}tool.state / streaming
Arguments are still streaming (1.x called this pending).
Written session.tool.input.started; input.ended sets the raw string.
Stored only only if interrupted mid-stream
| Field | Type | Meaning |
|---|---|---|
status | "streaming" | — |
input | string | Raw argument text. |
{"status":"streaming","input":"{\"command\":\"l"}tool.state / running
Parsed input, executing.
Written session.tool.called.
Stored only in-flight or crashed
| Field | Type | Meaning |
|---|---|---|
status | "running" | — |
input | object | — |
metadata | Record<string,Json> | Progress metadata is ephemeral; stored value is {} unless later terminal. |
{"status":"running","input":{"command":"ls"},"metadata":{}}tool.state / completed
Successful result.
Written session.tool.success (v2).
| Field | Type | Meaning |
|---|---|---|
status | "completed" | — |
input | object | — |
content | non-empty (text|file)[] | Model-facing result. |
metadataoptional | Record<string,Json> | UI metadata; truncated:boolean and outputPath when output was spilled to tool-output/. |
{"status":"completed","input":{"path":"a.txt"},"content":[{"type":"text","text":"hello"}],"metadata":{"truncated":false}}tool.state / error
Failed or interrupted tool.
Written session.tool.failed (v2).
| Field | Type | Meaning |
|---|---|---|
status | "error" | — |
input | object | {} if failure happened while streaming. |
error | {type:string, message:string, status?:100-599, response?:{body}, retryAfterMs?:int} | e.g. type tool.execution, tool.interrupted (V1 import). |
contentoptional | (text|file)[] | Partial output. |
metadataoptional | Record | — |
{"status":"error","input":{"command":"false"},"error":{"type":"tool.execution","message":"exit 1"}}tool.content / text
Text item in a tool result.
Written inside state.content.
| Field | Type | Meaning |
|---|---|---|
type | "text" | — |
text | string | — |
{"type":"text","text":"ok"}tool.content / file
File/media item in a tool result, by URI.
Written inside state.content.
| Field | Type | Meaning |
|---|---|---|
type | "file" | — |
uri | string | data: URI or other URI. |
mime | string | — |
nameoptional | string | — |
{"type":"file","uri":"data:image/png;base64,iVBORw0KGgo=","mime":"image/png"}user.files[]
Prompt attachment stored inline.
Written user message data.files.
| Field | Type | Meaning |
|---|---|---|
data | base64 | — |
mime | string | — |
source | {type:inline}|{type:uri,uri} | — |
nameoptional | string | — |
descriptionoptional | string | — |
mentionoptional | {start,end,text} | — |
{"data":"aGVsbG8=","mime":"text/plain","source":{"type":"inline"},"name":"a.txt"}user.agents[] / user.skills[]
@agent and skill mentions in the prompt.
Written user message data.agents / data.skills.
| Field | Type | Meaning |
|---|---|---|
agents[].name | string | — |
skills[].id/name | string | — |
skills[].textoptional | string | — |
*.mentionoptional | {start,end,text} | — |
{"name":"explore","mention":{"start":0,"end":8,"text":"@explore"}}legacy part / textuntil 2.0.0
1.x part row of type text (legacy table; migrated into 2.x shapes on first 2.x start).
Written written by 1.x only.
Stored legacy (1.x databases only)
| Field | Type | Meaning |
|---|---|---|
id | text prt_ | — |
message_id | text | — |
session_id | text | — |
data.type | "text" | — |
data | object | {text, synthetic?, ignored?, time?{start,end?}, metadata?} |
{"id": "prt_x", "message_id": "msg_x", "session_id": "ses_x", "data": {"type": "text"}}legacy part / reasoninguntil 2.0.0
1.x part row of type reasoning (legacy table; migrated into 2.x shapes on first 2.x start).
Written written by 1.x only.
Stored legacy (1.x databases only)
| Field | Type | Meaning |
|---|---|---|
id | text prt_ | — |
message_id | text | — |
session_id | text | — |
data.type | "reasoning" | — |
data | object | {text, metadata?, time{start,end?}} |
{"id": "prt_x", "message_id": "msg_x", "session_id": "ses_x", "data": {"type": "reasoning"}}legacy part / fileuntil 2.0.0
1.x part row of type file (legacy table; migrated into 2.x shapes on first 2.x start).
Written written by 1.x only.
Stored legacy (1.x databases only)
| Field | Type | Meaning |
|---|---|---|
id | text prt_ | — |
message_id | text | — |
session_id | text | — |
data.type | "file" | — |
data | object | {mime, filename?, url (data: or file:), source?{type:file|symbol|resource,...}} |
{"id": "prt_x", "message_id": "msg_x", "session_id": "ses_x", "data": {"type": "file"}}legacy part / tooluntil 2.0.0
1.x part row of type tool (legacy table; migrated into 2.x shapes on first 2.x start).
Written written by 1.x only.
Stored legacy (1.x databases only)
| Field | Type | Meaning |
|---|---|---|
id | text prt_ | — |
message_id | text | — |
session_id | text | — |
data.type | "tool" | — |
data | object | {callID, tool, state:{status:pending{input,raw}|running{input,title?,metadata?,time.start}|completed{input,output,title,metadata,time{start,end,compacted?},attachments?}|error{input,error,metadata?,time}}, metadata?} |
{"id": "prt_x", "message_id": "msg_x", "session_id": "ses_x", "data": {"type": "tool"}}Import mapping: text/reasoning/tool → assistant content; user text/file/agent → user fields; synthetic text → synthetic row; compaction+summary assistant → compaction row; step-start/snapshot/patch/step-finish → assistant.snapshot; subtask and its task tool call dropped; tool renames bash→shell, task→subagent, apply_patch→patch; pending/running tools become error tool.interrupted.
legacy part / step-startuntil 2.0.0
1.x part row of type step-start (legacy table; migrated into 2.x shapes on first 2.x start).
Written written by 1.x only.
Stored legacy (1.x databases only)
| Field | Type | Meaning |
|---|---|---|
id | text prt_ | — |
message_id | text | — |
session_id | text | — |
data.type | "step-start" | — |
data | object | {snapshot?} |
{"id": "prt_x", "message_id": "msg_x", "session_id": "ses_x", "data": {"type": "step-start"}}legacy part / step-finishuntil 2.0.0
1.x part row of type step-finish (legacy table; migrated into 2.x shapes on first 2.x start).
Written written by 1.x only.
Stored legacy (1.x databases only)
| Field | Type | Meaning |
|---|---|---|
id | text prt_ | — |
message_id | text | — |
session_id | text | — |
data.type | "step-finish" | — |
data | object | {reason, snapshot?, cost, tokens{total?,input,output,reasoning,cache{read,write}}} |
{"id": "prt_x", "message_id": "msg_x", "session_id": "ses_x", "data": {"type": "step-finish"}}legacy part / snapshotuntil 2.0.0
1.x part row of type snapshot (legacy table; migrated into 2.x shapes on first 2.x start).
Written written by 1.x only.
Stored legacy (1.x databases only)
| Field | Type | Meaning |
|---|---|---|
id | text prt_ | — |
message_id | text | — |
session_id | text | — |
data.type | "snapshot" | — |
data | object | {snapshot} |
{"id": "prt_x", "message_id": "msg_x", "session_id": "ses_x", "data": {"type": "snapshot"}}legacy part / patchuntil 2.0.0
1.x part row of type patch (legacy table; migrated into 2.x shapes on first 2.x start).
Written written by 1.x only.
Stored legacy (1.x databases only)
| Field | Type | Meaning |
|---|---|---|
id | text prt_ | — |
message_id | text | — |
session_id | text | — |
data.type | "patch" | — |
data | object | {hash, files[]} |
{"id": "prt_x", "message_id": "msg_x", "session_id": "ses_x", "data": {"type": "patch"}}legacy part / agentuntil 2.0.0
1.x part row of type agent (legacy table; migrated into 2.x shapes on first 2.x start).
Written written by 1.x only.
Stored legacy (1.x databases only)
| Field | Type | Meaning |
|---|---|---|
id | text prt_ | — |
message_id | text | — |
session_id | text | — |
data.type | "agent" | — |
data | object | {name, source?{value,start,end}} |
{"id": "prt_x", "message_id": "msg_x", "session_id": "ses_x", "data": {"type": "agent"}}legacy part / subtaskuntil 2.0.0
1.x part row of type subtask (legacy table; migrated into 2.x shapes on first 2.x start).
Written written by 1.x only.
Stored legacy (1.x databases only)
| Field | Type | Meaning |
|---|---|---|
id | text prt_ | — |
message_id | text | — |
session_id | text | — |
data.type | "subtask" | — |
data | object | {prompt, description, agent, model?{providerID,modelID}, command?} |
{"id": "prt_x", "message_id": "msg_x", "session_id": "ses_x", "data": {"type": "subtask"}}legacy part / retryuntil 2.0.0
1.x part row of type retry (legacy table; migrated into 2.x shapes on first 2.x start).
Written written by 1.x only.
Stored legacy (1.x databases only)
| Field | Type | Meaning |
|---|---|---|
id | text prt_ | — |
message_id | text | — |
session_id | text | — |
data.type | "retry" | — |
data | object | {attempt, error(APIError), time{created}} |
{"id": "prt_x", "message_id": "msg_x", "session_id": "ses_x", "data": {"type": "retry"}}legacy part / compactionuntil 2.0.0
1.x part row of type compaction (legacy table; migrated into 2.x shapes on first 2.x start).
Written written by 1.x only.
Stored legacy (1.x databases only)
| Field | Type | Meaning |
|---|---|---|
id | text prt_ | — |
message_id | text | — |
session_id | text | — |
data.type | "compaction" | — |
data | object | {auto, overflow?, tail_start_id?} |
{"id": "prt_x", "message_id": "msg_x", "session_id": "ses_x", "data": {"type": "compaction"}}Rebuilding the conversation
- ordering
- ORDER BY seq within session_id. seq is the per-session durable event sequence, so it has gaps; do not use id or time_created as the primary order (assistant time_created is reset on retry).
- message parent links
- None in 2.x: the transcript is a flat seq-ordered list (1.x assistant.parentID pointed at the user message; it is not carried over).
- tool call ↔ result
- Call and result are the same assistant content block (type tool, keyed by id); the result is state.content when status=completed/error. Find the latest block with matching id in the step.
- turns
- A turn = rows after the previous idle row up to and including the next idle row (steered prompts mid-turn included). Each assistant row is one LLM step; finish=tool-calls means another step follows.
- subagents
- The subagent tool creates a child session_v2 row with parent_id = parent session; the tool result text/metadata carries the child sessionID; background completions arrive in the parent as synthetic rows with metadata {source:subagent, childID, agent, state}.
- forks
- A fork is a new session_v2 row with parent_id NULL, fork_session_id = source and fork_boundary {before|through, messageID}; settled rows up to the boundary are physically copied with new ids msg_<evt>_<seq> and the same seq; compaction metadata.keepID is remapped.
- compaction
- Model history starts at the latest completed compaction row (status=completed): summary replaces everything before it; rows from metadata.keepID up to the compaction are re-rendered as 'recent' text; a provider-native compaction (native.messages) replays only on the same model. Raw rows before the compaction remain in the table.
- branches/rewind
- Revert: session_v2.revert holds a staged revert (messageID, snapshot, files); on commit all session_message rows with seq >= the target row's seq (and inbox rows) are DELETED and instruction state rewound. No branches are kept.
- resume
- Resume continues the same session id; an assistant row with no time.completed is an interrupted/in-flight step and is superseded by the next step.started.
- sidecar references
- tool state.metadata.outputPath → tool-output file; shell rows → shell/<project>/<sh_id>.out; assistant.snapshot.start/end and session_v2.revert.snapshot → git trees in snapshot/<project>/<hash>/.
- session settings
- Current agent/model are session_v2.agent/model; history of changes is the agent-switched/model-switched rows; each assistant row records the agent and model it used.
Token usage
assistant data.tokens {input, output, reasoning, cache.read, cache.write}- Per-step usage from step.ended (or step.failed when reported). No total; reasoning is a separate bucket.
assistant data.cost- Per-step USD computed by OpenCode.
compaction data.cost/tokens- Cost of the compaction request (accounted via internal usage.recorded).
session_v2.cost and tokens_*- Running totals = all step usage + title-generation usage + compaction usage. Title usage appears in no transcript row, so summing rows undercounts.
Versions
No per-row schema version. session_v2.version records the creating opencode version; the migration table lists applied migration ids (seeded from __drizzle_migrations on old installs); kv migration.v1-v2 records the 1.x import. Readers upgrade older 2.x row shapes on decode (SessionLegacy): before 2.1 native data was named state/providerState/resultState/providerResultState, compaction stored kept text in recent and provider windows in providerContext; window media before 2.0.15 used {mediaType,data}. 1.x (session/message/part tables, role+parts model) is imported in place on first 2.x start into session_v2/session_message; the 1.x tables and rows are left behind, and persisted 1.x events are deleted. A pre-split 2.x DB (marker 20260730195856_optional_session_title) had its session table renamed to session_v2 in migration 20260804233008_loose_psylocke.
Parsing pitfalls
- Rows are mutable: assistant, shell and compaction rows are rewritten in place while streaming; read time.completed / status before trusting content.
- Tool calls and results are one block; there is no separate tool_result row.
- seq has gaps and equals the event sequence; forks reuse parent seq values.
- Revert physically deletes rows; there is no history of abandoned branches.
- The event table is empty on local CLI installs (events.persist is only set by the Cloudflare host); do not rely on it for history.
- Upgraded 1.x databases still contain the old session/message/part tables; reading them gives stale pre-import data and misses all 2.x activity.
- session_pending is defined in the schema but unused at 2.1.4.
- A failed provider step and its retry reuse the same assistant row id; fields are reset on restart.
- Older 2.x rows use legacy key names (providerState, state, recent, providerContext); apply the SessionLegacy renames before decoding.
- Large tool output is truncated in the DB and the full text lives in tool-output/ files that are deleted after 7 days.
- User attachments are stored as base64 in the row and can make rows large.
pi 1.4.0
Published, versioned specification. JSON Lines, one entry per line, appended as the session runs and uncompressed. The file is rewritten only when an older format version is migrated or a branch is extracted.
Files
~/.pi/agent/ | Agent directory (PI_CODING_AGENT_DIR overrides). Also holds settings.json, auth.json, models.json, prompts/, tools/, mcp.json, pi-debug.log — none session-scoped. |
|---|---|
~/.pi/agent/sessions/--<cwd with leading separator removed and / \ : replaced by ->--/ | One directory per working directory. A custom --session-dir / PI_CODING_AGENT_SESSION_DIR / sessionDir setting is flat and filtered by header cwd. |
~/.pi/agent/sessions/--<cwd>--/<ISO timestamp with : and . replaced by ->_<session-id>.jsonl | The entire session: header line plus append-only tree of entries, including all branches. Not created until the first user/assistant message (since 0.99.0; first assistant before). |
<os.tmpdir()>/pi-bash-<16 hex>.log | Full output of a truncated bash tool call or ! command, referenced by details.fullOutputPath / bashExecution.fullOutputPath. Temporary; not under the session dir and may be gone. |
Fields on every record
Record type is chosen by type, then message.role for message entries..
| Field | Type | Meaning |
|---|---|---|
type | string | Entry type. |
id | string | 8 lowercase hex chars (first 8 of a random UUID, collision-checked); falls back to a full UUID. Absent on the session header (which uses the session id). |
parentId | string|null | Parent entry id; null for a root. Absent on the header. |
timestamp | string (ISO 8601) | Entry write time. Distinct from message.timestamp (Unix ms). |
Records (18)
session
First line of every file: format version, session id, start time and working directory; not part of the entry tree.
Written built in memory by newSession()/createBranchedSession()/forkFrom(); written to disk together with all buffered entries when the first user or assistant message entry is appended (forkFrom writes it immediately).
| Field | Type | Meaning |
|---|---|---|
type | "session" | Discriminator. |
versionoptional | number | Format version; absent means 1. Current is 3. |
id | string | Session id. UUIDv7 by default (since 0.67.1; UUIDv4 before); may be a caller-supplied id matching ^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$ via --session-id/SDK. |
timestamp | string (ISO 8601) | Creation time; also used (with : and . replaced by -) as the file-name prefix. |
cwd | string | Absolute working directory. Readers tolerate it missing/non-string on very old files (treated as empty). |
parentSessionoptional | string | Absolute path of the source session file for /fork, /clone, forkFrom() or newSession({parentSession}). |
{"type":"session","version":3,"id":"01890a5d-ac96-774b-bcce-b302099a8057","timestamp":"2026-01-01T10:00:00.000Z","cwd":"/home/user/project"}message
Wrapper entry holding one AgentMessage; the role-specific payloads are listed below as message / <role>.
Written on every agent message_end for roles system, user, assistant, toolResult and custom (custom is re-routed to custom_message); bashExecution messages are appended after a ! command (deferred until agent_end if a turn is streaming).
| Field | Type | Meaning |
|---|---|---|
type | "message" | Discriminator. |
id | string | Entry id (8 hex chars). |
parentId | string|null | Parent entry id. |
timestamp | string (ISO 8601) | Append time. |
message | AgentMessage | Discriminated by message.role. |
{"type":"message","id":"a1b2c3d4","parentId":"f0e1d2c3","timestamp":"2026-01-01T10:00:01.000Z","message":{"role":"user","content":"Hello","timestamp":1767261601000}}message / systemsince 0.86.0
System prompt and tool loadout declaration (first request) or a delta that patches named prompt sections and adds/removes tools.
Written first model request of a session persists a leading system message with every section and full tool declarations; later prompt/tool changes persist delta system messages. Sessions from before 0.86.0 have none; the first request after upgrade declares the current prompt as a later system message.
Stored only since 0.86.0
| Field | Type | Meaning |
|---|---|---|
message.role | "system" | — |
message.content | string | TextContent[] | Base prompt on the leading message; extra instructions on later ones (often empty string). |
message.sectionsoptional | Record<string, string|null> | Named, ordered prompt sections; later messages replace by name, null removes. |
message.toolsAddedoptional | Tool[] ({name, description, parameters (JSON Schema), constrainedSampling?}) | Complete tool definitions becoming available. |
message.toolsRemovedoptional | {name}[] | Tools that stop being available. |
message.timestamp | number (ms) | — |
{"type":"message","id":"0a1b2c3d","parentId":null,"timestamp":"2026-01-01T10:00:00.500Z","message":{"role":"system","content":"","sections":{"preamble":"You are a coding assistant.","cwd":"/project"},"toolsAdded":[{"name":"read","description":"Read a file","parameters":{"type":"object","properties":{}}}],"timestamp":1767261600500}}Replay every system message on the active path in order to reconstruct the current prompt and tools; there is no separate prompt-state entry.
Inside a compacted context, system messages in the kept range are dropped in favour of compaction.systemMessage.
message / user
A user prompt (typed, queued steering/follow-up, or SDK-sent).
Written message_end of the user message at the start of each prompt.
| Field | Type | Meaning |
|---|---|---|
message.role | "user" | — |
message.content | string | (TextContent|ImageContent)[] | Plain string or blocks; images are inline base64. |
message.timestamp | number (ms) | — |
{"type":"message","id":"a1b2c3d4","parentId":"0a1b2c3d","timestamp":"2026-01-01T10:00:01.000Z","message":{"role":"user","content":[{"type":"text","text":"Hello"}],"timestamp":1767261601000}}message / assistant
One completed model response: text, thinking and tool calls plus model identity, usage and stop reason.
Written message_end of each model response (one per LLM call; a tool-using turn yields several). Streaming partials (stopReason pending) are never persisted; errored and aborted responses are.
| Field | Type | Meaning |
|---|---|---|
message.role | "assistant" | — |
message.content | (TextContent|ThinkingContent|ToolCall)[] | — |
message.api | string | Wire API, e.g. anthropic-messages, openai-responses, openai-completions, openai-codex-responses, azure-openai-responses, mistral-conversations, bedrock-converse-stream, google-generative-ai, google-vertex, pi-messages, or custom. |
message.provider | string | Provider id. |
message.model | string | Requested (physical) model id. |
message.responseModeloptional | string | Concrete provider model when it differs. |
message.responseIdoptional | string | Provider response id. |
message.providerThinkingLeveloptional | string | Provider-native effort actually used. |
message.thinkingLeveloptional | enum(off,minimal,low,medium,high,xhigh,max) | Pi thinking level requested. |
message.diagnosticsoptional | {type,timestamp,error?{name?,message,stack?,code?},details?}[] | Redacted provider/runtime diagnostics, e.g. provider_transport_failure, bedrock_response_failure, pi_messages_response_failure.since 0.73.0 |
message.usage | Usage | Usage object: input, output, cacheRead, cacheWrite, cacheWrite1h?, reasoning?, totalTokens, cost{input,output,cacheRead,cacheWrite,total} |
message.stopReason | enum(stop,length,toolUse,error,aborted,deferred) | pending exists in the type but is not persisted. |
message.deferredoptional | DeferredHandle {provider,modelId,api,id,expiresAt?,pollAfterMs?,data?} | Handle to retrieve a deferred response.since 0.84.0 |
message.errorMessageoptional | string | Error text when stopReason is error/aborted. |
message.rawStopReasonoptional | string | Provider-native stop reason. |
message.endTurnoptional | boolean | Provider explicit end-of-turn signal (Codex).since 0.84.2 |
message.timestamp | number (ms) | Request start time. |
message.durationMsoptional | number | Monotonic duration of the response.since 1.1.0 |
{"type":"message","id":"b2c3d4e5","parentId":"a1b2c3d4","timestamp":"2026-01-01T10:00:03.000Z","message":{"role":"assistant","content":[{"type":"text","text":"Hi!"}],"api":"anthropic-messages","provider":"anthropic","model":"example-model","usage":{"input":10,"output":3,"cacheRead":0,"cacheWrite":0,"totalTokens":13,"cost":{"input":0.00003,"output":0.00004,"cacheRead":0,"cacheWrite":0,"total":0.00007}},"stopReason":"stop","timestamp":1767261602000,"durationMs":900}}message / toolResult
Result of one tool call, linked to the call by toolCallId.
Written after a tool finishes; for parallel batches all results are appended after the batch completes, in the assistant's tool-call order.
| Field | Type | Meaning |
|---|---|---|
message.role | "toolResult" | — |
message.toolCallId | string | ToolCall.id of the originating block. |
message.toolName | string | — |
message.content | (TextContent|ImageContent)[] | What the model sees. |
message.detailsoptional | JSON | Tool-specific UI/metadata, not sent to model. Built-ins: bash {truncation?, fullOutputPath?}; read {truncation?}; edit {diff, patch, firstChangedLine?}; ls {truncation?, entryLimitReached?}; find {truncation?, resultLimitReached?}; grep {truncation?, matchLimitReached?, linesTruncated?}. |
message.usageoptional | Usage | Nested model work done by the tool; counted in session totals but not main-call accounting. |
message.nestedCallsoptional | {calls:{id,name,arguments?,argumentsBytes?,status(ok|error|unfinished),durationMs?,error?}[], complete:boolean} | Bounded record of tool-to-tool calls (e.g. codemode). |
message.isError | boolean | — |
message.timestamp | number (ms) | — |
message.durationMsoptional | number | Tool execution time.since 1.1.0 |
{"type":"message","id":"c3d4e5f6","parentId":"b2c3d4e5","timestamp":"2026-01-01T10:00:04.000Z","message":{"role":"toolResult","toolCallId":"call_1","toolName":"bash","content":[{"type":"text","text":"ok"}],"isError":false,"timestamp":1767261604000}}message / bashExecution
A user-initiated shell command (! or !! prefix, or RPC bash) with its output; not an LLM tool call.
Written after the command finishes; if a turn is streaming it is queued and appended at agent_end.
Stored only user runs a shell command
| Field | Type | Meaning |
|---|---|---|
message.role | "bashExecution" | — |
message.command | string | — |
message.output | string | Possibly truncated output. |
message.exitCode | number|undefined | Omitted from JSON when undefined. |
message.cancelled | boolean | — |
message.truncated | boolean | — |
message.fullOutputPathoptional | string | Temp file with full output (os.tmpdir()/pi-bash-<16hex>.log). |
message.excludeFromContextoptional | boolean | true for !! commands: not converted into model context. |
message.timestamp | number (ms) | — |
{"type":"message","id":"d4e5f6a7","parentId":"c3d4e5f6","timestamp":"2026-01-01T10:01:00.000Z","message":{"role":"bashExecution","command":"ls","output":"README.md","exitCode":0,"cancelled":false,"truncated":false,"timestamp":1767261660000}}Converted to user-role text for the model unless excludeFromContext.
message / custom
Legacy/alternate location for an extension context message; the agent re-routes role custom to a custom_message entry, so this appears only from SDK appendMessage() or v2 hookMessage migration.
Written rare: direct SessionManager.appendMessage() with a CustomMessage, or v1/v2 files whose hookMessage role is renamed on load.
Stored only SDK/legacy
| Field | Type | Meaning |
|---|---|---|
message.role | "custom" (was "hookMessage" before v3) | — |
message.customType | string | — |
message.content | string | (TextContent|ImageContent)[] | — |
message.display | boolean | — |
message.detailsoptional | any | — |
message.timestamp | number (ms) | — |
{"type":"message","id":"e5f6a7b8","parentId":"d4e5f6a7","timestamp":"2026-01-01T10:02:00.000Z","message":{"role":"custom","customType":"my-ext","content":"note","display":true,"timestamp":1767261720000}}model_change
User or runtime switched the selected model (may be a virtual model).
Written session start (SDK records initial model/thinking), /model, model cycling, fallback switching.
| Field | Type | Meaning |
|---|---|---|
provider | string | — |
modelId | string | — |
{"type":"model_change","id":"f6a7b8c9","parentId":"e5f6a7b8","timestamp":"2026-01-01T10:03:00.000Z","provider":"openai","modelId":"example-model"}thinking_level_change
Thinking/reasoning level changed.
Written session start and whenever the level changes.
| Field | Type | Meaning |
|---|---|---|
thinkingLevel | string (off|minimal|low|medium|high|xhigh|max) | — |
{"type":"thinking_level_change","id":"a7b8c9d0","parentId":"f6a7b8c9","timestamp":"2026-01-01T10:03:01.000Z","thinkingLevel":"high"}usagesince 0.86.0
Model-attributed usage that is not an assistant message (e.g. prompt-cache warming).
Written cache warmer refreshes (kind cache_warm); any caller of appendUsage(). Not part of LLM context; hidden from the tree.
Stored only cache warming or extension
| Field | Type | Meaning |
|---|---|---|
kind | string | Open-ended category; treat unknown kinds as normal usage. |
provider | string | — |
model | string | — |
usage | Usage | Usage object: input, output, cacheRead, cacheWrite, cacheWrite1h?, reasoning?, totalTokens, cost{input,output,cacheRead,cacheWrite,total} |
noteoptional | string | Human-readable qualifier. |
{"type":"usage","id":"b8c9d0e1","parentId":"a7b8c9d0","timestamp":"2026-01-01T10:04:00.000Z","kind":"cache_warm","provider":"anthropic","model":"example-model","usage":{"input":0,"output":1,"cacheRead":50000,"cacheWrite":0,"totalTokens":50001,"cost":{"input":0,"output":0.00001,"cacheRead":0.015,"cacheWrite":0,"total":0.01501}}}compaction
Context compaction checkpoint: summary of earlier entries, the first kept entry, and the full system prompt/tool state at that point.
Written manual /compact, auto-compaction on threshold or overflow, or extension-driven compaction.
Stored only compaction runs
| Field | Type | Meaning |
|---|---|---|
summary | string | — |
firstKeptEntryId | string | First retained entry before the compaction; equals the compaction's own id for retain-none (since 0.87.0). |
tokensBefore | number | Context tokens before compaction. |
detailsoptional | any | Default: {readFiles:string[], modifiedFiles:string[]}; extensions may store anything. |
usageoptional | Usage | Cost of producing the summary; counted in session totals. |
fromHookoptional | boolean | true when an extension produced it. |
systemMessageoptional | SystemMessage | Complete prompt/tool checkpoint; becomes the leading system message of compacted context.since 0.86.0 |
{"type":"compaction","id":"c9d0e1f2","parentId":"b8c9d0e1","timestamp":"2026-01-01T11:00:00.000Z","summary":"Goal: ...","firstKeptEntryId":"a1b2c3d4","tokensBefore":120000,"details":{"readFiles":[],"modifiedFiles":[]}}v1 files stored firstKeptEntryIndex (array index); migration converts it to firstKeptEntryId.
branch_summary
LLM summary of an abandoned branch, written when navigating /tree to another point with summarisation.
Written branchWithSummary(): parentId is the branch point (or null for a new root); fromId is the old leaf.
Stored only tree navigation with summary
| Field | Type | Meaning |
|---|---|---|
fromId | string | Previous leaf whose path was summarised; literal "root" if there was no leaf. |
summary | string | — |
detailsoptional | any | Default {readFiles, modifiedFiles}. |
usageoptional | Usage | — |
fromHookoptional | boolean | — |
{"type":"branch_summary","id":"d0e1f2a3","parentId":"a1b2c3d4","timestamp":"2026-01-01T11:05:00.000Z","fromId":"c9d0e1f2","summary":"Tried approach A ..."}custom
Extension state that never enters model context.
Written appendCustomEntry() by extensions; built-in uses: pi.virtual-model-state {provider, modelId, state}, pi.bug-report {id, createdAt, hint, sessionIncluded, summaryIncluded, delivery, path?}.
Stored only extensions
| Field | Type | Meaning |
|---|---|---|
customType | string | Extension identifier. |
dataoptional | any | — |
{"type":"custom","id":"e1f2a3b4","parentId":"d0e1f2a3","timestamp":"2026-01-01T11:06:00.000Z","customType":"my-extension","data":{"count":1}}custom_message
Extension-injected message that does enter model context (as user-role content).
Written pi.sendMessage() and other extension message injection (agent message_end with role custom).
Stored only extensions
| Field | Type | Meaning |
|---|---|---|
customType | string | — |
content | string | (TextContent|ImageContent)[] | — |
display | boolean | Render in TUI or hide. |
detailsoptional | any | Not sent to model. |
{"type":"custom_message","id":"f2a3b4c5","parentId":"e1f2a3b4","timestamp":"2026-01-01T11:07:00.000Z","customType":"my-extension","content":"Injected context","display":true}context_editsince 0.87.0
Append-only edit that omits or replaces one earlier entry's content in future model context, without changing raw history.
Written appendContextEdit(); used by extensions and by error recovery, which omits a failed assistant attempt and its tool results (replacement null).
Stored only edits/recovery
| Field | Type | Meaning |
|---|---|---|
targetId | string | A user/assistant/toolResult message entry or custom_message entry on the active branch. |
replacement | {content: string|block[]} | null | null omits; string content for assistant/toolResult is normalized to one text block. |
{"type":"context_edit","id":"a3b4c5d6","parentId":"f2a3b4c5","timestamp":"2026-01-01T11:08:00.000Z","targetId":"b2c3d4e5","replacement":null}labelsince 0.31.0
User bookmark on an entry (set or clear).
Written /tree label action (l), extensions, branch-summary labelling; createBranchedSession re-emits resolved labels at the end of the new file.
Stored only labelling
| Field | Type | Meaning |
|---|---|---|
targetId | string | — |
label | string|undefined | Omitted from JSON (undefined) or empty to clear. |
{"type":"label","id":"b4c5d6e7","parentId":"a3b4c5d6","timestamp":"2026-01-01T11:09:00.000Z","targetId":"a1b2c3d4","label":"checkpoint-1"}session_info
Session display name.
Written /name, --name/-n, pi.setSessionName(); latest entry in the file wins, empty name clears.
Stored only naming
| Field | Type | Meaning |
|---|---|---|
nameoptional | string | Newlines collapsed to spaces, trimmed. |
{"type":"session_info","id":"c5d6e7f8","parentId":"b4c5d6e7","timestamp":"2026-01-01T11:10:00.000Z","name":"Refactor auth module"}Content blocks (4)
text
Plain text (user, assistant, toolResult, system, custom content).
Written inside message.content arrays.
| Field | Type | Meaning |
|---|---|---|
type | "text" | — |
text | string | — |
textSignatureoptional | string | Opaque provider metadata (legacy id string or JSON {v:1,id,phase?:commentary|final_answer} for OpenAI Responses). |
{"type":"text","text":"Hello"}image
Inline base64 image (user, toolResult, custom content).
Written inside content arrays.
| Field | Type | Meaning |
|---|---|---|
type | "image" | — |
data | string (base64) | — |
mimeType | string | — |
{"type":"image","data":"iVBORw0KGgo=","mimeType":"image/png"}thinking
Model reasoning (assistant only).
Written inside assistant content.
| Field | Type | Meaning |
|---|---|---|
type | "thinking" | — |
thinking | string | May be empty when redacted. |
thinkingSignatureoptional | string | Opaque replay data / encrypted payload. |
redactedoptional | boolean | — |
{"type":"thinking","thinking":"Consider the file layout...","thinkingSignature":"sig"}toolCall
Model's request to run a tool (assistant only).
Written inside assistant content; result follows as a toolResult message entry.
| Field | Type | Meaning |
|---|---|---|
type | "toolCall" | — |
id | string | Matched by toolResult.toolCallId. |
name | string | — |
arguments | object | {} when argumentsError is set. |
thoughtSignatureoptional | string | Google opaque signature. |
namespaceoptional | string | OpenAI Responses tool namespace. |
argumentsErroroptional | string | Raw text and error when model sent invalid JSON arguments.since 1.3.0 |
{"type":"toolCall","id":"call_1","name":"bash","arguments":{"command":"ls"}}Rebuilding the conversation
- ordering
- File order is append order. Line 1 is the header. Conversation order on a branch comes from walking parentId, not from line order, because branches interleave in one file.
- message parent links
- Every non-header entry (all types, including model_change, label, usage) is a tree node whose parentId is the leaf at append time. Build an id index, then walk parentId from a leaf to null.
- branches/rewind
- The active leaf is not stored: on load it is the last entry in the file. Branching moves the leaf in memory and the next append gets an earlier parentId; branch_summary records a summarised switch (parentId = branch point, fromId = old leaf). resetLeaf()/branchWithSummary(null) can create extra roots (parentId null). Leaves = entries with no children.
- tool call ↔ result
- assistant content block {type:toolCall,id} pairs with a later message entry with role toolResult and the same toolCallId; results for one assistant message are appended in call order after the whole batch completes.
- turns
- No explicit turn records. A turn starts with a user (or custom_message) entry and runs through assistant/toolResult entries until an assistant message whose stopReason is not toolUse.
- compaction
- Use the latest compaction on the active path: model context = compaction.systemMessage (if any) + compactionSummary, then non-system entries from firstKeptEntryId up to the compaction, then everything after it. Raw entries are kept on disk.
- context edits
- For each target, the latest context_edit on the selected path wins; replacement null removes it from model context; display/history/usage still use the original.
- forks
- /fork and /clone (createBranchedSession) write a new file containing only the root→leaf path (labels dropped and re-emitted at the end, parentIds rechained) with header.parentSession = source path. forkFrom() copies all source entries verbatim into a new file in another cwd. Entry ids are preserved in both.
- session settings
- Current model = last model_change or assistant (provider, model) on the path; thinking level = last thinking_level_change (default off).
- resume
- Resume reopens the same file and appends; continueRecent picks the newest file in the cwd directory.
- subagents
- No core subagent lineage; subagents are an example extension running separate pi sessions.
- sidecar references
- toolResult.details.fullOutputPath and bashExecution.fullOutputPath point to temp files outside the session directory.
Token usage
message(assistant).usage.input/output/cacheRead/cacheWrite- Per-response tokens. reasoning (optional) is a subset of output; cacheWrite1h a subset of cacheWrite.
usage.totalTokens- Provider total for the call.
usage.cost.{input,output,cacheRead,cacheWrite,total}- USD computed by pi from its model catalogue.
toolResult.usage- Nested model work by the tool; counted in session totals.
usage entry, compaction.usage, branch_summary.usage- Non-conversation model calls; included in session totals. Sum across all branches in the file for total spend; across the active path only for that branch.
Versions
Header.version: absent=1 (linear, no id/parentId; compaction used firstKeptEntryIndex), 2 (id/parentId tree, since 0.31.0), 3 (message role hookMessage renamed to custom, since 0.35.0). CURRENT_SESSION_VERSION=3 at v1.4.0. Older files are migrated in memory on load and the file is rewritten in place. Additive fields since v3 are not versioned: system messages and compaction.systemMessage (0.86.0), usage entries (0.86.0), context_edit (0.87.0), retain-none compaction (0.87.0), Usage.reasoning (0.80.3), endTurn (0.84.2), durationMs (1.1.0), argumentsError (1.3.0). File is created at first user message since 0.99.0.
Parsing pitfalls
- Branches share one file: reading lines in order mixes alternate branches. Walk parentId from the chosen leaf.
- The active leaf is not persisted; pi assumes the last line is the leaf, which after a non-summarised branch switch may be on a different branch than an earlier tail.
- Two timestamps: entry.timestamp is ISO 8601; message.timestamp is Unix ms (request start for assistant).
- Non-message entries (model_change, label, usage, custom, context_edit) are tree nodes too and sit between messages on the parent chain.
- role custom normally appears as a custom_message entry, not inside a message entry; compactionSummary and branchSummary roles are never persisted as messages.
- Errored and aborted assistant messages are persisted; error recovery may later hide them via context_edit rather than deleting them.
- user content may be a plain string or a block array.
- Opening an old-version file rewrites it on disk with the current version.
- label clear is written as a label entry without a label key (undefined dropped by JSON.stringify).
- branch_summary.fromId can be the literal string "root".
Sources
Codex CLI
- codex source: codex-rs/core/src/session/rollout_reconstruction.rs, Source code, checked 2026-10-26
- codex source: codex-rs/core/src/shell_snapshot.rs, Source code, checked 2026-10-26
- codex source: codex-rs/ext/items/src/lib.rs, Source code, checked 2026-10-26
- codex source: codex-rs/history/src/lib.rs, Source code, checked 2026-10-26
- codex source: codex-rs/history/src/retained_context.rs, Source code, checked 2026-10-26
- codex source: codex-rs/history/src/rollout_payload.rs, Source code, checked 2026-10-26
- codex source: codex-rs/message-history/src/lib.rs, Source code, checked 2026-10-26
- codex source: codex-rs/protocol/src/dynamic_tools.rs, Source code, checked 2026-10-26
- codex source: codex-rs/protocol/src/items.rs, Source code, checked 2026-10-26
- codex source: codex-rs/protocol/src/mcp.rs, Source code, checked 2026-10-26
- codex source: codex-rs/protocol/src/models.rs, Source code, checked 2026-10-26
- codex source: codex-rs/protocol/src/protocol.rs, Source code, checked 2026-10-26
- codex source: codex-rs/protocol/src/realtime.rs, Source code, checked 2026-10-26
- codex source: codex-rs/protocol/src/security_risk.rs, Source code, checked 2026-10-26
- codex source: codex-rs/protocol/src/user_input.rs, Source code, checked 2026-10-26
- codex source: codex-rs/rollout/src/compression.rs, Source code, checked 2026-10-26
- codex source: codex-rs/rollout/src/ordinal.rs, Source code, checked 2026-10-26
- codex source: codex-rs/rollout/src/policy.rs, Source code, checked 2026-10-26
- codex source: codex-rs/rollout/src/recorder.rs, Source code, checked 2026-10-26
- codex source: codex-rs/rollout/src/rollout_file_name.rs, Source code, checked 2026-10-26
- codex source: codex-rs/rollout/src/session_index.rs, Source code, checked 2026-10-26
- codex source: codex-rs/rollout/src/writer_lock.rs, Source code, checked 2026-10-26
- codex source: codex-rs/state/src/sqlite.rs, Source code, checked 2026-10-26
- codex source: codex-rs/thread-store/src/local/archive_thread.rs, Source code, checked 2026-10-26
- codex source: codex-rs/thread-store/src/local/revert_thread.rs, Source code, checked 2026-10-26
- codex source: codex-rs/thread-store/src/local/rollout_lineage.rs, Source code, checked 2026-10-26
- codex source: codex-rs/thread-store/src/local/rollout_migration/publish.rs, Source code, checked 2026-10-26
- codex source: codex-rs/thread-store/src/local/rollout_migration/startup.rs, Source code, checked 2026-10-26
Claude Code
- Claude Code sessions, Documentation, checked 2026-10-15
- claude-code 2.1.310 (bundle examined); local transcripts written by 2.1.281–2.1.310 local transcript shape survey, live observation, checked 2026-10-26
- Documentation: github.com/anthropics/claude-code/blob/main/CHANGELOG.md, Documentation, checked 2026-10-26
- claude-code docs: docs/en/claude-directory, Documentation, checked 2026-10-15
Cursor Agent
- cursor-agent 2026.10.12-d47ca18 local transcript shape survey, live observation, checked 2026-10-26
OpenCode
- opencode source: packages/cli/src/database-path.ts, Source code, checked 2026-10-26
- opencode source: packages/cli/src/server-process.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/bus.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/database/database.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/database/v1-migration.bun.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/event/sql.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/kv/sql.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/session/history.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/session/inbox.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/session/message-updater.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/session/projector.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/session/sql.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/session/subagent-completion.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/shell.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/snapshot.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/tool-output.ts, Source code, checked 2026-10-26
- opencode source: packages/core/src/tool/plugin/subagent.ts, Source code, checked 2026-10-26
- opencode source: packages/schema/src/instruction.ts, Source code, checked 2026-10-26
- opencode source: packages/schema/src/prompt.ts, Source code, checked 2026-10-26
- opencode source: packages/schema/src/session-inbox.ts, Source code, checked 2026-10-26
- opencode source: packages/schema/src/session-message.ts, Source code, checked 2026-10-26
- opencode source: packages/schema/src/shell.ts, Source code, checked 2026-10-26
- opencode source: packages/schema/src/tool.ts, Source code, checked 2026-10-26
- opencode source: packages/schema/src/v1/session.ts, Source code, checked 2026-10-26
- opencode source: packages/server/src/workerd.ts, Source code, checked 2026-10-26
- opencode source: packages/util/src/global-roots.ts, Source code, checked 2026-10-26
pi
- pi source: packages/agent/src/agent-loop.ts, Source code, checked 2026-10-26
- pi source: packages/ai/src/types.ts, Source code, checked 2026-10-26
- pi source: packages/coding-agent/docs/message-types.md, Documentation, checked 2026-10-26
- pi source: packages/coding-agent/docs/session-format.md, Documentation, checked 2026-10-26
- pi source: packages/coding-agent/examples/extensions/subagent, Source code, checked 2026-10-26
- pi source: packages/coding-agent/src/config.ts, Source code, checked 2026-10-26
- pi source: packages/coding-agent/src/core/agent-session.ts, Source code, checked 2026-10-26
- pi source: packages/coding-agent/src/core/cache-warmer.ts, Source code, checked 2026-10-26
- pi source: packages/coding-agent/src/core/messages.ts, Source code, checked 2026-10-26
- pi source: packages/coding-agent/src/core/sdk.ts, Source code, checked 2026-10-26
- pi source: packages/coding-agent/src/core/session-manager.ts, Source code, checked 2026-10-26
- pi source: packages/coding-agent/src/core/tools/bash.ts, Source code, checked 2026-10-26
- pi source: packages/coding-agent/src/core/virtual-models.ts, Source code, checked 2026-10-26
- pi source: packages/coding-agent/src/modes/interactive/bug-report.ts, Source code, checked 2026-10-26
- pi source: packages/coding-agent/src/utils/output-files.ts, Source code, checked 2026-10-26