Harness Notes

Transcript format

Updated 2026-10-26

On this page

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

QuestionCodex CLI0.164.0Claude Code2.1.310Cursor Agent2026.10.12-d47ca18OpenCode2.1.4pi1.4.0
SpecificationNo published schema; defined by the open-source codeLocation documented; record format is internal and changes between versionsNo published schema or source; read from the installed buildNo published schema; defined by the open-source codePublished, 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
StorageJSON 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 fieldtype, 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.
Size72 record types, 24 content blocks179 record types, 15 content blocks24 record types, 9 content blocks20 record types, 23 content blocks18 record types, 4 content blocks

Records by purpose

RecordsCodex CLI0.164.0Claude Code2.1.310Cursor Agent2026.10.12-d47ca18OpenCode2.1.4pi1.4.0
Session
Session header—
Title——
Model, directory and settings
Forks and subagents—
Files and workspace state—
Conversation
User message
Assistant message
System and injected context
Reasoning
Images, files and attachments
Queued and steered input—
Tools
Tool call
Tool result
Tool progress——
Approvals and denials———
Hook output———
Turns
Turn starts——
Turn ends—
Turn is interrupted————
Errors———
Context and accounting
Compaction
Summaries—
Token usage—
Cost————
Other records

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>.jsonlThe 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>.jsonlRollout 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.zstSame 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.jsonlAppend-only thread names: {id, thread_name, updated_at(RFC3339)}; the last entry for an id wins.
~/.codex/history.jsonlPrompt 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.sqliteLogs, thread goals, memories, and queued input; not transcript content but keyed by thread id.
~/.codex/rollout-migrations/<thread-id>.pendingJournal for the in-place legacy -> paginated rollout migration (legacy_to_paginated_v1) that runs at startup.
~/.codex/thread-writer-locks/<thread-id>.lockPer-thread writer lock files.
~/.codex/shell_snapshots/<session-id>.<nonce>.shCaptured login-shell environment snapshot used for command execution.
~/.codex/generated_images/<thread-id>/<call-id>.pngSaved 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..

FieldTypeMeaning
timestampstringWrite time, UTC, format YYYY-MM-DDTHH:MM:SS.mmmZ (milliseconds).
ordinaloptionalintegerPresent 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.
typeenum(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).
payloadobjectItem body; for response_item, event_msg, retained_context and realtime_item it carries its own payload.type.
metadataoptionalobjectOnly 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.

