type field. Session entries form a tree through id and parentId.
File location
JSONL stores use one of two directory layouts depending onexactDirectory:
- Flat layout (
exactDirectory: true).sessions.storage.dir,--session-dir,ATOMIC_SESSIONS_STORAGE, SDK{ kind: "jsonl", dir },SessionManagerstring-directory overloads, andJsonlSessionStore.open(dir, { exactDirectory: true })write files directly inside<dir>and do not scan subdirectories. - Nested layout (
exactDirectory: false). Legacy~/.atomic/agent/sessionsand directJsonlSessionStore.open(dir)calls (whereexactDirectorydefaults tofalse) group files into a per-project subdirectory named--<encoded-cwd>--, falling back to--<sha256-of-cwd>--when the encoded directory name exceeds 180 UTF-8 bytes.
--<encoded-cwd>-- are invisible to exactDirectory: true stores. In both layouts, each filename combines the session creation timestamp and the 64-character hex SHA-256 hash of the session ID.
Resume and fork selection match by session ID rather than file path. Local artifacts and tool-result files stay on the filesystem even when a session is stored in a database.
Deleting sessions. To delete individual sessions safely across any store, use
/resume (Ctrl+D) or SessionManager.deleteSession() (see Resuming and deleting sessions). Never delete a shared SQLite database file to remove one session; deleting a .jsonl file manually in a JSONL store leaves its <session>.jsonl.idx index sidecar behind.Session version
SessionManager writes format-4 headers with createdAt and parentSessionId. Sessions in formats 1, 2, and 3, along with early format-4 files that use timestamp and parentSession, upgrade automatically when opened, resumed, imported, or forked.
Reading upgrades older records in memory, while listing sessions and looking up headers leave files untouched. Opening an older JSONL session writes its upgrade atomically under the file lock before saving new entries.
Future versions, unrecognized version numbers, and structurally invalid entries are rejected, and unloadable sessions are omitted from resume listings. A complete final line without a trailing newline is accepted. An unfinished final line left by a crashed process is ignored with one warning naming the file, and the next saved entry removes it. A damaged record before the final line is rejected.
Type definitions
Inspect the exported TypeScript declarations in your installed packages:@bastani/atomic:SessionManager,SessionHeader,SessionEntry,UsageEntry,BashExecutionMessage,CustomMessage, andBranchSummaryMessage.@bastani/atomic-ai:SystemMessage,UserMessage,AssistantMessage,ToolResultMessage,Usage, andStopReason.@bastani/atomic-agent-core:AgentMessage.
Message types
Session entries storeAgentMessage objects (and SystemMessage checkpoints). Understanding these shapes helps when parsing exports or building extensions.
Content blocks
Messages hold arrays of typed content blocks:Base message types
These message types come from@bastani/atomic-ai:
StopReason type in @bastani/atomic-ai also includes "pending" (while a reply is still streaming) and "deferred". Terminal events replace "pending" before the assistant message is saved, so "pending" does not appear in session JSONL.
System messages record prompt and tool changes in chronological order. Later content appends instructions, sections patches named sections (null deletes a section), and toolsAdded or toolsRemoved updates tool availability. Resume and branch selection replay that branch’s state. Compaction entries may carry a systemMessage checkpoint replayed before the boundary message; system instructions are never sent to a compactor model. Older sessions record a declaration on their next request rather than on open, and forced per-run prompts are not written to the transcript.
If a process stops after writing a toolUse assistant message but before appending every matching toolResult, Atomic leaves the append-only history unchanged. Reopening the session synthesizes an interrupted error result for each unanswered call in derived context before rendering, compaction, or the next provider request. That error states that execution was interrupted and its result is unavailable without claiming the tool had no side effects. Derived context also drops orphaned and duplicate tool results, while the original JSONL remains the persisted record.
Nested tool calls are stored on their parent toolResult rather than as standalone messages. nestedCalls holds { calls, complete }, where each call records its ID, name, status, optional arguments, duration, and error. Atomic keeps at most 256 calls and omits arguments over 8 KiB per call or 32 KiB across the parent. complete: false indicates an incomplete record; do not treat nestedCalls as a full audit log or assume omitted calls had no side effects. Nested outputs are not stored there.
Extended message types
These message types come from@bastani/atomic:
custom messages with customType: "compaction".
AgentMessage union
SystemMessage objects are saved inside SessionMessageEntry entries to track prompt and tool changes on each branch, but they are replayed into the session’s system prompt and tool set separately rather than appearing in AgentMessage.
Entry base
All entries exceptSessionHeader extend SessionEntryBase:
id and parentId strings. Very large IDs count toward memory even when the message is short or referenced only by a compaction boundary. Atomic does not shorten IDs when copying or importing a session.
Entry types
SessionHeader
The first line of the file holds session metadata and is not a tree entry. Itsid identifies the session, and it has no parentId:
/fork, /clone, or newSession({ parentSession }) include parentSessionId:
parentInOtherStore: true on the header and prints Parent history is in its original store or is no longer available. when the forked session reopens.
Any session with internal: true in its header is excluded from /resume, atomic -r, -c, and history://sessions, while remaining openable by exact ID. Fresh subagent sessions and newSession({ internal: true }) set this flag:
parentSessionId, so ordinary user forks remain listed.
SessionMessageEntry
A conversation message whosemessage field holds an AgentMessage or SystemMessage. Queued messages also store an optional queuedMessageId receipt ID:
ModelChangeEntry
Recorded when the active model changes mid-session:fallback. It records the requested model (requested), the model that failed or lacked credentials (from), and the error (reason). When fallback skips candidates without sending a request, fallback.skipped lists each { model, provider, reason } where reason is "no-credentials" or "auth-failed":
ThinkingLevelChangeEntry
Recorded when the thinking or reasoning level changes:UsageEntry
Records auxiliary model usage (such as prompt cache warming withkind: "cache_warm") toward session totals without adding anything to LLM context:
kind (string category), provider, model, usage (Usage), and optional note.
CompactionEntry
Created by/compact, RPC compact, and automatic compaction. The summary field holds the boundary message the model sees next—either a Context cleared message or a Context compacted message with compacted text, followed by recovery instructions. firstKeptEntryId is null because no earlier message stays in context.
An entry is active only when details.strategy is "verbatim-lines":
Schema compatibility markers.
"strategy": "verbatim-lines", promptVersion: 7, and stats.rangeCount: 0 are retained from earlier line-based compaction versions as stable schema discriminators. They mark an active compaction boundary even on a memory-compaction clear (form: "cleared").custom message with customType: "compaction" holding summary. Messages appended after the boundary stay ordinary messages, and resuming requires no model request.
Optional top-level fields on CompactionEntry include usage (compactor usage), fromHook (true when an extension supplied compacted text), systemMessage (replayed system prompt and tool checkpoint), coveredThroughEntryId, and recallSessionId (legacy fork history link source).
coveredThroughEntryId. Actively written during resume-budget compaction on Claude models with fixed thinking budgets so newly added resume context (updated instructions, blueprint context, or recovery notices) replays after the boundary. Also present on boundaries written by earlier versions while a tool call waited for its result (current Atomic never writes a boundary while a tool call waits).
details fields include:
form:"cleared"or"compacted".backendandmodel: present on compacted entries ("compactor"or"extension", plusprovider/modelfor a compactor).fallbackReason: present when a configured compactor was not used and Atomic cleared context instead.history: locates the boundary inhistory://sessions/<sessionId>withrangeUnit: "entries",entriesBefore,boundaryEntry, andtotalEntries.historyAccess:"read-search"or"session-history-tool".backupPath: optional pre-compaction backup path (JSONL stores only).
ContextEditEntry
Append-only edit of one earlier context-producing entry. It changes only future model context; raw history, UI display, exports, and session accounting keep the original entry intact.replacement: null omits the target from model context, while a non-null replacement replaces only its content (string replacements for assistant and tool-result entries normalize to one text block). When several edits target the same entry on a branch, the latest edit wins. Edits are branch-relative, so navigating before the edit restores the original contribution.
Atomic writes context_edit entries when omitting failed attempts from model context, such as provider retries, model fallbacks, overflow or length recoveries, and interrupted empty replies. Extensions can append them from turn_end and agent_before_settle.
BranchSummaryEntry
Created when/tree switches away from a branch with a summary of the abandoned path up to the common ancestor:
details:{ readFiles: string[], modifiedFiles: string[] }for built-in summaries, or custom extension data.usage: optional token usage from the summary model call.fromHook:trueif supplied by an extension,falseor omitted if generated by Atomic.
CustomEntry
Extension state persistence that does not enter LLM context:customType to identify your extension’s entries on reload. Atomic also writes built-in custom entry types for internal state, including:
atomic.tool-output: written before a tool result pointing totool-output://<sha256>when oversized output from an unloaded subagent is stored with the session.dataholds{ toolCallId, hash, bytes }. Exported JSONL files also includebase64once per blob; import and fork verify each blob againsthash, store it, and dropbase64.
atomic.leaf: written with nodatawhen/treenavigates without a summary. ItsparentIdis the selected entry, ornullwhen resetting to an empty conversation. When it is the last entry, the session reopens at its parent.getTree()andgetChildren()omit it, and it contributes nothing to context.
resume_timings: records millisecond restore and blueprint durations for/session snapshot.phasesholds only the phases that ran (fetch,reconstruct,materialize,lfs,verify,publish,seed),modeis"fresh","claimed","seeded","in-place", or"degraded",fetchis"none","shallow","full", or"bundle", andexitis"ok","failed", or"timed-out". Read it withlatestResumeTimings(sessionManager)and format it withformatResumeTimings().
workspace_binding: records a session’s bound worktree path ({ kind: "bound-workspace", worktree }) when opened against a specific workspace binding. Atomic also uses additional reservedcustomTypekeys for Intercom memberships, tool deactivation, web search results, and task completion tracking.
CustomMessageEntry
Extension messages that enter LLM context unlessexcludeFromContext is true:
content: string or(TextContent | ImageContent)[], matchingUserMessage.display:truedisplays in the TUI with distinct styling;falsehides the message.details: optional extension metadata, never sent to the LLM.excludeFromContext:truemarks a display-only message excluded from model requests.
LabelEntry
User-defined bookmark on an entry:label to undefined to clear a bookmark.
SessionInfoEntry
Session metadata such as the display name set by/name, --name / -n, or atomic.setSessionName():
name instead of the first message when set. Appending a session_info entry with an empty name clears the display name durably. Use getSessionNameState() or the hasName flag on SessionInfo to distinguish a never-named session ({ hasName: false }) from a cleared one ({ hasName: true }); getSessionName() returns undefined in both cases.
SessionSummaryEntry
Generated one-line session summary written when the agent goes idle and shown in/resume. Never sent to the LLM:
summary: stored one-line text with collapsed whitespace and bounded length (up to 160 characters, truncated with…).summarizedThroughId: entry ID of the latest user or assistant message covered by the summary. Tool results do not invalidate it, but any newer user or assistant message or a laterbranch_summaryretires it.usage: optional token usage from the summary request, counted toward session totals.
WorktreeSnapshotEntry
Repository state of one checkout at the end of a turn that ran a file-writing tool. Never sent to the LLM. See Worktree snapshots and Worktree snapshots reference.snapshot: present when the state changed; an entry withoutsnapshotreferences an earlier entry with the samesnapshotId.restore: present when a resume restored the snapshot into a new worktree ({ from, to, snapshotId, tree, restoredAt }). Later resumes mapfromtoto.restore.degraded: present when a resume restored less than the full snapshot ({ stage, head, tree, basis?, missingLinks, missingPaths, missingCommits, cause, causeReason?, hint }).stageis"partial-changes"or"closest-commit", andbasis("pushed-base","earlier-snapshot", or"branch-tip") identifies the commit source for a closest-commit restore.restore.degradedWork: present on a full restore that followed a partial restore in which the session modified files ({ snapshotId, root, outcome, paths, base?, commit?, ref?, reason? }).outcomeis"applied"(edits applied cleanly on top),"kept"(conflicting edits saved atcommit/reffrombase), or"unavailable"(partial-restore edits could not be read on this machine, withreason).degradedFrom: present on entries captured in a partly restored worktree to pin the original snapshot ID as the checkout’s restore target until a full restore succeeds,discardDegradedRestore()releases it, or 30 days pass. On a full restore that carried over edits from a partly restored worktree,degradedFromnames the snapshot of those carried-over edits until the merged worktree is recorded or released.unrestored: present instead ofrestorewhen a resume continued without restoringroot({ snapshotId, continuedIn, place, from?, cause, causeReason?, detail, hint, at }).placeis"recorded"or"launch". Whenfromis set on the active checkout, file tools map paths underfromtocontinuedInuntil a later resume restores the checkout.restoreWarnings: optional host warnings paired withrestore, such as{ code: "lfs-objects-unavailable", paths }or{ code: "stale-restore-retained", path, kind }. Fresh-worktree LFS downloads run after the restore entry is written, so their warnings appear in resume notices instead.captureMs: capture duration in milliseconds for a turn capture.capturedAt: recording timestamp when a resume adopts a subagent’s newer snapshot for a checkout.blobs: present only in exported JSONL files, holding base64 patch and bundle payloads keyed by SHA-256. Import verifies and stores them, then dropsblobs.
Saved diagnostic notices
Built-in stores save turn-ending diagnostic lines, such as cancelled retry errors, separately from session entries so reopening a session can display them in place. Each saved line is capped at 4,096 UTF-8 bytes and ends with... [diagnostic truncated] if trimmed, while the live terminal error stays intact.
These records are not session entries. /tree, model requests, compaction, token totals, conversation exports, and continuation logic ignore them. Copying a JSONL file or importing a session does not transfer them.
Cache-miss and dropped-thinking notices are derived from saved assistant replies. When a compacted session opens on its active context window, Atomic does not reload discarded history to reconstruct earlier notice counts.
Tree structure
Entries form a tree rooted at the first entry (parentId: null). Each subsequent entry points to its parent through parentId, branching adds sibling children from an earlier entry, and the leaf marks the active position:
Context building
buildSessionProjection() walks the active branch from root to leaf, replays model and thinking-level changes, selects the latest compaction entry with details.strategy === "verbatim-lines", and applies the latest context_edit for each target.
It returns model-visible messages paired with their source entries (entries[].sourceEntry and entries[].messages). Omitted targets emit no message, content replacements preserve the source entry’s role and metadata, and raw entries stay untouched. buildSessionContext() returns just the messages, thinking level, and model used for provider requests.
- Without an active boundary, message, custom-message, and branch-summary entries emit verbatim.
- With
firstKeptEntryId: null, Atomic emits the boundary message and post-boundary messages only. - With
coveredThroughEntryId, entries betweencoveredThroughEntryIdand the compaction boundary replay as ordinary messages after the boundary message (used both for resume-budget additions on Claude models with fixed thinking budgets and for older mid-tool-call boundaries). - With a legacy string
firstKeptEntryId, Atomic emits onecustomType: "compaction"message combining the boundary text and the kept tail (with context edits applied and retained images kept), followed by post-boundary messages. If that entry ID is missing, Atomic omits pre-boundary entries rather than resurrecting older history. - Retired
context_compactionentries and non-verbatimcompactionentries are skipped as archival records.
Legacy and retired entry types
Older session files may contain archival fields and entry types that current Atomic parses for export and audit without reapplying to active context:ContextCompactionEntry(type: "context_compaction"). Earlier versions stored logical entry and content-block deletions incontext_compactionrecords (deletedTargets,protectedEntryIds,stats). Current Atomic never writes or applies them, so content they previously hid may reappear on resume until a new compaction writes an active boundary.- Non-verbatim
compactionentries andcompactionSummarymessages. Oldercompactionentries withoutdetails.strategy: "verbatim-lines", legacycompactionSummarymessages, andcustomentries withcustomType: "atomic:background-compaction-result"remain parseable but are inert in active context. - Legacy
workflowheader metadata. Older workflow-stage sessions carriedworkflow(runId,stageId,stageName) onSessionHeader. Current Atomic does not write newworkflowmetadata and preserves existing fields read-only during export and import.
Parsing example
SessionManager API
Awaitcreate, open, continueRecent, forkFrom, and every session mutation. A resolved mutation has committed to its store, and a failed write rejects with a typed storage error without publishing the entry. There is no flush method.
inMemory() selects memory storage explicitly without filesystem I/O. Factories without an explicit store or directory resolve configured storage, defaulting to the shared local SQLite database. Passing a directory selects JSONL explicitly. Store-open failures never fall back to memory. To open SQLite, PostgreSQL, JSONL, or memory stores, see SDK session storage, Storage, and Session management.
Store ownership and closing.
SessionManager has no close() method. Calling SessionManager.create(cwd), SessionManager.continueRecent(cwd), or SessionManager.open(filePath) without passing a SessionStore opens an internal store that createAgentSession({ sessionManager }) does not close during session.dispose(). Close sessionManager.getSessionStore().close() when finished, or open and close a SessionStore explicitly and pass it to SessionManager.create(store, cwd) or SessionManager.open(store, sessionId). Calling close() twice on a direct SqlSessionStore, JsonlSessionStore, or MemorySessionStore throws StoreClosedError, and SqlSessionStore.close() leaves a caller-owned database open. See SDK session storage.Static creation methods
SessionManager.create(cwd, sessionDir?, options?): create a new session in configured storage, or in flat-layout JSONL whensessionDiris provided.SessionManager.create(store, cwd, options?): create a new session in a suppliedSessionStore.SessionManager.open(store, sessionId, cwdOverride?, options?): open an existing session by exact ID in anySessionStore(required for SQLite and PostgreSQL sessions), raisingSessionNotFoundErrorif missing.SessionOpenOptionsaccepts{ history?: "tail" | "full", leafId?: string }:"tail"(default) loads from the latest compaction window;"full"loads every stored entry into memory;leafIdresumes from a specific entry instead of the current leaf.continueRecent(store, cwd, options?)andopenSessionById()share the same options.SessionManager.open(path, sessionDir?, cwdOverride?, options?): open a JSONL file directly by filesystem path, creating it if missing. This is a JSONL file API only and cannot open a SQLite or PostgreSQL session ID.SessionManager.continueRecent(cwd, sessionDir?, options?)orcontinueRecent(store, cwd, options?): continue the most recent regular session or create a new one. Pass{ includeInternal: true }to include internal sessions.SessionManager.inMemory(cwd?, options?): create an empty memory-only session synchronously. To seed entries, awaitSessionManager.inMemory(cwd, options, entries)without mutating the supplied array until it resolves.SessionManager.forkFrom(sourcePath, targetCwd, sessionDir?, options?): fork a JSONL file into the target store. For database sessions, open the session by ID and awaitmanager.forkTo(targetCwd, targetStore?, options?).SessionManager.importFromJsonl(inputPath, cwd, targetStoreOrDir?): import a JSONL export preserving its ID and upgrading older supported formats. RaisesSessionExistsErrorif the ID already exists, and opens at the active context window.
Static listing methods
SessionManager.list(cwd, storeOrDir?, onProgress?, options?): list sessions for one project (cwdis always the first argument), excluding internal sessions by default. WhenstoreOrDiris omitted, Atomic opens and closes configured storage automatically.SessionManager.listAll(storeOrDir?, onProgress?, options?)orSessionManager.listAll(onProgress?, signal?): list sessions across all projects in the store. The first argument isstoreOrDiroronProgress, nevercwd; passing a string scans that string as a JSONL directory instead of filtering by project. WhenstoreOrDiris omitted, Atomic opens and closes configured storage automatically.
{ includeInternal: true, signal }. Select sessions by SessionInfo.id. SessionInfo.path holds a JSONL path when available and otherwise the session ID; do not treat it as a filesystem path.
Session management methods
newSession(options?): start a new session.NewSessionOptionsacceptsid,parentSession, andinternal(internal: truehides the session from/resume,atomic -r,-c, andhistory://sessionswhile keeping it openable by ID).openSessionById(sessionId, cwdOverride?, sessionDirectory?, options?): open an existing session by exact ID from this manager’s active store (or from a flat-layout JSONL directory whensessionDirectoryis passed), returning a newSessionManager. AcceptsSessionOpenOptions({ history?, leafId? }).setSessionFile(path): switch directly to a JSONL file. For ID-based loading, create a new manager withSessionManager.open(store, sessionId)ormanager.openSessionById(sessionId).createBranchedSession(leafId): extract a branch into a new session in the same store.forkTo(cwd, targetStoreOrDir?, options?): copy the session into a new session at the destination.deleteSession(sessionId): delete another session and its entries from the active store. Deleting a missing ID is a no-op. Rejects for the currently open session, and raisesSessionOpenElsewhereErrorif another live Atomic session holds an open-session marker for it (stored in SQLsession_open_markersor<agentDir>/open-sessions/<id>/<token>.json, refreshed every 15 seconds, expiring after 60 seconds on another host or 24 hours without a refresh on a same-host marker lacking a process start time such as macOS—distinct from the per-agent-dirsession-claims/resume lock). A session deleted while running fails its next save once withSessionDeletedError.SessionStore.delete(sessionId)is the unguarded store-level operation underneath.
Appending methods
All append methods below returnPromise<string> resolving to the new entry ID, except appendUsage(), which returns Promise<UsageEntry>:
Tree navigation methods
Awaitbranch, resetLeaf, recordBranch, and branchWithSummary. All read methods below are synchronous:
Context, history, and metadata methods
buildSessionProjection(mode?): return the context-edited projection (entrieswith source entries and model-visible messages, plusthinkingLevelandmodel). Pass"transcript"for saved chat rows that keep original displayed content for edited or omitted entries while hiding non-displayed custom messages. For a live session,session.transcriptMessagesalso includes unsaved live messages.buildSessionContext(): return messages, thinking level, and model for the LLM.buildContextEntries(): return active-branch entries after the latest compaction boundary.getEntries(): return raw entries loaded in memory, excluding the header. System tool-change messages andatomic.appendEntry()extension entries on the active branch stay loaded here; usereadHistory()orreadEntry(id)for older retired entries.hasFullHistory(): return whether every stored entry is loaded in memory.loadFullHistory(): load every stored entry on every branch into memory. PreferreadHistory()so large sessions stay bounded; Atomic itself never callsloadFullHistory().readHistory(options?): iterate pages of{ seq, entry }withSessionHistoryReadOptions:fromSeq/toSeq: inclusive stored sequence bounds.direction:"forward"(default) or"backward"(starts from the latest page while keeping entries inside each page chronological).cursor: resume frompage.nextCursorwithout passing new bounds.limit: cap entries returned per page.adjacent: whentrue, populatepage.adjacent({ older?, newer?, current? }) cursors for bidirectional navigation without maintaining a cursor stack.branchLeafSeq: walk only entries on the path from that stored sequence to the root, including pre-compaction history.pageEntries: larger page size for full-session scans (such as exports), still bounded by page byte limits.signal: optionalAbortSignal.- Entries over 1 MiB appear as
{ kind: "oversized", seq, bytes }references instead of truncated objects. Replaced or recreated sessions reject rather than mixing generations.
readHistoryChunks(reference, { offset?, signal? }?): read an oversized entry’s encoded UTF-8 bytes in chunks of at most 64 KiB. Track consumed bytes to resume at an offset and decode with a streaming UTF-8 decoder.readSessionHistory(store, sessionId, options?)andreadSessionHistoryChunks(store, reference, options?): imported from@bastani/atomic/storagefor read-only paged and chunked access directly from aSessionStorewithout opening aSessionManager.readEntry(id): read one entry by ID, including entries outside the loaded window, or returnundefinedif absent.getOmittedHistoryTotals(): return usage and message counts omitted by a tail window, orundefinedwhen full history is loaded.getLastSeq(): return the session’s last stored sequence number, including entries not loaded in memory.getEntrySeq(id)andfindEntrySeq(id): return a loaded entry’s sequence synchronously (getEntrySeq) or look up any entry’s sequence in the store without loading earlier transcript entries (findEntrySeq).forEachStoredEntry(fromSeq, visit): visit every stored entry fromfromSeqin store order, paging older entries without holding them in memory, and resolve to the last visited sequence.getWorktreeSnapshotRecords()andgetLatestWorktreeSnapshots(): return loaded snapshot records (getWorktreeSnapshotRecords) or the latest snapshot per checkout root on the active branch (getLatestWorktreeSnapshots).loadWorktreeSnapshotRecords(ids, { signal? }?): resolve snapshot records by ID across any branch, reading the store for records outside the loaded window and omitting unknown IDs.readWorktreeSnapshotPages({ branch?, direction?, signal? }?): iterateworktree_snapshotentries in pages of{ seq, entry }across all branches or the active branch (branch: true) without retaining them in memory.getAdmissionKeys()andgetSessionRecoveryState(): inspect persisted deduplication state used when recovering interrupted sessions. An admission key is a durable deduplication token recorded for delivered peer messages, queued prompts, or subagent completions so replaying interrupted deliveries after a crash never processes the same event twice.getAdmissionKeys().has(key)checks synchronously whether a key is already recorded;getSessionRecoveryState()returns the persisted admission keys and delivered Intercom message IDs.getHeader(): return the session header metadata.getSessionName()andgetSessionNameState(): return the display name (undefinedif unset or cleared), or the durable name state ({ hasName: false },{ hasName: true }, or{ hasName: true, name }).getCwd(),getSessionDir(),getSessionId(),getSessionStore(),getSessionFile(), andisPersisted(): inspect the session’s working directory, JSONL directory (empty string for non-JSONL stores), exact ID, activeSessionStore, optional JSONL file path, and whether the store is persisted rather than in-memory.