{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Claude Desktop Cowork Session",
  "description": "Undocumented schema for Claude Desktop (Cowork mode) session files. Reverse-engineered from 146 local session files on Windows 11. Path: %AppData%\\Claude\\local-agent-mode-sessions\\{account-id}\\{org-id}\\local_{session-id}.json. Note: newer installs may use claude-code-sessions instead of local-agent-mode-sessions.",
  "type": "object",
  "required": [
    "sessionId",
    "processName",
    "vmProcessName",
    "cwd",
    "userSelectedFolders",
    "createdAt",
    "lastActivityAt",
    "model",
    "isArchived",
    "title",
    "initialMessage",
    "systemPrompt",
    "egressAllowedDomains",
    "accountName",
    "emailAddress"
  ],
  "properties": {
    "sessionId": {
      "type": "string",
      "description": "Session identifier with 'local_' prefix followed by a UUID.",
      "pattern": "^local_[0-9a-f-]+$",
      "frequency": "146/146"
    },
    "processName": {
      "type": "string",
      "description": "Auto-generated three-word session name (e.g. 'sweet-cool-newton').",
      "frequency": "146/146"
    },
    "vmProcessName": {
      "type": "string",
      "description": "VM process name, appears to always match processName.",
      "frequency": "146/146"
    },
    "cliSessionId": {
      "type": "string",
      "description": "Separate CLI session UUID. Absent on sessions that errored before CLI initialization.",
      "frequency": "134/146"
    },
    "cwd": {
      "type": "string",
      "description": "Working directory inside the VM sandbox (e.g. '/sessions/sweet-cool-newton').",
      "frequency": "146/146"
    },
    "userSelectedFolders": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Host filesystem folders the user selected for the session (Windows paths).",
      "frequency": "146/146"
    },
    "createdAt": {
      "type": "number",
      "description": "Session creation timestamp in epoch milliseconds.",
      "frequency": "146/146"
    },
    "lastActivityAt": {
      "type": "number",
      "description": "Last activity timestamp in epoch milliseconds.",
      "frequency": "146/146"
    },
    "model": {
      "type": "string",
      "description": "Claude model ID used for the session (e.g. 'claude-opus-4-6').",
      "frequency": "146/146"
    },
    "isArchived": {
      "type": "boolean",
      "description": "Whether the session has been archived by the user. Confirmed in GitHub issue #24534.",
      "frequency": "146/146"
    },
    "title": {
      "type": "string",
      "description": "Session title, either user-provided or auto-generated from the conversation.",
      "frequency": "146/146"
    },
    "initialMessage": {
      "type": "string",
      "description": "The first user message that started the session.",
      "frequency": "146/146"
    },
    "systemPrompt": {
      "type": "string",
      "description": "Full Cowork system prompt embedded in the session (~42KB, observed range 41,940-42,923 chars). Contains application_details and agent instructions.",
      "frequency": "146/146"
    },
    "accountName": {
      "type": "string",
      "description": "User's account display name. Stored in plaintext.",
      "frequency": "146/146"
    },
    "emailAddress": {
      "type": "string",
      "description": "User's email address. Stored in plaintext.",
      "frequency": "146/146"
    },
    "egressAllowedDomains": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Domains the session is allowed to make outbound requests to. ['*'] means unrestricted.",
      "frequency": "146/146"
    },
    "remoteMcpServersConfig": {
      "type": "array",
      "description": "MCP server configurations (name, UUID, tool definitions). Large nested objects.",
      "frequency": "144/146"
    },
    "enabledMcpTools": {
      "type": "object",
      "description": "Map of 'uuid:tool-name' to boolean indicating which MCP tools are enabled.",
      "frequency": "144/146"
    },
    "slashCommands": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Available slash commands for the session (e.g. 'compact', 'review', 'anthropic-skills:pdf').",
      "frequency": "134/146"
    },
    "chromePermissionMode": {
      "type": "string",
      "description": "Browser automation permission level. Observed value: 'follow_a_plan'.",
      "frequency": "64/146"
    },
    "chromeAllowedDomains": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Domains the session's browser automation is allowed to access.",
      "frequency": "64/146"
    },
    "mcqAnswers": {
      "type": "object",
      "description": "User responses to AskUserQuestion prompts, keyed by tool_use_id. Contains questions, options, and selected answers.",
      "frequency": "61/146"
    },
    "fsDetectedFiles": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "hostPath": { "type": "string" },
          "fileName": { "type": "string" },
          "timestamp": { "type": "number" }
        }
      },
      "description": "Files detected on the host filesystem during the session.",
      "frequency": "54/146"
    },
    "userApprovedFileAccessPaths": {
      "type": "array",
      "items": { "type": "string" },
      "description": "VM-internal paths the user explicitly approved for file access.",
      "frequency": "30/146"
    },
    "fileDeleteApprovedMounts": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Host folder mount names where file deletion has been approved.",
      "frequency": "26/146"
    },
    "error": {
      "type": "string",
      "description": "Error message if the session failed to start or crashed. Common errors: VM mount failures, daemon disconnects, auth 503s, API 500s.",
      "frequency": "17/146"
    },
    "scheduledTaskId": {
      "type": "string",
      "description": "Identifier for scheduled/recurring tasks (e.g. 'etsy-daily-metrics', 'pinterest-evening-post').",
      "frequency": "3/146"
    }
  }
}