FieldTypeMeaning
idstring(uuid)Thread id (stable across revert).
session_idstring(uuid)Root thread id of the session tree. Backfilled from id when absent in older files.
timestampstring(RFC3339 UTC, ms)Thread creation time.
cwdstring(path)Working directory at creation.
originatorstringClient originator (e.g. codex_cli_rs, codex_vscode).
cli_versionstringVersion of the build that created the thread; NOT updated by later writers or by legacy->paginated migration.
sourceoptionalstring | objectSessionSource, 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_sourceoptionalstringAnalytics classification: user | subagent | guardian_review | memory_consolidation | <feature string>.
forked_from_idoptionalstring(uuid)Thread this one was forked from.
forked_from_ordinal_exclusiveoptionalintegerFork boundary in the parent's paginated history (only with forked_from_id).
parent_thread_idoptionalstring(uuid)Parent thread for spawned sub-agents.
runtime_workspace_rootsoptionalstring[]Workspace roots at creation; absent = unknown, [] = none.
creator_user_idoptionalstringChatGPT user that created the thread.
creator_account_idoptionalstringChatGPT account selected at creation.
agent_nicknameoptionalstringNickname of a spawned sub-agent.
agent_roleoptionalstringRole of a spawned sub-agent. Alias on read: agent_type.
agent_pathoptionalstringCanonical agent path of a spawned sub-agent.
model_providerstring | nullModel provider id.
base_instructionsobject | null{text, provenance?} system instructions for the thread.
dynamic_toolsoptionalarrayClient-supplied dynamic tool specs (older flat camelCase shape also accepted on read).
selected_capability_rootsoptionalarrayCapability roots selected by the hosting platform.
memory_modeoptionalstring"disabled" when memory generation is off.
history_modeoptionalenum(legacy|paginated)Format discriminator for the whole file; absent = legacy. Unknown values make Codex reject the file.
history_baseoptionalobject{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_ordinaloptionalintegerFirst ordinal that belongs to this sub-agent's own history; earlier records are inherited parent context.
multi_agent_versionoptionalenum(disabled|v1|v2)Multi-agent protocol version.
context_windowoptionalobject{window_id}: initial context-window identity (UUIDv7).
gitoptionalobject{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.

FieldTypeMeaning
turn_idoptionalstringTurn this context belongs to.
root_turn_idoptionalstringCausal root turn.
cwdstring(path)Absolute working directory.
approval_policystring | objectAskForApproval: "untrusted" | "on-request" (alias on-failure) | "never" | {"granular":{...}}.
approvals_revieweroptionalenum(user|auto_review)Who reviews approvals (alias guardian_subagent).
sandbox_policyobject{type: danger-full-access | read-only | workspace-write | external-sandbox, writable_roots?, network_access?, exclude_tmpdir_env_var?, exclude_slash_tmp?}.
permission_profileoptionalobjectResolved permission profile {type, file_system, network}.
active_permission_profileoptionalobjectNamed/built-in profile that produced permission_profile.
file_system_sandbox_policyoptionalobjectRaw filesystem sandbox policy.
modelstringModel slug used for the turn.
comp_hashoptionalstringOpaque compatibility hash.
collaboration_modeoptionalobject{mode: plan|default, settings:{...}}.
multi_agent_versionoptionalenum(disabled|v1|v2)—
realtime_activeoptionalbooleanRealtime voice session active.
cyber_access_programoptionalobjectCyber access program state.
disabled_plugin_idsoptionalstring[]Plugin selection for the turn.
effortoptionalenum(none|minimal|low|medium|high|xhigh|max|ultra|persistent)Reasoning effort.
summaryoptionalenum(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.

FieldTypeMeaning
thread_idstring(uuid)—
turn_idstring—
session_idstring(uuid)Root session id.
root_turn_idstring—
response_idstringResponses API response id.
usageTokenUsageThis response: {input_tokens, cached_input_tokens, cache_write_input_tokens, output_tokens, reasoning_output_tokens, total_tokens}.
turn_token_usageTokenUsageCumulative for the turn.
thread_token_usageTokenUsageCumulative 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).

FieldTypeMeaning
messagestringSummary text (may be empty for remote/encrypted compaction).
replacement_historyoptionalResponseItem[]Complete history after compaction; same shapes as response_item payloads. Absent in early legacy rollouts.
replacement_history_metadataoptionalCodexHarnessMetadata[]Parallel array of per-item metadata; must have the same length as replacement_history.
guardian_historyoptionalobjectGuardian reviewer history checkpoint.
retained_contextoptionalobjectSnapshot 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_originsoptionalobjectMCP resource origin checkpoint.
window_numberoptionalintegerContext-window sequence number.
first_window_idoptionalstring—
previous_window_idoptionalstring—
window_idoptionalstring | integerNew window id; older rollouts stored the numeric window number here.
compaction_response_idoptionalstring | nullResponses API id for the compaction request; serialized as null when absent.
latest_token_usage_recordoptionalTokenUsageRecord | nullLatest usage snapshot at compaction time; serialized as null when absent.
resume_metadataoptionalobjectValues 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.

FieldTypeMeaning
fullbooleantrue = full baseline; false = patch onto the current baseline.
stateobjectOpaque 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.

FieldTypeMeaning
idoptionalstring—
authorstringSender agent path.
recipientstringRecipient agent path.
other_recipientsstring[]Defaults to [].
contentstringPlain text (empty when encrypted_content is set).
encrypted_contentoptionalstring—
internal_chat_message_metadata_passthroughoptionalobjectHarness 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_turnbooleanWhether 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.

FieldTypeMeaning
trigger_turnboolean—
{"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.

FieldTypeMeaning
scoresobject<string, number>Classifier name -> score.
call_idoptionalstringTool call that produced the score.
actionoptionalanyBounded description of the reviewed action.
sampled_atoptionalstring(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.

FieldTypeMeaning
turn_idstring—
call_idstring—
questionsarray[{question, answer}]
acceptance_orderoptionalintegerAbsent 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

FieldTypeMeaning
idstring—
realtime_session_idstring—
{"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

FieldTypeMeaning
idstring—
realtime_session_idstring—
roleenum(user|assistant)—
textstring—
{"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

FieldTypeMeaning
idstring—
realtime_session_idstring—
turn_idstring—
item_idstring—
presentationobject{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

FieldTypeMeaning
idstring—
realtime_session_idstring—
outcomeenum(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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
rolestring"user"
contentContentItem[]input_text / input_image / input_audio blocks.
statusoptionalstring—
encrypted_contentoptionalstringOpaque encrypted payload.
phaseoptionalstring—
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
rolestring"assistant"
contentContentItem[]output_text blocks.
phaseoptionalenum(commentary|partial_answer|final_answer)Absent = unknown (older models/providers).
statusoptionalstring—
encrypted_contentoptionalstringOpaque encrypted payload.
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
rolestring"developer" ("system" is possible from older/other producers)
contentContentItem[]input_text blocks.
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
summaryarray[{type:"summary_text", text}]
contentoptionalarray[{type:"reasoning_text"|"text", text}] raw reasoning; omitted on write when absent or when it contains reasoning_text.
encrypted_contentstring | nullAlways serialized (null when absent).
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
namestringTool name.
namespaceoptionalstringTool namespace (e.g. MCP server namespace).
argumentsstringJSON-encoded arguments STRING, not an object.
encrypted_function_argsoptionalstring[]—
call_idstringPairs with function_call_output.call_id.
statusoptionalstring—
encrypted_contentoptionalstringOpaque encrypted payload.
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
call_idoptionalstringMatches function_call.call_id.
nameoptionalstring—
namespaceoptionalstring—
outputstring | FunctionCallOutputContentItem[]Plain string, or an array of input_text / input_image / input_audio / encrypted_content items.
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
call_idstring—
namestring—
namespaceoptionalstring—
inputstringRaw freeform input (e.g. a patch).
statusoptionalstring—
encrypted_contentoptionalstringOpaque encrypted payload.
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
call_idstring—
nameoptionalstring—
outputstring | FunctionCallOutputContentItem[]Same encoding as function_call_output.output.
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
call_idstring | null—
statusenum(completed|in_progress|incomplete)—
actionobject{type:"exec", command:string[], timeout_ms, working_directory, env, user}
encrypted_contentoptionalstringOpaque encrypted payload.
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
call_idstring | null—
statusoptionalstring—
executionstring—
argumentsanyJSON value (not a string).
encrypted_contentoptionalstringOpaque encrypted payload.
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
call_idstring | null—
statusstring—
executionstring—
toolsany[]Tool declarations.
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
statusoptionalstring—
actionoptionalobject{type: search {query?, queries?} | open_page {url?} | find_in_page {url?, pattern?} | other}
encrypted_contentoptionalstringOpaque encrypted payload.
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
statusstring—
revised_promptoptionalstring—
resultstringBase64 image data (can be very large).
encrypted_contentoptionalstringOpaque encrypted payload.
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
authorstringAgent path.
recipientstringAgent path.
contentarray[{type:"input_text", text} | {type:"encrypted_content", encrypted_content}]
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
rolestring—
toolsany[]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)

FieldTypeMeaning
reasoningobject{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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
encrypted_contentstring—
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
idoptionalstringResponses API item id (e.g. msg_..., rs_..., fc_...) or a harness-generated <prefix>_<uuidv7>.
encrypted_contentoptionalstringOpaque encrypted payload.
internal_chat_message_metadata_passthroughoptionalobjectHarness 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)

FieldTypeMeaning
turn_idstring—
root_turn_idoptionalstringOriginating turn in the root thread.
turn_attributionoptionalobjectProvenance of a regular turn.
trace_idoptionalstringTelemetry trace id.
started_atoptionalinteger(Unix seconds)—
model_context_windowinteger | null—
collaboration_mode_kindoptionalenum(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)

FieldTypeMeaning
turn_idstring—
root_turn_idoptionalstring—
last_agent_messagestring | nullFinal assistant text.
erroroptionalobject{message, codex_error_info?} when the turn failed.
started_atoptionalintegerUnix seconds
completed_atoptionalintegerUnix seconds
duration_msoptionalinteger—
time_to_first_token_msoptionalinteger—
{"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)

FieldTypeMeaning
turn_idstring | null—
root_turn_idoptionalstring—
reasonenum(interrupted|replaced|review_ended|budget_limited)—
erroroptionalobject—
started_atoptionalinteger—
completed_atoptionalinteger—
duration_msoptionalinteger—
{"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)

FieldTypeMeaning
infoobject | null{total_token_usage: TokenUsage, last_token_usage: TokenUsage, model_context_window: integer|null}
rate_limitsobject | 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)

FieldTypeMeaning
thread_idoptionalstring(uuid)Owner thread; absent in older histories.
thread_settingsobject{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)

FieldTypeMeaning
threadIdstring(uuid)camelCase field names in this record.
turnIdoptionalstring—
goalobject{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)

FieldTypeMeaning
num_turnsintegerNumber 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

FieldTypeMeaning
thread_idstring(uuid)—
turn_idstring—
itemTurnItemTagged by item.type (PascalCase variant names); see item_completed sub-records.
started_at_msoptionalinteger—
completed_at_msintegerDefaults 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

FieldTypeMeaning
messagestring—
client_idoptionalstring—
imagesoptionalstring[]Image URLs/data URLs.
image_detailsoptionalarray—
file_idsoptionalstring[]—
file_id_detailsoptionalarray—
image_orderoptionalenum(inline|file)[]—
local_imagesstring[]Local image paths (default []).
local_image_detailsoptionalarray—
audiooptionalstring[]—
local_audiostring[]—
text_elementsarray[{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

FieldTypeMeaning
messagestring—
phaseoptionalstring | null—
memory_citationoptionalobject | null—
deliveryoptionalenum(async)—
questionsoptionalarray[{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

FieldTypeMeaning
textstring—
{"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

FieldTypeMeaning
textstring—
{"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

FieldTypeMeaning
targetobject{type: uncommittedChanges | baseBranch{branch} | commit{sha,title} | custom{instructions}}
user_facing_hintoptionalstring—
turn_idoptionalstring—
item_idoptionalstring—
{"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

FieldTypeMeaning
turn_idoptionalstring—
item_idoptionalstring—
review_outputobject | 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

FieldTypeMeaning
call_idstring—
turn_idstringDefault "".
stdoutstring—
stderrstring—
successboolean—
changesobject<path, FileChange>FileChange = {type:add,content} | {type:delete,content} | {type:update,unified_diff,move_path}
statusenum(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

FieldTypeMeaning
call_idstring—
turn_idstring—
invocationobject{server, tool, arguments}
connector_idoptionalstring—
mcp_app_resource_urioptionalstring—
mcp_app_uioptionalobject{resourceUri, preferredModelDisplayMode}
link_idoptionalstring—
app_nameoptionalstring—
action_nameoptionalstring—
plugin_idoptionalstring—
read_only_hintoptionalboolean—
durationobjectRust Duration {secs, nanos}.
resultobjectRust 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

FieldTypeMeaning
call_idstring—
querystring—
actionobjectResponses WebSearchAction (snake_case type).
resultsoptionalany[]—
{"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

FieldTypeMeaning
call_idstring—
statusstring—
revised_promptoptionalstring—
result | fileIdstringFlattened GeneratedImageRef: either result (inline base64) or fileId.
transparent_backgroundoptionalboolean—
failureoptionalobject{type:usageLimitExceeded, limitId, resetsAt}
saved_pathoptionalstring—
input_imagesoptionalarray[{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

FieldTypeMeaning
modelstring | null—
reasoning_effortstring | null—
event_idstring—
occurred_at_msoptionalinteger—
agent_thread_idstring(uuid)Child thread id.
agent_pathstring—
kindenum(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

FieldTypeMeaning
item.typestring"UserMessage"
item.idstring—
item.client_idoptionalstring—
item.contentUserInput[]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

FieldTypeMeaning
item.typestring"AgentMessage"
item.idstring—
item.contentarray[{type:"Text", text}] (PascalCase type).
item.phaseoptionalstring—
item.memory_citationoptionalobject—
item.deliveryoptionalenum(async)—
item.questionsoptionalarray—
{"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

FieldTypeMeaning
item.typestring"Reasoning"
item.idstring—
item.summary_textstring[]—
item.raw_contentstring[]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)

FieldTypeMeaning
item.typestring"Plan"
item.idstring—
item.textstring—
{"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

FieldTypeMeaning
item.typestring"CommandExecution"
item.idstringTool call id.
item.commandstring[]—
item.cwdstring(file URI)PathUri serialized as a URI string.
item.parsed_cmdarray[{type: read{cmd,name,path} | list_files{cmd,path} | search{cmd,query,path} | unknown{cmd}}]
item.sourceenum(agent|user_shell|unified_exec_startup|unified_exec_interaction)—
item.statusenum(in_progress|completed|failed|declined)—
item.aggregated_outputoptionalstringTruncated in the middle to 64 KiB with marker "... command output truncated for persistence ...".
item.exit_codeoptionalinteger—
item.durationoptionalobject{secs, nanos}
item.process_idoptionalstring—
item.interaction_inputoptionalstring—
item.plugin_idoptionalstring—
item.script_pathoptionalstring—
{"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

FieldTypeMeaning
item.typestring"FileChange"
item.idstring—
item.changesobject<path, FileChange>—
item.statusoptionalenum(completed|failed|declined)—
item.auto_approvedoptionalboolean—
item.stdoutoptionalstring—
item.stderroptionalstring—
{"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

FieldTypeMeaning
item.typestring"McpToolCall"
item.idstring—
item.serverstring—
item.toolstring—
item.argumentsany—
item.connectorIdoptionalstring—
item.mcpAppResourceUrioptionalstring—
item.mcpAppUioptionalobject—
item.linkIdoptionalstring—
item.appNameoptionalstring—
item.actionNameoptionalstring—
item.pluginIdoptionalstring—
item.readOnlyHintoptionalboolean—
item.statusenum(inProgress|completed|failed)—
item.resultoptionalobjectCallToolResult {content, structuredContent?, isError?, _meta?}, truncated to 64 KiB.
item.erroroptionalobject{message}
item.durationoptionalobject{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

FieldTypeMeaning
item.typestring"DynamicToolCall"
item.idstring—
item.namespaceoptionalstring—
item.toolstring—
item.argumentsany—
item.statusenum(in_progress|completed|failed)—
item.content_itemsoptionalarray[{type: inputText|inputImage|inputAudio, ...}] (camelCase)
item.successoptionalboolean—
item.erroroptionalstring—
item.durationoptionalobject—
{"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)

FieldTypeMeaning
item.typestring"FunctionCallOutput"
item.idstring—
item.namestring—
item.namespaceoptionalstring—
item.outputstring | arrayFunctionCallOutputBody.
{"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

FieldTypeMeaning
item.typestring"CollabAgentToolCall"
item.idstring—
item.toolenum(spawn_agent|send_input|resume_agent|wait|close_agent|send_message|followup_task|interrupt_agent|list_agents)—
item.statusenum(in_progress|completed|failed|interrupted)—
item.sender_thread_idstring(uuid)—
item.receiver_thread_idsstring[]—
item.receiver_agentsarray[{thread_id, agent_nickname?, agent_role?}]
item.promptoptionalstring—
item.modeloptionalstring—
item.reasoning_effortoptionalstring—
item.agents_statesobject<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

FieldTypeMeaning
item.typestring"SubAgentActivity"
item.idstring—
item.kindenum(started|interacted|interrupted|completed)—
item.agent_thread_idstring(uuid)—
item.agent_pathstring—
item.modelstring | null—
item.reasoning_effortstring | 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

FieldTypeMeaning
item.typestring"WebSearch"
item.idstring—
item.querystring—
item.actionobjectsnake_case WebSearchAction
item.resultsoptionalany[]—
{"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

FieldTypeMeaning
item.typestring"ImageView"
item.idstring—
item.pathstring(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

FieldTypeMeaning
item.typestring"ImageGeneration"
item.idstring—
item.statusstring—
item.revised_promptoptionalstring—
item.resultstringbase64
item.saved_pathoptionalstring—
{"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

FieldTypeMeaning
item.typestring"HookPrompt"
item.idstring—
item.fragmentsarray[{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

FieldTypeMeaning
item.typestring"EnteredReviewMode"
item.idstring—
item.targetobjectReviewTarget (camelCase type)
item.user_facing_hintstring—
{"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

FieldTypeMeaning
item.typestring"ExitedReviewMode"
item.idstring—
item.review_outputobject | 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

FieldTypeMeaning
item.typestring"ContextCompaction"
item.idstring—
{"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 / clock.sleep

The agent slept/waited.

Written when the item completes within a turn.

Stored always (both history modes)

FieldTypeMeaning
item.typestring"Extension"
item.kindstring"clock.sleep"
item.idstring—
item.durationMsinteger—
{"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

FieldTypeMeaning
item.typestring"Extension"
item.kindstring"image_gen.generation"
item.idstring—
item.statusstring—
item.revisedPromptstring | null—
item.result | item.fileIdstringFlattened GeneratedImageRef.
item.transparentBackgroundoptionalboolean | null—
item.failureoptionalobject | null—
item.savedPathoptionalstring—
item.inputImagesoptionalarray[{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.

FieldTypeMeaning
textstring—
{"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.

FieldTypeMeaning
image_urloptionalstringData URL or URL (untagged with file_id).
file_idoptionalstring—
detailoptionalenum(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.

FieldTypeMeaning
audio_urlstring—
{"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.

FieldTypeMeaning
textstring—
annotationsoptionalany[]—
logprobsoptionalany[]—
{"type":"output_text","text":"Done."}

reasoning.summary / summary_text

Readable reasoning summary part.

Written inside the parent record named in type.

FieldTypeMeaning
textstring—
{"type":"summary_text","text":"Inspecting the test."}

reasoning.content / reasoning_text

Raw reasoning text part.

Written inside the parent record named in type.

FieldTypeMeaning
textstring—
{"type":"reasoning_text","text":"..."}

reasoning.content / text

Raw reasoning text part (alternate form).

Written inside the parent record named in type.

FieldTypeMeaning
textstring—
{"type":"text","text":"..."}

agent_message.content / input_text

Plain inter-agent message text.

Written inside the parent record named in type.

FieldTypeMeaning
textstring—
{"type":"input_text","text":"Run the linter."}

agent_message.content / encrypted_content

Encrypted inter-agent message.

Written inside the parent record named in type.

FieldTypeMeaning
encrypted_contentstring—
{"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.

FieldTypeMeaning
textstring—
{"type":"input_text","text":"ok"}

tool output / input_image

Image returned by a tool.

Written inside the parent record named in type.

FieldTypeMeaning
image_url | file_idstring—
detailoptionalstring—
{"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.

FieldTypeMeaning
audio_urlstring—
{"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.

FieldTypeMeaning
encrypted_contentstring—
{"type":"encrypted_content","encrypted_content":"gAAAA..."}

UserMessage.content / text

User text with UI element spans.

Written inside the parent record named in type.

FieldTypeMeaning
textstring—
text_elementsarray[{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.

FieldTypeMeaning
image_url | file_idstring—
detailoptionalstring—
{"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.

FieldTypeMeaning
pathstring—
detailoptionalstring—
{"type":"local_image","path":"/home/user/shot.png"}

UserMessage.content / audio

Audio by URL.

Written inside the parent record named in type.

FieldTypeMeaning
audio_urlstring—
{"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.

FieldTypeMeaning
pathstring—
{"type":"local_audio","path":"/home/user/a.wav"}

UserMessage.content / skill

Explicitly selected skill.

Written inside the parent record named in type.

FieldTypeMeaning
namestring—
pathstring—
{"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.

FieldTypeMeaning
namestring—
pathstring—
{"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.

FieldTypeMeaning
textstring—
{"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.

FieldTypeMeaning
text | imageUrl | audioUrlstring—
{"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.

FieldTypeMeaning
typestringMCP 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>.jsonlMain session transcript: append-only JSONL, one record per line, conversation + metadata records.
~/.claude/projects/<project-key>/<session-id>/subagents/agent-<agent-id>.jsonlSubagent (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.jsonSubagent 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.jsonForked-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.jsonMarker {forkedSkill:true, skillName}.
~/.claude/projects/<project-key>/<session-id>/tool-results/<id>.txtFull 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.jsonMetadata for remote (cloud) agents launched from the session.
~/.claude/projects/<project-key>/<session-id>.ccr-tip.json | .precompact.json | .dir-sync.jsonProject-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.jsonLegacy 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.jsonlGlobal 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>.txtPasted text bodies referenced from history.jsonl pastedContents[].contentHash.
~/.claude/sessions/<pid>.jsonLive-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..

FieldTypeMeaning
typestringRecord discriminator. Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId.
uuidstringUnique 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.
parentUuidstring|nulluuid 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.
logicalParentUuidoptionalstringOn 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.
isSidechainbooleantrue 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.
sessionIdstringSession 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_idoptionalstringDuplicate 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.
timestampstringISO-8601 UTC write time. Applies to conversation records (user, assistant, system, attachment, legacy progress); metadata records carry only type + their own fields + usually sessionId.
versionstringClaude 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.
cwdstringWorking 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.
gitBranchoptionalstringGit 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.
userTypestringAccount 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.
entrypointoptionalstringHow 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.
slugoptionalstringHuman-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.
agentIdoptionalstringSubagent 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.
isMetaoptionalbooleantrue 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.
promptIdoptionalstringId 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.
requestIdoptionalstringAnthropic 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.

FieldTypeMeaning
agentIdoptionalstringSubagent id (17 hex chars) on entries written by/for a subagent; matches the agent-<agentId>.jsonl filename.
cwdstringWorking directory at the time the entry was written (private; absolute path).
entrypointstringHow Claude Code was launched (cli, or sdk/desktop/remote entrypoints).
gitBranchstringGit branch of cwd when written ('' or 'HEAD' outside a branch).
imagePasteIdsoptionalarrayIds of pasted images referenced by the prompt (history pastedContents ids).since 2.1.302
imagePasteIds[]optionalnumberIds of pasted images referenced by the prompt (history pastedContents ids).since 2.1.302
interruptedMessageIdoptionalstringmessage.id of an assistant response that was interrupted by this user entry.
isCompactSummaryoptionalbooleantrue on the user entry that carries the compaction summary text.
isMetaoptionalbooleantrue for system-injected entries not typed by the user (caveats, reminders, hook output, notices).
isSidechainbooleantrue for entries belonging to a subagent (all lines in subagents/agent-*.jsonl); false in the main transcript.
isVisibleInTranscriptOnlyoptionalbooleantrue when the entry is shown in the transcript view but not sent to the model as-is (compact summary).
mcpMetaoptionalobjectMCP tool-result metadata: {_meta?, structuredContent?} copied from the MCP CallToolResult.
mcpMeta._metaoptionalobject—
mcpMeta.structuredContentoptionalobject—
messageobjectAnthropic Messages API message object (role + content + for assistant: id/model/usage/stop fields).
message.contentstring|arrayString (plain prompt or command output) or array of content blocks; see contentBlocks.
message.rolestringMessage role. Values include: user.
originoptionalobjectProvenance of a non-typed or queued prompt: {kind, name?, from?, body?, producer?, runId?, senderTaskId?, handback?, handbackReportText?}.
origin.bodyoptionalstring—
origin.fromoptionalstring—
origin.handbackoptionalboolean—
origin.handbackReportTextoptionalstring—since 2.1.300
origin.kindoptionalstringValues include: human, peer, task-notification, coordinator.
origin.nameoptionalstring—since 2.1.288
origin.produceroptionalstringValues include: session-task.
origin.runIdoptionalstring—since 2.1.293
origin.senderTaskIdoptionalstring—
parentUuidstring|nulluuid of the preceding node in the conversation DAG; null for a chain root (first entry, compact boundary, subagent first entry).
permissionDecisionoptionalobjectPermission decision for the tool call answered by this tool_result: {decision accept|reject, source, reasonType, reasonCode?, ruleSource?, grantScope?, classifierCategory?}.since 2.1.293
permissionDecision.classifierCategoryoptionalstring—since 2.1.309
permissionDecision.decisionoptionalstringValues include: accept, reject.since 2.1.293
permissionDecision.grantScopeoptionalstringValues include: once.since 2.1.307
permissionDecision.reasonCodeoptionalstring—since 2.1.307
permissionDecision.reasonTypeoptionalstringValues include: classifier, mode, other, rule, subcommandResults, safetyCheck.since 2.1.293
permissionDecision.ruleSourceoptionalstringValues include: localSettings.since 2.1.307
permissionDecision.sourceoptionalstringValues include: config, user_temporary, user_reject.since 2.1.293
permissionModeoptionalstringPermission mode in force when the prompt was submitted (default/acceptEdits/plan/auto/bypassPermissions...). Values include: auto.
promptIdoptionalstringId grouping all entries produced in response to one user prompt.
promptSourceoptionalstringHow the prompt arrived (typed, queued, system...). Values include: typed, system, queued.
queueSkipAttachmentsoptionalbooleanQueued prompt delivered without re-running attachment collection.
queueSkipSlashCommandsoptionalbooleanQueued prompt delivered without slash-command expansion.since 2.1.300
queueTranscriptOnlyoptionalbooleanQueued prompt recorded in the transcript only.since 2.1.296
repeatsCompactSummaryoptionalbooleanEntry repeats an earlier compact summary.since 2.1.296
sandboxedoptionalbooleanWhether the tool call ran under the OS sandbox.since 2.1.307
serverClassifierContextoptionalobjectAuto-mode safety-classifier context sent with the request: {request, context:{git_state, live_cwd, platform}}.
serverClassifierContext.contextoptionalobject—
serverClassifierContext.context.git_stateoptionalobject—
serverClassifierContext.context.live_cwdoptionalstring—
serverClassifierContext.context.platformoptionalstring—
serverClassifierContext.requestoptionalstring—
sessionIdstringSession UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id.
session_idoptionalstringDuplicate snake_case session id stamped on some records (Values include on assistant/user/attachment/stop_hook_summary). Same value as sessionId.
slugoptionalstringHuman-readable session slug (three-word style). Present on a subset of entries.
sourceToolAssistantUUIDoptionalstringuuid of the assistant line containing the tool_use this tool_result answers.
sourceToolUseIDoptionalstringtool_use id that caused this entry (e.g. skill/command expansion).
summarizedTurnPromptUuidsoptionalarrayPrompt uuids folded into a summarize-from-here (/rewind summarize) entry.since 2.1.305
summarizedTurnPromptUuids[]optionalstringPrompt uuids folded into a summarize-from-here (/rewind summarize) entry.since 2.1.305
timestampstringISO-8601 UTC write time.
toolDenialKindoptionalstringWhy a tool call was denied (user-rejected, automode-blocked, permission-rule, automode-unavailable...). Values include: user-rejected, automode-blocked, permission-rule, automode-unavailable.
toolEndsTurnoptionalbooleanThe tool result ends the turn (e.g. handback).since 2.1.288
turnCompanionoptionalbooleanEntry accompanies a turn without being a turn itself.
turnOriginoptionalstringOrigin of the turn (human, peer, task_notification...). Values include: human, peer, task_notification.
turnPositionoptionalobject{promptIndex, turnIndex} position of a human turn.
turnPosition.promptIndexoptionalnumber—
turnPosition.turnIndexoptionalnumber—
userFeedbackoptionalstringFree-text feedback attached to a rejection.since 2.1.296
userTypestringAccount class; 'external' for public users ('ant' is internal). Values include: external.
uuidstringUnique id of this transcript node (UUID v4). Target of parentUuid links.
versionstringClaude 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).

FieldTypeMeaning
advisorModeloptionalstringAdvisor (server-side advisor tool) model id configured for this response.
agentIdoptionalstringSubagent id (17 hex chars) on entries written by/for a subagent; matches the agent-<agentId>.jsonl filename.
apiBlockIndexoptionalnumberIndex of this line's content block within the streamed API response (0-based).
attributionAgentoptionalstringAgent type attribution for the response (for subagents).
attributionMcpServeroptionalstringMCP server attribution for the response.
attributionMcpTooloptionalstringMCP tool attribution.
attributionPluginoptionalstringPlugin attribution.since 2.1.310
attributionSkilloptionalstringSkill attribution.
cwdstringWorking directory at the time the entry was written (private; absolute path).
effortoptionalstringEffort level of the request (low/medium/high/xhigh/max). Values include: medium.
entrypointstringHow Claude Code was launched (cli, or sdk/desktop/remote entrypoints).
erroroptionalstringAPI error class on a synthetic error assistant message (server_error, authentication_failed, rate_limit...). Values include: server_error, authentication_failed.
gitBranchstringGit branch of cwd when written ('' or 'HEAD' outside a branch).
isApiErrorMessageoptionalbooleantrue on a synthetic assistant message that reports an API error.
isSidechainbooleantrue for entries belonging to a subagent (all lines in subagents/agent-*.jsonl); false in the main transcript.
messageobjectAnthropic Messages API message object (role + content + for assistant: id/model/usage/stop fields).
message.containernullAPI container field (null).
message.contentarrayString (plain prompt or command output) or array of content blocks; see contentBlocks.
message.context_managementnullAPI context-management response field (null when no edits applied).
message.diagnosticsnull|objectAPI diagnostics; cache_miss_reason {type, cache_missed_input_tokens} when the prompt cache missed.
message.diagnostics.cache_miss_reasonoptionalobject—
message.diagnostics.cache_miss_reason.cache_missed_input_tokensoptionalnumber—
message.diagnostics.cache_miss_reason.typeoptionalstringRecord discriminator. Values include: tools_changed, previous_message_not_found, unavailable, messages_changed.
message.idstringAPI message id ('msg_...'). Shared by every line split from one streamed response.
message.input_transformationsoptionalarrayClient-side transformations applied to the request input, e.g. {type:thinking_dropped, reason:prefix_binding_mismatch, path}.
message.input_transformations[]optionalobject—
message.input_transformations[].pathoptionalstring—
message.input_transformations[].reasonoptionalstringValues include: prefix_binding_mismatch.
message.input_transformations[].typeoptionalstringRecord discriminator. Values include: thinking_dropped.
message.modelstringModel id that produced the response. Values include: claude-opus-5-5, claude-sonnet-5-5.
message.rolestringMessage role. Values include: assistant.
message.stop_detailsnullAPI stop details object or null.
message.stop_reasonstring|nullAPI 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_sequencenull|stringMatched stop sequence or null.
message.typestringAlways 'message'. Values include: message.
message.usageobjectToken usage for the whole API response (repeated identically on every split line).
message.usage.cache_creationobject—
message.usage.cache_creation.ephemeral_1h_input_tokensnumber—
message.usage.cache_creation.ephemeral_5m_input_tokensnumber—
message.usage.cache_creation_input_tokensnumber—
message.usage.cache_read_input_tokensnumber—
message.usage.fallback_creditoptionalnull—since 2.1.285
message.usage.inference_geostring|nullValues include: global, not_available.
message.usage.input_tokensnumber—
message.usage.iterationsoptionalarray|null—
message.usage.iterations[]optionalobject—
message.usage.output_tokensnumber—
message.usage.output_tokens_detailsoptionalobject|null—
message.usage.output_tokens_details.thinking_tokensoptionalnumber—
message.usage.server_tool_useoptionalobject—
message.usage.server_tool_use.web_fetch_requestsoptionalnumber—
message.usage.server_tool_use.web_search_requestsoptionalnumber—
message.usage.service_tierstring|nullValues include: standard.
message.usage.speedoptionalstring|nullValues include: standard.
parentUuidstring|nulluuid of the preceding node in the conversation DAG; null for a chain root (first entry, compact boundary, subagent first entry).
perTurnEffortoptionalstringEffort level chosen for this turn. Values include: medium.
requestIdoptionalstringAnthropic API request id ('req_...') of the response this assistant line came from.
requestRefoptionalstringid of the api-request record that produced this response (since 2.1.300).since 2.1.300
requestedModeloptionalstringModel requested before any fallback/alias resolution.since 2.1.295
serverClassifierRequestoptionalstringOpaque classifier request reference on assistant lines.
sessionIdstringSession UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id.
session_idoptionalstringDuplicate snake_case session id stamped on some records (Values include on assistant/user/attachment/stop_hook_summary). Same value as sessionId.
slugoptionalstringHuman-readable session slug (three-word style). Present on a subset of entries.
thinkingDisplayoptionalstringThinking display mode ('updates' = thinking text summarised/omitted, signature kept). Values include: updates.since 2.1.296
thinkingDurationMsoptionalnumberWall time spent in thinking for this response.since 2.1.287
timestampstringISO-8601 UTC write time.
truncatedAfterOutputoptionalbooleanResponse truncated after output was produced.since 2.1.302
userTypestringAccount class; 'external' for public users ('ant' is internal). Values include: external.
uuidstringUnique id of this transcript node (UUID v4). Target of parentUuid links.
versionstringClaude Code version string that wrote the entry (semver).
wireIngestContextoptionalobjectMap tool_use id -> {cwd} context captured when the tool input was ingested.
wireIngestContext.<dynamic-key>optionalobject—
wireIngestContext.<dynamic-key>.cwdoptionalstringWorking directory at the time the entry was written (private; absolute path).
wireToolInputsoptionalobjectMap 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.

FieldTypeMeaning
durationMsnumber—
messageCountnumber—
pendingBackgroundAgentCountoptionalnumber—
subtypestringSystem-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.

FieldTypeMeaning
hasOutputboolean—
hookAdditionalContextarray—
hookCountnumber—
hookErrorsarray—
hookInfosarray—
hookInfos[]optionalobject—
hookInfos[].commandoptionalstring—
hookInfos[].durationMsoptionalnumber—
levelstringValues include: suggestion.
preventedContinuationboolean—
stopReasonstring—
subtypestringSystem-record sub-discriminator.
toolUseIDstring—
{"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.

FieldTypeMeaning
contentstring—
subtypestringSystem-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.

FieldTypeMeaning
compactMetadataobject—
compactMetadata.cumulativeDroppedTokensnumber—
compactMetadata.durationMsnumber—
compactMetadata.postTokensnumber—
compactMetadata.preCompactArtifactReadVersionsoptionalarray—since 2.1.296
compactMetadata.preCompactDiscoveredToolsoptionalarray—
compactMetadata.preTokensnumber—
compactMetadata.preservedMessagesobject—
compactMetadata.preservedMessages.allUuidsarray—
compactMetadata.preservedMessages.anchorUuidstring—
compactMetadata.preservedMessages.uuidsarray—
compactMetadata.preservedSegmentobject—
compactMetadata.preservedSegment.anchorUuidstring—
compactMetadata.preservedSegment.headUuidstring—
compactMetadata.preservedSegment.tailUuidstring—
compactMetadata.triggerstringValues include: auto, manual.
contentstring—
levelstringValues include: info.
logicalParentUuidstringOn compact_boundary: the uuid of the last pre-compaction node, preserving logical continuity while parentUuid is null.
subtypestringSystem-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.

FieldTypeMeaning
commandRunoptionalobject—
commandRun.argsoptionalstring—
commandRun.commandoptionalstring—
contentstring—
levelstringValues include: info.
subtypestringSystem-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).

FieldTypeMeaning
contentstring—
levelstringValues include: notice.
subtypestringSystem-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_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.

FieldTypeMeaning
attachmentobject—
attachment.addedLinesarray—
attachment.addedTypesarray—
attachment.builtInPluginTypesoptionalarray—since 2.1.304
attachment.builtInTypesoptionalarray—since 2.1.285
attachment.isInitialboolean—
attachment.removedTypesarray—
attachment.showConcurrencyNoteboolean—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.autoModeConsentFlowboolean—
attachment.bashFirstboolean—
attachment.bashFirstSteerstring—
attachment.bypassboolean—
attachment.finishExposedWorkoptionalboolean—since 2.1.307
attachment.steerOnlyboolean—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.allowedToolsarray—
attachment.typestringRecord 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.

FieldTypeMeaning
attachmentobject—
attachment.displayPathstring—
attachment.filenamestring—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.296
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.organizationUuidstring—
attachment.typestringRecord 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.

FieldTypeMeaning
attachmentobject—
attachment.datestring—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.addedLinesarray—
attachment.addedNamesarray—
attachment.failedMcpServersoptionalarray—
attachment.failedMcpServers[]optionalobject—
attachment.pendingMcpServersoptionalarray—
attachment.readdedNamesarray—
attachment.removedNamesarray—
attachment.surfacedDefinitionsoptionalarray—
attachment.surfacedDefinitions[]optionalobject—
attachment.surfacedNamesoptionalarray—
attachment.typestringRecord discriminator.
attachment.wireHiddenNamesarray—
renderedarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.entriesarray—
attachment.entries[]optionalobject—
attachment.nameOnlyAnnouncementsoptionalarray—
attachment.toolInputCopiesoptionalarray—
attachment.toolInputCopies[]optionalobject—
attachment.typestringRecord 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.

FieldTypeMeaning
attachmentobject—
attachment.filenamestring—
attachment.snippetstring—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.changesoptionalarray—
attachment.changes[]optionalobject—
attachment.snapshotobject—
attachment.snapshot.additionalWorkingDirectoriesarray—
attachment.snapshot.isGitRepoboolean—
attachment.snapshot.isWorktreeboolean—
attachment.snapshot.osVersionstring—
attachment.snapshot.platformstring—
attachment.snapshot.scratchpadDirectoryoptionalstring—
attachment.snapshot.shellstring—
attachment.snapshot.workingDirectorystring—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.contentobject—
attachment.content.fileobject—
attachment.content.typestringRecord discriminator. Values include: text.
attachment.displayPathstring—
attachment.filenamestring—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.296
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.contentarray—
attachment.hookEventstringValues include: SessionStart.
attachment.hookNamestringValues include: SessionStart.
attachment.toolUseIDstring—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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

FieldTypeMeaning
attachmentobject—
attachment.commandstring—
attachment.contentstring—
attachment.durationMsnumber—
attachment.exitCodenumber—
attachment.hookEventstringValues include: SessionStart.
attachment.hookNamestringValues include: SessionStart:startup, SessionStart:clear, SessionStart:compact, SessionStart:resume.
attachment.stderrstring—
attachment.stdoutstring—
attachment.toolUseIDstring—
attachment.typestringRecord discriminator.
renderedoptionalarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.changedoptionalboolean—
attachment.filesarray—
attachment.files[]optionalobject—
attachment.reasonoptionalstringValues include: compaction, session_start.
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.skillsarray—
attachment.skills[]optionalobject—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.296
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.addedBlocksarray—
attachment.addedNamesarray—
attachment.removedNamesarray—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.identityobject—
attachment.identity.knowledgeCutoffstring—
attachment.identity.marketingNamestring—
attachment.identity.modelIdstring—
attachment.textstring—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.contentobject—
attachment.content.contentstring—
attachment.content.contentDiffersFromDiskboolean—
attachment.content.pathstring—
attachment.content.typestringRecord discriminator. Values include: Project.
attachment.displayPathstring—
attachment.pathstring—
attachment.typestringRecord discriminator.
renderedarray—
renderedRolestring—
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.cliPrefixoptionalstring—
attachment.contextRenderingstring—
attachment.echoWireToolInputsboolean—
attachment.inlineToolsoptionalboolean—
attachment.keptRemindersoptionalboolean—
attachment.reminderFoldboolean—
attachment.systemPromptarray—
attachment.systemTurnsoptionalboolean—
attachment.toolChangeHeaderoptionalboolean—
attachment.toolsoptionalarray—
attachment.tools[]optionalobject—
attachment.typestringRecord 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.

FieldTypeMeaning
attachmentobject—
attachment.commandModeoptionalstringValues include: task-notification, prompt.
attachment.delivery_idoptionalstring—since 2.1.287
attachment.humanTurnoptionalboolean—
attachment.isMetaoptionalbooleantrue for system-injected entries not typed by the user (caveats, reminders, hook output, notices).
attachment.originoptionalobjectProvenance of a non-typed or queued prompt: {kind, name?, from?, body?, producer?, runId?, senderTaskId?, handback?, handbackReportText?}.
attachment.origin.bodyoptionalstring—
attachment.origin.fromoptionalstring—
attachment.origin.handbackoptionalboolean—
attachment.origin.handbackReportTextoptionalstring—since 2.1.300
attachment.origin.kindoptionalstringValues include: task-notification, human, peer, coordinator.
attachment.origin.nameoptionalstring—since 2.1.288
attachment.origin.produceroptionalstringValues include: session-task.
attachment.origin.senderTaskIdoptionalstring—
attachment.promptstring—
attachment.reminderIdoptionalstring—since 2.1.288
attachment.runIdoptionalstring—since 2.1.293
attachment.source_uuidstring—
attachment.timestampoptionalstringISO-8601 UTC write time.
attachment.typestringRecord discriminator.
attachment.usageoptionalobject—
attachment.usage.durationMsoptionalnumber—
attachment.usage.toolUsesoptionalnumber—
attachment.usage.totalTokensoptionalnumber—
renderedarray—
renderedInHumanTurnoptionalarray—
renderedInHumanTurn[]optionalobject—
renderedInHumanTurn[].contentoptionalstring—
renderedRoleoptionalstring—since 2.1.287
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.bannerstring—
attachment.toolUseIDstring—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.295
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.contextobject—
attachment.context.gitStatusoptionalstring—
attachment.context.userEmailstring—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.textstring—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.contentstring—
attachment.digestsoptionalarray—since 2.1.304
attachment.isInitialboolean—
attachment.namesarray—
attachment.skillCountnumber—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.deltaSummarynull—
attachment.descriptionstring—
attachment.outputFilePathstring—
attachment.shellobject—
attachment.shell.commandstring—
attachment.shell.kindstringValues include: monitor.
attachment.shell.toolUseIdstring—
attachment.statusstringValues include: running.
attachment.taskIdstring—
attachment.taskTypestring—
attachment.typestringRecord discriminator.
renderedarray—
renderedRolestring—
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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.

FieldTypeMeaning
attachmentobject—
attachment.blockHashesarray—
attachment.clientChangeobject—
attachment.clientChange.baselinestring—
attachment.clientChange.callNumbernumber—
attachment.clientChange.firstChangedMessageIndexnumber—
attachment.clientChange.kindsstring—
attachment.firstReportForThreadInProcessboolean—
attachment.modelstring—
attachment.newlyDroppedobject—
attachment.newlyDropped.blockCountnumber—
attachment.newlyDropped.firstobject—
attachment.newlyDropped.lastobject—
attachment.newlyDropped.reasonstringValues include: prefix_mismatch.
attachment.newlyDropped.reasonCountsobject—
attachment.newlyDropped.turnCountnumber—
attachment.querySourcestring—
attachment.requestIdstringAnthropic API request id ('req_...') of the response this assistant line came from.
attachment.thinkingBlocksSentnumber—
attachment.thinkingTurnsSentnumber—
attachment.typestringRecord 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.

FieldTypeMeaning
attachmentobject—
attachment.textstring—
attachment.typestringRecord discriminator.
renderedarray—
renderedRoleoptionalstring—since 2.1.285
rendered[]optionalobject—
rendered[].contentoptionalstring—
{"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

FieldTypeMeaning
dataobjectProgress payload discriminated by data.type.
toolUseIDoptionalstringtool_use id the progress belongs to.
parentToolUseIDoptionalstringParent 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).

FieldTypeMeaning
aiTitlestring—
sessionIdstringSession 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.

FieldTypeMeaning
explicitoptionalboolean—
lastPromptoptionalstring—
leafUuidstring—
sessionIdstringSession 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.

FieldTypeMeaning
modestringValues include: normal.
sessionIdstringSession 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.

FieldTypeMeaning
permissionModestringPermission mode in force when the prompt was submitted (default/acceptEdits/plan/auto/bypassPermissions...). Values include: auto.
sessionIdstringSession 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.

FieldTypeMeaning
atisstring—
sessionIdstringSession 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.

FieldTypeMeaning
sessionIdstringSession id.
totalCostUSDnumberEstimated cumulative USD cost.
totalAPIDurationnumberms spent in API calls incl. retries.
totalAPIDurationWithoutRetriesnumberms in API calls excluding retries.
totalToolDurationnumberms spent executing tools.
totalLinesAddednumberLines added by edits.
totalLinesRemovednumberLines removed.
totalDurationnumberSession wall ms.
startTimenumberEpoch ms of session start.
modelUsage.<model>object{inputTokens, outputTokens, thinkingTokens?, cacheReadInputTokens, cacheCreationInputTokens, webSearchRequests, costUSD} per model id.
hasUnknownModelCostoptionalbooleanA 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.

queue-operation

Prompt-queue journal: a prompt was enqueued, dequeued or removed while Claude was busy.

Written on queue changes.

FieldTypeMeaning
commandUuidoptionalstring—
contentoptionalstring—
deliveryIdoptionalstring—
operationstringValues include: enqueue, dequeue, remove.
reasonoptionalstringValues include: absorbed_mid_turn, delivered_to_agent.
sessionIdstringSession UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id.
timestampstringISO-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).

FieldTypeMeaning
isSnapshotUpdateboolean—
messageIdstring—
snapshotobject—
snapshot.messageIdstring—
snapshot.timestampstringISO-8601 UTC write time.
snapshot.trackedFileBackupsobject—
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.

FieldTypeMeaning
backupobject—
backup.backupFileNamenull|string—
backup.backupTimestring—
backup.realParentDirstring—
backup.versionnumberClaude Code version string that wrote the entry (semver).
messageIdstring—
snapshotMessageIdstring—
timestampstringISO-8601 UTC write time.
trackingPathstring—
{"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).

FieldTypeMeaning
agentIdoptionalstringSubagent id (17 hex chars) on entries written by/for a subagent; matches the agent-<agentId>.jsonl filename.
baseoptionalstring—
cacheControlarray—
cacheControl[]optionalobject—
cacheControl[].pathoptionalarray—
cacheControl[].valueoptionalobject—
idstring—
keepnumber—
paramsobject—
params.betasarray—
params.context_managementobject—
params.context_management.editsarray—
params.max_tokensnumber—
params.modelstringValues include: claude-opus-5-5, claude-sonnet-5-5.
params.output_configobject—
params.output_config.effortstringEffort level of the request (low/medium/high/xhigh/max). Values include: medium.
params.safeguardsoptionalarray—
params.safeguards[]optionalobject—
params.thinkingobject—
params.thinking.displaystringValues include: updates.
params.thinking.typestringRecord discriminator. Values include: adaptive.
querySourcestringValues include: repl_main_thread, agent:builtin:general-purpose, agent:builtin:Explore, agent:custom, agent:custom:<plugin-agent>.
requestDigeststring—
sessionIdstringSession UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id.
shapeHashstring—
tailarray—
tail[]optionalstring—
timestampstringISO-8601 UTC write time.
versionstringClaude 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.

FieldTypeMeaning
agentIdoptionalstringSubagent id (17 hex chars) on entries written by/for a subagent; matches the agent-<agentId>.jsonl filename.
hashstring—
messageobjectAnthropic Messages API message object (role + content + for assistant: id/model/usage/stop fields).
message.contentarray|stringString (plain prompt or command output) or array of content blocks; see contentBlocks.
message.output_configoptionalobject—
message.output_config.effortoptionalstringEffort level of the request (low/medium/high/xhigh/max).
message.rolestringMessage role. Values include: system, assistant, user.
sessionIdstringSession 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.

FieldTypeMeaning
agentIdoptionalstringSubagent id (17 hex chars) on entries written by/for a subagent; matches the agent-<agentId>.jsonl filename.
sessionIdstringSession UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id.
shapeobject—
shape.systemarray—
shape.system[]optionalobject—
shape.toolsarray—
shape.tools[]optionalobject—
shapeHashstring—
timestampstringISO-8601 UTC write time.
versionstringClaude 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.

FieldTypeMeaning
agentIdstringSubagent id (17 hex chars) on entries written by/for a subagent; matches the agent-<agentId>.jsonl filename.
contextLengthnumber—
parentLastUuidstring—
parentSessionIdstring—
{"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.

artifact-comment-monitor

State of armed artifact comment watchers, keyed by artifact id.

Written when watchers change.

FieldTypeMeaning
artifactsobject—
artifacts.<dynamic-key>object—
artifacts.<dynamic-key>.statestring—
artifacts.<dynamic-key>.titlestring—
artifacts.<dynamic-key>.writtenAtMsnumber—
sessionIdstringSession UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id.
vnumber—
{"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.

FieldTypeMeaning
accountUuidstring—
artifactsobject—
artifacts.<dynamic-key>object—
artifacts.<dynamic-key>.everBaselinedboolean—
artifacts.<dynamic-key>.everHadThreadsboolean—
artifacts.<dynamic-key>.savedAtnumber—
artifacts.<dynamic-key>.stampHighWaterstring—
artifacts.<dynamic-key>.threadsarray—
artifacts.<dynamic-key>.turnTimestampsarray—
sessionIdstringSession UUID. Equals the transcript filename stem in main files; in subagent files it is the PARENT session id.
vnumber—
{"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

FieldTypeMeaning
summarystringSummary text.
leafUuidstringLeaf 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

FieldTypeMeaning
customTitlestringTitle; empty string clears.
sessionIdstring—
{"type":"custom-title","customTitle":"Docs work","sessionId":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"}

tag

Session tag.

Stored only only when the feature is used

FieldTypeMeaning
tagstring—
sessionIdstring—
{"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

FieldTypeMeaning
agentNamestring—
sessionIdstring—
{"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

FieldTypeMeaning
agentColorstring—
sessionIdstring—
{"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

FieldTypeMeaning
agentSettingstring—
sessionIdstring—
{"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

FieldTypeMeaning
relocatedCwdstringNew working directory.
sessionIdstring—
{"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

FieldTypeMeaning
sessionIdstring—
timestampstring—
{"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

FieldTypeMeaning
sessionIdstring—
continuedInSessionIdstringSuccessor session id.
timestampstring—
{"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

FieldTypeMeaning
worktreeSessionobject|nullWorktree session descriptor (path/branch...); shape not established.
sessionIdstring—
{"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

FieldTypeMeaning
sidestring—
sessionIdstring—
{"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

FieldTypeMeaning
folderstring—
sessionIdstring—
{"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

FieldTypeMeaning
modeenum(on,off)—
afterUuidstring|nullNode after which the mode applies.
timestampstring—
reasonoptionalenum(paused,account_off,account_read_only,session_shape,server_off)—
accountoptionalstring—
accountChoiceoptionalenum(on,read_only,off)—
sessionIdstring—
{"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

FieldTypeMeaning
bridgeSessionIdstringRemote session id ('' clears).
lastSequenceNumnumber—
declaredDialogKindsoptionalarray—
sessionGroupingIdoptionalstring—
noHistoryBackfilloptionalboolean—
ownerAccountUuidoptionalstring—
ownerOrganizationUuidoptionalstring—
sessionIdstring—
{"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

FieldTypeMeaning
causestringe.g. 'migration', 'fork_inherit'.
vetoedAgainstAccountUuidoptionalstring—
tsstringISO time.
sessionIdstring—
{"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

FieldTypeMeaning
messageIdstring—
(other)optionalobjectAttribution 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

FieldTypeMeaning
sessionIdstring—
agentIdoptionalstringRoutes replacement to a subagent.
replacementsarrayReplacement 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

FieldTypeMeaning
timestampstring—
(observer fields)optionalobjectSpread 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[]

FieldTypeMeaning
textstring—
{"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)

FieldTypeMeaning
signaturestring—
thinkingstring—
{"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)

FieldTypeMeaning
calleroptionalobject—
caller.typeoptionalstringRecord discriminator. Values include: direct.
idstring—
inputobject—
namestring—
{"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[]

FieldTypeMeaning
contentstring|array—
content[]optionalobject—
content[].sourceoptionalobject—
content[].textoptionalstring—
content[].tool_nameoptionalstring—
content[].typeoptionalstringRecord discriminator.
is_erroroptionalboolean—
tool_use_idstring—
{"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[]

FieldTypeMeaning
sourceobject—
source.datastring—
source.media_typestring—
source.typestringRecord 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[]

FieldTypeMeaning
tool_namestring—
{"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[]

FieldTypeMeaning
textstring—
{"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)

FieldTypeMeaning
toolobject—
tool.definitionobject—
tool.definition.descriptionstring—
tool.definition.eager_input_streamingboolean—
tool.definition.input_schemaobject—
tool.definition.namestring—
tool.typestringRecord 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.jsonListing 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.jsonUp-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>.jsonlLossy, 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>.jsonlSame 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>.txtShell 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..

FieldTypeMeaning
blobs.idstring (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.databytesPayload. 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.

FieldTypeMeaning
agentIdstring (uuid)Chat id; equals the chat folder name.
latestRootBlobIdstring (64 hex) | ''Blob id of the current ConversationStateStructure root. Empty string when the chat never got a checkpoint.
namestringChat title; default 'New Agent'; forks get '<name> (forked)'.
createdAtnumber (ms epoch)Creation time (readers normalise seconds/micro/nanoseconds too).
modeenum(default|plan|debug|search)UI mode; legacy 'auto-run' is read as default + isRunEverything=true. Values include default, search.
isRunEverythingbooleanAuto-run/yolo flag.
approvalModeoptionalenum(allowlist|unrestricted|auto-review)Approval policy. Values include unrestricted.
lastUsedModeloptionalstringModel id last used.
lastDebugServerPortoptionalintegerDebug-mode server port.
currentPlanUrioptionalstringPlan file URI in plan mode.
subagentInfooptionalobject {parentAgentId, rootParentAgentId, toolCallId, typeName}Set when this store belongs to a subagent run with its own store.
blobEncryptionKeyoptionalstring (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.

FieldTypeMeaning
1 root_prompt_messages_jsonoptionalrepeated 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 turnsoptionalrepeated bytes (blob ids)Ordered ids of ConversationTurnStructure blobs (UI/turn view).
3 todosoptionalrepeated bytes (blob ids)TodoItem blobs.
4 pending_tool_callsoptionalrepeated stringTool call ids still awaiting a result.
5 token_detailsoptionalConversationTokenDetails {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 summaryoptionalbytes (blob id)ConversationSummary blob {1 summary string}.
7 planoptionalbytes (blob id)Plan blob; payload type not traced (opaque).
9 previous_workspace_urisoptionalrepeated stringWorkspace URIs used earlier.
10 modeoptionalenum AgentModeAGENT_MODE_{UNSPECIFIED=0,AGENT=1,ASK=2,PLAN=3,DEBUG=4,TRIAGE=5,MULTITASK=7,CUSTOM=8}.
11 summary_archiveoptionalbytes (blob id)Legacy single archive pointer.
12 file_statesoptionalmap<string path, bytes blob id>Legacy file snapshot map.
13 summary_archivesoptionalrepeated bytes (blob ids)ConversationSummaryArchive blobs, one per compaction.
14 turn_timingsoptionalrepeated StepTiming {1 duration_ms u64, 2 timestamp_ms u64}Per-turn timings.
15 file_states_v2optionalmap<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_statesoptionalmap<string subagentId, SubagentPersistedState>Inline subagent conversations (each has its own nested ConversationStateStructure).
17 self_summary_countoptionaluint32Number of self-summarisations.
18 read_pathsoptionalrepeated stringPaths the agent has read (contains user paths).
19 active_branch_nameoptionalstring—
20 plansoptionalmap<string, PlanRegistryEntry {1 id, 2 path}>—
21 tracked_git_repo_branchesoptionalrepeated TrackedGitRepo {1 repo_path, 2 branch_name}—
22 agent_typeoptionalstringValues 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_idoptionalvariousProgress-update tool state (cloud/background agents).
24 subagent_threadsoptionalmap<string,string>—
26 conversation_started_timestamp_msoptionaluint64—
27 conversation_started_time_zoneoptionalstringIANA zone.
30 subagent_runs_by_parent_tool_call_idoptionalmap<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_refsoptionalmap<string subagentId, bytes blob id>Out-of-line SubagentPersistedState blobs (newer alternative to field 16).
32 goal_stateoptionalGoalState—
33 is_root_project_conversationoptionalbool—
34 completed_ask_question_tool_call_idsoptionalrepeated string—
35 durable_skill_blocks / 36 durable_custom_mode_idoptionalrepeated string / string—
37 message_count_at_last_compactionoptionaluint32—
38 recent_user_message_ids / 39 recent_user_message_ids_older_turn_countoptionalrepeated string / uint32—
40 turn_telemetryoptionalTurnTelemetryState {completed_turn_count_capped, last_completed_turn_timestamp_ms?}—
42 mentioned_agent_idsoptionalrepeated string—
2 (unknown)optionallength-delimitedField 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.

FieldTypeMeaning
1 agent_conversation_turn.1 user_messagebytes (blob id)UserMessage blob.
…2 stepsoptionalrepeated bytes (blob ids)ConversationStep blobs in order.
…3 request_idoptionalstring (uuid)Server request id; matches JSON user message providerOptions.cursor.requestId.
…4 encrypted_modeloptionalstringOpaque encrypted model identifier (258/263 turns).
…5 dynamic_tool_count / 9 dynamic_tool_namesoptionaluint32 / repeated string—
…6 send_message_step_indices / 13 assistant_text_step_indices / 14 assistant_text_steps_recordedoptionalrepeated uint32 / boolIndices into steps.
…7 routed_model_display_nameoptionalstringDisplay name when auto-routed.
…8 subagent_dispatch_stepsoptionalrepeated SubagentDispatchStep {step_index, tool_call_id, tool, backgrounded}—
…10 user_message_idoptionalstring—
…11 long_reasoning_reminder / 12 long_reasoning_reminder_exposure_loggedoptionalmessage / 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

FieldTypeMeaning
2 shell_conversation_turn.1 shell_commandbytes (blob id)ShellCommand {1 command string}.
…2 shell_outputbytes (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.

FieldTypeMeaning
1 textstringRaw prompt text (without the <user_query> wrapper used in the JSON prompt message).
2 message_idstring (uuid)—
3 selected_contextoptionalSelectedContextAttached 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 modeenum AgentModeValues include AGENT, ASK.
5 is_simulated_msg / 9 simulated_msg_reason / 15 simulated_message_metadataoptionalbool / enum SimulatedMsgReason (35 values) / messageSystem-injected 'user' messages (e.g. BACKGROUND_TASK_COMPLETION, PLAN_EXECUTION, USER_QUEUED_TO_SUBAGENT, GOAL_CONTINUATION).
10 conversation_state_blob_idbytes (blob id)Root checkpoint as it was before this turn; used as the rewind anchor.
17 thread_idoptionalstring—
18 text_blob_id / 19 rich_text_blob_idoptionalbytes (blob id)Out-of-line large text.
8 rich_textoptionalstring—
21 hook_additional_contextsoptionalrepeated HookAdditionalContext {hook_event_name, content}Context added by hooks.
24 turn_steeroptionalboolMessage sent while the agent was running (steering).
25 started_at_ms / 26 completed_at_msoptionaluint64—
27 sent_by_agent_id / 29 sender / 28 sent_by_voice_call / 30 forked_context / 31 reply_tooptionalvariousAgent-to-agent and multi-agent provenance.
6,7,11,13,14,16,22,23optionalvariousbest_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.

FieldTypeMeaning
1 assistant_message.1 textstring—
…2 started_at_ms / 3 completed_at_msoptionaluint64—
(protobuf) {assistant_message:{text:"Done."}}

blob: agent.v1.ConversationStep / thinking_message

A reasoning step as shown in the UI.

Written per reasoning block.

FieldTypeMeaning
3 thinking_message.1 textstringOften empty or summary text when the provider redacts reasoning.
…2 duration_msuint32—
…3 started_at_ms / 4 completed_at_msoptionaluint64—
(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.

FieldTypeMeaning
2 tool_call.<case>oneof toolOne 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>.resultoptionaloneof resultTypical cases: success | error | rejected | failure | timeout | spawn_error | permission_denied (shell). Absent while pending.
…57 tool_call_idoptionalstringe.g. 'tool_<uuid>'; equals JSON tool-call toolCallId.
…59 started_at_ms / 60 completed_at_msoptionaluint64—
…54 hook_additional_contextsoptionalrepeated 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

FieldTypeMeaning
1 idstring—
2 contentstring—
3 statusenum TodoStatus(UNSPECIFIED,PENDING,IN_PROGRESS,COMPLETED,CANCELLED)—
4 created_at / 5 updated_atint64 ms—
6 dependenciesoptionalrepeated 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

FieldTypeMeaning
1 summarystring—
(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

FieldTypeMeaning
1 summarized_messagesrepeated bytes (blob ids)The JSON prompt-message blobs that were compacted away.
2 summarystring—
3 window_tailuint32Number of trailing messages kept.
4 summary_messagebytes (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

FieldTypeMeaning
1 conversation_stateConversationStateStructureSame structure as the parent; its blob ids live in the parent's store.db.
2 created_timestamp_ms / 3 last_used_timestamp_msuint64—
4 subagent_typeSubagentType (oneof type: unspecified | custom{name} | …)—
5 model_idoptionalstring—
6 environmentSubagentExecutionEnvironment—
7 cloud_subagentoptionalCloudSubagentReference {bc_id, transcript_path?}—
8 first_class_bc_id / 9 cloud_requested_environment_build_id / 10 machineoptionalstring / 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

FieldTypeMeaning
(whole blob)bytesNo envelope. May itself be valid JSON (e.g. a package.json) - do not classify by first byte alone.
(raw bytes) export const example = 1;\n

blob: 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.

FieldTypeMeaning
(whole blob)bytesSame formats as above.
(protobuf) older ConversationStateStructure

Previous 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.

FieldTypeMeaning
role"system"—
contentstring—
{"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.

FieldTypeMeaning
role"user"—
contentstring | array of content partsString for the initial <user_info> context; array of text parts for queries.
providerOptions.cursor.requestIdoptionalstring (uuid)On query messages; equals AgentConversationTurnStructure.request_id.
providerOptions.cursor.requestContextCompletenessoptionalobject<string,bool> {agentSkills, customSubagents, env, gitRepos, gitStatus, mcp, mcpFileSystem, repositoryInfo, rules}On the context message.
providerOptions.cursor.isSummaryoptionalbooleantrue 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).

FieldTypeMeaning
role"assistant"—
idstringShort per-request counter-like id (Values include 1-char strings); not globally unique.
contentarray of parts (redacted-reasoning | reasoning | text | tool-call)—
providerOptions.cursor.pendingToolCallStartedAtMsoptionalnumberValues 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.

FieldTypeMeaning
role"tool"—
idstringEquals the toolCallId (5,861/5,863).
contentarray with one tool-result part—
providerOptions.cursor.highLevelToolCallResultoptionalobject {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.

FieldTypeMeaning
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.

FieldTypeMeaning
role"assistant"—
message.content[]array of text | tool_useFirst 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

FieldTypeMeaning
type"turn_ended"—
statusenum(success|error|aborted)—
erroroptionalstringPresent 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

FieldTypeMeaning
type"metadata"—
metadata.overviewstring—
{"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

FieldTypeMeaning
schemaVersion1—
createdAtMsnumber—
updatedAtMsoptionalnumber—
hasConversationbooleanlatestRootBlobId non-empty.
titleoptionalstringChat name (omitted for default).
isSubagentoptionaltruePresent when meta.subagentInfo is set.
cwdoptionalstringAbsolute 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

FieldTypeMeaning
[]array of stringNewest 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.

FieldTypeMeaning
type"text"—
textstring—
{"type":"text","text":"Hello"}

json part / redacted-reasoning

Provider-encrypted reasoning; content is not readable.

Written assistant messages from reasoning models.

FieldTypeMeaning
type"redacted-reasoning"—
datastring (opaque, base64-like)Opaque.
providerOptions.cursor.modelNameoptionalstringModel 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

FieldTypeMeaning
type"reasoning"—
textstring—
{"type":"reasoning","text":"Thinking about it"}

json part / tool-call

A tool invocation by the model.

FieldTypeMeaning
type"tool-call"—
toolCallIdstring'tool_<uuid>'.
toolNamestringModel-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).
argsobjectJSON arguments.
{"type":"tool-call","toolCallId":"tool_00000000-0000-4000-8000-000000000004","toolName":"Grep","args":{"pattern":"example"}}

json part / tool-result

Model-visible tool output.

FieldTypeMeaning
type"tool-result"—
toolCallIdstring—
toolNamestring—
resultstring | object | numberUsually string; objects for MCP results; a number once.
experimental_contentoptionalarray 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

FieldTypeMeaning
type"image"—
imageoptionalstring | {__type:'Uint8Array', hex}Byte arrays are stored as {__type:'Uint8Array',hex} to bytes; field names follow the AI SDK CoreMessage shape.
mimeTypeoptionalstringunknown
{"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

FieldTypeMeaning
type"file"—
filenameoptionalstringUsed by the writer.
data / mimeTypeoptionalunknown—
{"type":"file","filename":"example.pdf","mimeType":"application/pdf","data":{"__type":"Uint8Array","hex":"25504446"}}

jsonl part / text

Text in a JSONL mirror line.

FieldTypeMeaning
type"text"—
textstring—
{"type":"text","text":"Hello"}

jsonl part / tool_use

Tool call in a JSONL mirror assistant line (no id, no result).

FieldTypeMeaning
type"tool_use"—
namestring—
inputobject—
{"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.dbPre-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>.outCombined 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..

FieldTypeMeaning
idtextmsg_ + 12 hex time + 14 base62 (ascending). Event-derived rows reuse the event id suffix (evt_→msg_); fork copies use msg_<forkEventSuffix>_<seq>.
session_idtextFK session_v2.id (cascade delete).
typetextDiscriminator.
seqintegerDurable event seq that inserted the row; unique per session; gaps are normal.
time_createdinteger msMirrors data.time.created (assistant: request start).
time_updatedinteger msLast mutation.
datajson 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.

FieldTypeMeaning
idtext ses_<26>Descending time-sortable id (newest sorts first).
project_idtextFK project.id.
workspace_idoptionaltext—
parent_idoptionaltextParent session for subagent/child sessions.
fork_session_idoptionaltextSource session of a fork (parent_id is null on forks).
fork_boundaryoptionaljson {type:before|through, messageID}—
slugtext—
directorytextAbsolute working directory.
pathoptionaltextSubpath relative to project worktree.
titleoptionaltextOptional since the 2.x split (1.x required).
versiontextopencode version that created the session.
share_urloptionaltextLegacy/sharing.
summary_additions/summary_deletions/summary_filesoptionalintegerLegacy 1.x diff summary.
summary_diffsoptionaljson FileDiff.LegacyInfo[]Legacy 1.x.
metadataoptionaljson Record<string,Json>Host annotations; inherited by children/forks.
costrealUSD total (steps + title + compaction usage).
tokens_input/tokens_output/tokens_reasoning/tokens_cache_read/tokens_cache_writeintegerRunning totals.
revertoptionaljson Revert {messageID, partID?, snapshot?, files?} | RevertV1Staged (uncommitted) revert.
permissionoptionaljson Permission.Ruleset—
agentoptionaltextCurrent agent id.
modeloptionaljson {id, providerID, variant?}Current model.
time_created/time_updatedinteger ms—
time_idleoptionalinteger msLast terminal execution.
idle_outcomeoptionaltext succeeded|failed|interrupted—
time_viewedoptionalinteger msRead watermark.
time_compactingoptionalinteger—
time_archivedoptionalinteger—
time_suspendedoptionalintegerExecution claim timestamp (historical name).
resume_attemptsinteger—
{"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).

FieldTypeMeaning
data.metadataoptionalRecord<string,unknown>Free-form metadata (event metadata, e.g. notice/source tags).
data.time.creatednumber (epoch ms)—
data.textstring—
data.filesoptionalFileAttachment[] {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

FieldTypeMeaning
data.metadataoptionalRecord<string,unknown>Free-form metadata (event metadata, e.g. notice/source tags).
data.time.creatednumber (epoch ms)—
data.textstringModel-facing text.
data.descriptionoptionalstringShort 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

FieldTypeMeaning
data.metadataoptionalRecord<string,unknown>Free-form metadata (event metadata, e.g. notice/source tags).
data.time.creatednumber (epoch ms)—
data.textstring—
data.descriptionoptionalstringe.g. 'Instructions updated: <keys>'
data.metadata.noticeoptional"instructions"—
data.metadata.instructionSourcesoptionalstring[]—
{"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

FieldTypeMeaning
data.metadataoptionalRecord<string,unknown>Free-form metadata (event metadata, e.g. notice/source tags).
data.time.creatednumber (epoch ms)—
data.skillstring (Skill.ID)—
data.namestring—
data.textstringInjected 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

FieldTypeMeaning
data.metadata.backgroundoptionalboolean—
data.shellIDstring sh_<26>—
data.commandstring—
data.statusenum(running,exited,timeout,killed)—
data.exitoptionalnumber—
data.outputoptional{output, cursor, size, truncated}Final page; full capture is in the shell output file.
data.time.creatednumber ms—
data.time.completedoptionalnumber 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).

FieldTypeMeaning
data.agentstring—
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.finishoptionalenum(stop,length,tool-calls,content-filter,error,unknown)Absent while running.
data.rawFinishoptionalstringProvider-native finish.
data.nativeoptionalRecord<string,unknown>Step-level provider replay data (was providerState before 2.1).
data.costoptionalnumber USDSet 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.metadataoptionalRecord—
data.time.creatednumber msRequest dispatch time.
data.time.streamedoptionalnumber msProvider body ended.
data.time.completedoptionalnumber msAbsent = 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

FieldTypeMeaning
data.metadataoptionalRecord<string,unknown>Free-form metadata (event metadata, e.g. notice/source tags).
data.time.creatednumber (epoch ms)—
data.status"running"—
data.reasonenum(auto,manual)—
data.summarystringEmpty 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

FieldTypeMeaning
data.metadataoptionalRecord<string,unknown>Free-form metadata (event metadata, e.g. notice/source tags).
data.time.creatednumber (epoch ms)—
data.status"completed"—
data.reasonenum(auto,manual)—
data.modeloptional{id, providerID, variant?}—
data.summarystring—
data.nativeoptionalRecord; native.messages = provider compaction windowWas providerContext before 2.1.
data.costoptionalnumberCompaction request cost.
data.tokensoptional{input, output, reasoning, cache:{read, write}} (all numbers; no total field)—
data.metadata.keepIDoptionalmsg idFirst message kept verbatim after the summary (rows between keepID and this row).
data.metadata.recentoptionalstringPre-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

FieldTypeMeaning
data.metadataoptionalRecord<string,unknown>Free-form metadata (event metadata, e.g. notice/source tags).
data.time.creatednumber (epoch ms)—
data.status"failed"—
data.reasonenum(auto,manual)—
data.error{type:string, message:string, status?:100-599, response?:{body}, retryAfterMs?:int}—
data.costoptionalnumber—
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)

FieldTypeMeaning
data.metadataoptionalRecord<string,unknown>Free-form metadata (event metadata, e.g. notice/source tags).
data.time.creatednumber (epoch ms)—
data.outcomeenum(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

FieldTypeMeaning
data.metadataoptionalRecord<string,unknown>Free-form metadata (event metadata, e.g. notice/source tags).
data.time.creatednumber (epoch ms)—
data.agentstring—
data.previousoptionalstring—
{"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

FieldTypeMeaning
data.metadataoptionalRecord<string,unknown>Free-form metadata (event metadata, e.g. notice/source tags).
data.time.creatednumber (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

FieldTypeMeaning
data.metadataoptionalRecord<string,unknown>Free-form metadata (event metadata, e.g. notice/source tags).
data.time.creatednumber (epoch ms)—
data.location{directory, workspaceID?}—
data.projectIDoptionalstring—
data.subpathoptionalstring—
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

FieldTypeMeaning
idtext msg_Becomes the session_message id on delivery.
session_idtext—
typeenum(user,synthetic,compaction,move)—
payloadjson UserPayload|SyntheticPayload|{}|MovePayload—
deliveryenum(steer,queue)—
enqueued_seqintegerEvent seq at admission.
time_createdinteger 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

FieldTypeMeaning
instruction_entry.(session_id,key)pk—
instruction_entry.valueoptionaljson<=256 KiB
instruction_entry.removedboolean—
instruction_state.epoch_start/through_seqinteger—
instruction_state.initial_values/current_valuesjson Record<key,sha256>—
instruction_blob.hashtext sha256 hex—
instruction_blob.valueoptionaljsonInstruction 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

FieldTypeMeaning
idtext evt_<26>—
aggregate_idtext (session id)—
seqinteger—
createdinteger ms—
typetext e.g. session.tool.success.2—
datajsonEvent 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.

FieldTypeMeaning
aggregate_idtext—
seqinteger—
owner_idoptionaltext—
{"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

FieldTypeMeaning
keytext—
valuetext—
time_created/time_updatedinteger—
{"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)

FieldTypeMeaning
idtext msg_—
session_idtextFK legacy session table.
time_created/time_updatedinteger—
data.roleenum(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.

FieldTypeMeaning
type"text"—
textstring—
nativeoptionalRecordProvider replay data (was state before 2.1).
{"type":"text","text":"Done."}

assistant.content / reasoning

Model reasoning segment.

Written reasoning.started/ended.

FieldTypeMeaning
type"reasoning"—
textstring—
nativeoptionalRecordEncrypted/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.

FieldTypeMeaning
type"tool"—
idstringProvider call id.
namestringe.g. shell, read, edit, write, patch, glob, grep, subagent, skill, todo, question, webfetch, websearch, mcp tools.
executedoptionalbooleantrue when OpenCode ran it (false for provider-executed tools).
nativeoptionalRecordCall native data merged with result native data.
stateToolStateSee 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

FieldTypeMeaning
status"streaming"—
inputstringRaw argument text.
{"status":"streaming","input":"{\"command\":\"l"}

tool.state / running

Parsed input, executing.

Written session.tool.called.

Stored only in-flight or crashed

FieldTypeMeaning
status"running"—
inputobject—
metadataRecord<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).

FieldTypeMeaning
status"completed"—
inputobject—
contentnon-empty (text|file)[]Model-facing result.
metadataoptionalRecord<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).

FieldTypeMeaning
status"error"—
inputobject{} 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.
metadataoptionalRecord—
{"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.

FieldTypeMeaning
type"text"—
textstring—
{"type":"text","text":"ok"}

tool.content / file

File/media item in a tool result, by URI.

Written inside state.content.

FieldTypeMeaning
type"file"—
uristringdata: URI or other URI.
mimestring—
nameoptionalstring—
{"type":"file","uri":"data:image/png;base64,iVBORw0KGgo=","mime":"image/png"}

user.files[]

Prompt attachment stored inline.

Written user message data.files.

FieldTypeMeaning
database64—
mimestring—
source{type:inline}|{type:uri,uri}—
nameoptionalstring—
descriptionoptionalstring—
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.

FieldTypeMeaning
agents[].namestring—
skills[].id/namestring—
skills[].textoptionalstring—
*.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)

FieldTypeMeaning
idtext prt_—
message_idtext—
session_idtext—
data.type"text"—
dataobject{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)

FieldTypeMeaning
idtext prt_—
message_idtext—
session_idtext—
data.type"reasoning"—
dataobject{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)

FieldTypeMeaning
idtext prt_—
message_idtext—
session_idtext—
data.type"file"—
dataobject{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)

FieldTypeMeaning
idtext prt_—
message_idtext—
session_idtext—
data.type"tool"—
dataobject{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)

FieldTypeMeaning
idtext prt_—
message_idtext—
session_idtext—
data.type"step-start"—
dataobject{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)

FieldTypeMeaning
idtext prt_—
message_idtext—
session_idtext—
data.type"step-finish"—
dataobject{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)

FieldTypeMeaning
idtext prt_—
message_idtext—
session_idtext—
data.type"snapshot"—
dataobject{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)

FieldTypeMeaning
idtext prt_—
message_idtext—
session_idtext—
data.type"patch"—
dataobject{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)

FieldTypeMeaning
idtext prt_—
message_idtext—
session_idtext—
data.type"agent"—
dataobject{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)

FieldTypeMeaning
idtext prt_—
message_idtext—
session_idtext—
data.type"subtask"—
dataobject{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)

FieldTypeMeaning
idtext prt_—
message_idtext—
session_idtext—
data.type"retry"—
dataobject{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)

FieldTypeMeaning
idtext prt_—
message_idtext—
session_idtext—
data.type"compaction"—
dataobject{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>.jsonlThe 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>.logFull 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..

FieldTypeMeaning
typestringEntry type.
idstring8 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).
parentIdstring|nullParent entry id; null for a root. Absent on the header.
timestampstring (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).

FieldTypeMeaning
type"session"Discriminator.
versionoptionalnumberFormat version; absent means 1. Current is 3.
idstringSession 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.
timestampstring (ISO 8601)Creation time; also used (with : and . replaced by -) as the file-name prefix.
cwdstringAbsolute working directory. Readers tolerate it missing/non-string on very old files (treated as empty).
parentSessionoptionalstringAbsolute 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).

FieldTypeMeaning
type"message"Discriminator.
idstringEntry id (8 hex chars).
parentIdstring|nullParent entry id.
timestampstring (ISO 8601)Append time.
messageAgentMessageDiscriminated 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

FieldTypeMeaning
message.role"system"—
message.contentstring | TextContent[]Base prompt on the leading message; extra instructions on later ones (often empty string).
message.sectionsoptionalRecord<string, string|null>Named, ordered prompt sections; later messages replace by name, null removes.
message.toolsAddedoptionalTool[] ({name, description, parameters (JSON Schema), constrainedSampling?})Complete tool definitions becoming available.
message.toolsRemovedoptional{name}[]Tools that stop being available.
message.timestampnumber (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.

FieldTypeMeaning
message.role"user"—
message.contentstring | (TextContent|ImageContent)[]Plain string or blocks; images are inline base64.
message.timestampnumber (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.

FieldTypeMeaning
message.role"assistant"—
message.content(TextContent|ThinkingContent|ToolCall)[]—
message.apistringWire 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.providerstringProvider id.
message.modelstringRequested (physical) model id.
message.responseModeloptionalstringConcrete provider model when it differs.
message.responseIdoptionalstringProvider response id.
message.providerThinkingLeveloptionalstringProvider-native effort actually used.
message.thinkingLeveloptionalenum(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.usageUsageUsage object: input, output, cacheRead, cacheWrite, cacheWrite1h?, reasoning?, totalTokens, cost{input,output,cacheRead,cacheWrite,total}
message.stopReasonenum(stop,length,toolUse,error,aborted,deferred)pending exists in the type but is not persisted.
message.deferredoptionalDeferredHandle {provider,modelId,api,id,expiresAt?,pollAfterMs?,data?}Handle to retrieve a deferred response.since 0.84.0
message.errorMessageoptionalstringError text when stopReason is error/aborted.
message.rawStopReasonoptionalstringProvider-native stop reason.
message.endTurnoptionalbooleanProvider explicit end-of-turn signal (Codex).since 0.84.2
message.timestampnumber (ms)Request start time.
message.durationMsoptionalnumberMonotonic 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.

FieldTypeMeaning
message.role"toolResult"—
message.toolCallIdstringToolCall.id of the originating block.
message.toolNamestring—
message.content(TextContent|ImageContent)[]What the model sees.
message.detailsoptionalJSONTool-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.usageoptionalUsageNested 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.isErrorboolean—
message.timestampnumber (ms)—
message.durationMsoptionalnumberTool 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

FieldTypeMeaning
message.role"bashExecution"—
message.commandstring—
message.outputstringPossibly truncated output.
message.exitCodenumber|undefinedOmitted from JSON when undefined.
message.cancelledboolean—
message.truncatedboolean—
message.fullOutputPathoptionalstringTemp file with full output (os.tmpdir()/pi-bash-<16hex>.log).
message.excludeFromContextoptionalbooleantrue for !! commands: not converted into model context.
message.timestampnumber (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

FieldTypeMeaning
message.role"custom" (was "hookMessage" before v3)—
message.customTypestring—
message.contentstring | (TextContent|ImageContent)[]—
message.displayboolean—
message.detailsoptionalany—
message.timestampnumber (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.

FieldTypeMeaning
providerstring—
modelIdstring—
{"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.

FieldTypeMeaning
thinkingLevelstring (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

FieldTypeMeaning
kindstringOpen-ended category; treat unknown kinds as normal usage.
providerstring—
modelstring—
usageUsageUsage object: input, output, cacheRead, cacheWrite, cacheWrite1h?, reasoning?, totalTokens, cost{input,output,cacheRead,cacheWrite,total}
noteoptionalstringHuman-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

FieldTypeMeaning
summarystring—
firstKeptEntryIdstringFirst retained entry before the compaction; equals the compaction's own id for retain-none (since 0.87.0).
tokensBeforenumberContext tokens before compaction.
detailsoptionalanyDefault: {readFiles:string[], modifiedFiles:string[]}; extensions may store anything.
usageoptionalUsageCost of producing the summary; counted in session totals.
fromHookoptionalbooleantrue when an extension produced it.
systemMessageoptionalSystemMessageComplete 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

FieldTypeMeaning
fromIdstringPrevious leaf whose path was summarised; literal "root" if there was no leaf.
summarystring—
detailsoptionalanyDefault {readFiles, modifiedFiles}.
usageoptionalUsage—
fromHookoptionalboolean—
{"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

FieldTypeMeaning
customTypestringExtension identifier.
dataoptionalany—
{"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

FieldTypeMeaning
customTypestring—
contentstring | (TextContent|ImageContent)[]—
displaybooleanRender in TUI or hide.
detailsoptionalanyNot 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

FieldTypeMeaning
targetIdstringA user/assistant/toolResult message entry or custom_message entry on the active branch.
replacement{content: string|block[]} | nullnull 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

FieldTypeMeaning
targetIdstring—
labelstring|undefinedOmitted 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

FieldTypeMeaning
nameoptionalstringNewlines 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.

FieldTypeMeaning
type"text"—
textstring—
textSignatureoptionalstringOpaque 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.

FieldTypeMeaning
type"image"—
datastring (base64)—
mimeTypestring—
{"type":"image","data":"iVBORw0KGgo=","mimeType":"image/png"}

thinking

Model reasoning (assistant only).

Written inside assistant content.

FieldTypeMeaning
type"thinking"—
thinkingstringMay be empty when redacted.
thinkingSignatureoptionalstringOpaque replay data / encrypted payload.
redactedoptionalboolean—
{"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.

FieldTypeMeaning
type"toolCall"—
idstringMatched by toolResult.toolCallId.
namestring—
argumentsobject{} when argumentsError is set.
thoughtSignatureoptionalstringGoogle opaque signature.
namespaceoptionalstringOpenAI Responses tool namespace.
argumentsErroroptionalstringRaw 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
Claude Code
Cursor Agent
  • cursor-agent 2026.10.12-d47ca18 local transcript shape survey, live observation, checked 2026-10-26
OpenCode
pi