6 min read

Reverse-Engineering Claude Desktop's Cowork Session Format

Claude Desktop’s Cowork mode stores every session as a plain JSON file on your local filesystem. There’s no official documentation for the format. No schema spec, no changelog entry, no developer guide. So I reverse-engineered it.

Where the files live

On Windows:

%AppData%\Claude\local-agent-mode-sessions\{org-id}\{user-id}\local_{session-id}.json

Newer installs may use claude-code-sessions instead of local-agent-mode-sessions. The directory was renamed at some point, and both can coexist on the same machine.

Each session is a self-contained JSON file. No binary encoding, no database, no LevelDB. Just files you can open in any text editor.

How I found this

I started by asking Claude Code to find my Cowork chat logs. It initially pointed me at IndexedDB/https_claude.ai_0.indexeddb.leveldb, which is the browser-based claude.ai storage, not Claude Desktop’s session storage. That’s a different product with a different storage model.

What it did find correctly was the Cowork service logs (cowork-service.log, cowork_vm_node.log, and coworkd.log) sitting in the Claude Desktop logs/ directory. These are infrastructure and daemon logs, not chat history. They’re useful for diagnosing startup failures and VM issues, but they don’t contain your conversations.

GitHub issue #24534 confirmed where the actual session data lives and the local_ prefix convention. From there I had Claude Code enumerate and diff all 146 session files on my machine to build a complete field inventory.

The schema (27 fields)

Every session file contains a subset of 27 observed fields. 15 appear in all 146 sessions. The rest are conditional; they only appear when the relevant feature was used during that session.

Always present (146/146 sessions)

FieldTypeWhat it is
sessionIdstringlocal_ + UUID
processNamestringAuto-generated three-word name (e.g. sweet-cool-newton)
vmProcessNamestringAlways matches processName
cwdstringWorking directory inside the VM sandbox
userSelectedFoldersstring[]Host folders you gave the session access to
createdAtnumberEpoch milliseconds
lastActivityAtnumberEpoch milliseconds
modelstringModel ID (e.g. claude-opus-4-6)
isArchivedbooleanWhether you archived the session
titlestringSession title (auto-generated or user-set)
initialMessagestringYour first message
systemPromptstringThe full Cowork system prompt (~42KB)
egressAllowedDomainsstring[]Outbound network allowlist (["*"] = unrestricted)
accountNamestringYour display name, in plaintext
emailAddressstringYour email address, in plaintext

Near-universal (134-144/146)

FieldFrequencyWhat it is
remoteMcpServersConfig144/146Full MCP server configs with tool definitions
enabledMcpTools144/146"uuid:tool-name": true/false map
slashCommands134/146Available slash commands
cliSessionId134/146Separate CLI session UUID

Conditional (3-64/146)

FieldFrequencyWhat it is
chromePermissionMode64/146Browser automation permission level
chromeAllowedDomains64/146Domains the browser can access
mcqAnswers61/146Your answers to multiple-choice prompts
fsDetectedFiles54/146Files detected on the host filesystem
userApprovedFileAccessPaths30/146Paths you explicitly approved
fileDeleteApprovedMounts26/146Mounts where deletion was approved
error17/146Error message if the session failed
scheduledTaskId3/146ID for scheduled/recurring tasks

Surprises

The system prompt is embedded in every session. Each file contains a ~42KB copy of the full Cowork system prompt (ranging from 41,940 to 42,923 characters across versions). Across 146 sessions, that’s nearly 6MB of duplicated prompt text. This is presumably for reproducibility, since each session is a snapshot of the exact instructions Claude was operating under.

PII is stored in plaintext. accountName and emailAddress appear in every session file with no encryption or obfuscation. If you’re backing up your AppData or syncing it to cloud storage, these files go with it.

Browser automation is a first-class feature. 64 of my 146 sessions had chromePermissionMode and chromeAllowedDomains set. The observed permission mode is follow_a_plan, which suggests a structured approval model rather than open browsing.

Error patterns reveal infrastructure. 17 sessions have an error field. The most common failure is RPC error -1: failed to ensure virtiofs mount, a VM filesystem mount failure. Other errors include daemon disconnects, auth 503s, and API 500 internal server errors. These are the kinds of errors users report in GitHub issues but rarely see documented.

Scheduled tasks exist. 3 sessions have a scheduledTaskId, and mine were etsy-daily-metrics and pinterest-evening-post. This confirms Cowork supports recurring automated tasks, a feature that isn’t widely discussed.

What’s NOT in these files

The session JSON contains metadata, configuration, and user decisions, but not the full conversation transcript. There are no message arrays, no assistant responses, no tool call logs. The actual conversation turns appear to live in the VM process state referenced by processName, not in these files.

If you’re looking for the full back-and-forth chat history, these files won’t have it. They’re session manifests, not chat logs.

The schema file

I’ve published a JSON Schema documenting all 27 fields with types, descriptions, and frequency data. It’s based on direct observation, not official documentation, because no official documentation exists.

Why this matters

If you’re building tools on top of Claude Desktop, mining your session history, or just want to understand what’s stored on your machine, this is the reference that doesn’t exist elsewhere. The format is undocumented but stable enough across 146 sessions to be useful.

Just don’t treat it as a contract. Anthropic can change it anytime.

I'm an independent engineer (ex-eBay) who designs and builds production AI systems. I work deep in the Claude Code and MCP ecosystem, document what I find, and take on contract work. Currently taking on projects. Get in touch .