Where does claude store conversation history and session data on disk?
Where does codex store conversation history and session data on disk?
Codex#
user@~: $ cat ~/.codex/sessions/2026/01/16/rollout-2026-01-16T23-39-22-019bca40-2d28-7a10-84bd-769bc216c480.jsonl | jq
{
"timestamp": "2026-01-17T04:39:22.159Z",
"type": "session_meta",
"payload": {
"id": "019bca40-2d28-7a10-84bd-769bc216c480",
"timestamp": "2026-01-17T04:39:22.152Z",
"cwd": "/Users/kevin/src/tries/2026-01-16-codex-sessions",
"originator": "codex_cli_rs",
"cli_version": "0.87.0",
"instructions": "## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Below is the list of skills that can be used. Each entry includes a name, description, and file path so you can open the source for full instructions when using a specific skill.\n### Available skills\n- develop-expo-modules: Guide for authoring and developing Expo modules using the Expo Modules API. (file: /Users/kevin/.codex/skills/expo-modules/SKILL.md)\n- skill-creator: Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations. (file: /Users/kevin/.codex/skills/.system/skill-creator/SKILL.md)\n- skill-installer: Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos). (file: /Users/kevin/.codex/skills/.system/skill-installer/SKILL.md)\n### How to use skills\n- Discovery: The list above is the skills available in this session (name + description + file path). Skill bodies live on disk at the listed paths.\n- Trigger rules: If the user names a skill (with `$SkillName` or plain text) OR the task clearly matches a skill's description shown above, you must use that skill for that turn. Multiple mentions mean use them all. Do not carry skills across turns unless re-mentioned.\n- Missing/blocked: If a named skill isn't in the list or the path can't be read, say so briefly and continue with the best fallback.\n- How to use a skill (progressive disclosure):\n 1) After deciding to use a skill, open its `SKILL.md`. Read only enough to follow the workflow.\n 2) If `SKILL.md` points to extra folders such as `references/`, load only the specific files needed for the request; don't bulk-load everything.\n 3) If `scripts/` exist, prefer running or patching them instead of retyping large code blocks.\n 4) If `assets/` or templates exist, reuse them instead of recreating from scratch.\n- Coordination and sequencing:\n - If multiple skills apply, choose the minimal set that covers the request and state the order you'll use them.\n - Announce which skill(s) you're using and why (one short line). If you skip an obvious skill, say why.\n- Context hygiene:\n - Keep context small: summarize long sections instead of pasting them; only load extra files when needed.\n - Avoid deep reference-chasing: prefer opening only files directly linked from `SKILL.md` unless you're blocked.\n - When variants exist (frameworks, providers, domains), pick only the relevant reference file(s) and note that choice.\n- Safety and fallback: If a skill can't be applied cleanly (missing files, unclear instructions), state the issue, pick the next-best approach, and continue.",
"source": "cli",
"model_provider": "openai" }
}
{
"timestamp": "2026-01-17T04:39:22.159Z",
"type": "response_item", "payload": { "type": "message", "role": "developer", "content": [ { "type": "input_text", "text": "<permissions instructions>Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `workspace-write`: The sandbox permits reading files, and editing files in `cwd` and `writable_roots`. Editing files in other directories requires approval. Network access is enabled. Approvals are your mechanism to get user consent to run shell commands without the sandbox. `approval_policy` is `on-request`: Commands will be run in the sandbox by default, and you can specify in your tool call if you want to escalate a command to run without sandboxing. If the completing the task requires escalated permissions, Do not let these settings or the sandbox deter you from attempting to accomplish the user's task.\n\nHere are scenarios where you'll need to request approval:\n- You need to run a command that writes to a directory that requires it (e.g. running tests that write to /var)\n- You need to run a GUI app (e.g., open/xdg-open/osascript) to open browsers or files.\n- You are running sandboxed and need to run a command that requires network access (e.g. installing packages)\n- If you run a command that is important to solving the user's query, but it fails because of sandboxing, rerun the command with approval. ALWAYS proceed to use the `sandbox_permissions` and `justification` parameters - do not message the user before requesting approval for the command.\n- You are about to take a potentially destructive action such as an `rm` or `git reset` that the user did not explicitly ask for.\n\nWhen requesting approval to execute a command that will require escalated privileges:\n - Provide the `sandbox_permissions` parameter with the value `\"require_escalated\"`\n - Include a short, 1 sentence explanation for why you need escalated permissions in the justification parameter The writable roots are `/Users/kevin/src/tries/2026-01-16-codex-sessions`, `/tmp`, `/var/folders/ks/drmb4skj4h13txr2xv35kk100000gn/T`.</permissions instructions>" }
]
}
}
{
"timestamp": "2026-01-17T04:39:22.159Z",
"type": "response_item",
"payload": {
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "# AGENTS.md instructions for /Users/kevin/src/tries/2026-01-16-codex-sessions\n\n<INSTRUCTIONS>\n## Skills\nA skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Below is the list of skills that can be used. Each entry includes a name, description, and file path so you can open the source for full instructions when using a specific skill.\n### Available skills\n- develop-expo-modules: Guide for authoring and developing Expo modules using the Expo Modules API. (file: /Users/kevin/.codex/skills/expo-modules/SKILL.md)\n- skill-creator: Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations. (file: /Users/kevin/.codex/skills/.system/skill-creator/SKILL.md)\n- skill-installer: Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos). (file: /Users/kevin/.codex/skills/.system/skill-installer/SKILL.md)\n### How to use skills\n- Discovery: The list above is the skills available in this session (name + description + file path). Skill bodies live on disk at the listed paths.\n- Trigger rules: If the user names a skill (with `$SkillName` or plain text) OR the task clearly matches a skill's description shown above, you must use that skill for that turn. Multiple mentions mean use them all. Do not carry skills across turns unless re-mentioned.\n- Missing/blocked: If a named skill isn't in the list or the path can't be read, say so briefly and continue with the best fallback.\n- How to use a skill (progressive disclosure):\n 1) After deciding to use a skill, open its `SKILL.md`. Read only enough to follow the workflow.\n 2) If `SKILL.md` points to extra folders such as `references/`, load only the specific files needed for the request; don't bulk-load everything.\n 3) If `scripts/` exist, prefer running or patching them instead of retyping large code blocks.\n 4) If `assets/` or templates exist, reuse them instead of recreating from scratch.\n- Coordination and sequencing:\n - If multiple skills apply, choose the minimal set that covers the request and state the order you'll use them.\n - Announce which skill(s) you're using and why (one short line). If you skip an obvious skill, say why.\n- Context hygiene:\n - Keep context small: summarize long sections instead of pasting them; only load extra files when needed.\n - Avoid deep reference-chasing: prefer opening only files directly linked from `SKILL.md` unless you're blocked.\n - When variants exist (frameworks, providers, domains), pick only the relevant reference file(s) and note that choice.\n- Safety and fallback: If a skill can't be applied cleanly (missing files, unclear instructions), state the issue, pick the next-best approach, and continue.\n</INSTRUCTIONS>"
}
]
}
}
{
"timestamp": "2026-01-17T04:39:22.159Z",
"type": "response_item",
"payload": {
"type": "message",
"role": "user",
"content": [
{ "type": "input_text",
"text": "<environment_context>\n <cwd>/Users/kevin/src/tries/2026-01-16-codex-sessions</cwd>\n <shell>zsh</shell>\n</environment_context>"
}
]
}
}
Claude#
user@~: $ cat ~/.claude/projects/-Users-kevin-src-tries-2026-01-16-codex-sessions/agent-afe00e9.jsonl | jq
{
"parentUuid": null,
"isSidechain": true,
"userType": "external",
"cwd": "/Users/kevin/src/tries/2026-01-16-codex-sessions",
"sessionId": "047be05c-c85e-415d-bc06-cc3ed9ae7310",
"version": "2.0.76",
"gitBranch": "",
"agentId": "afe00e9",
"type": "user",
"message": {
"role": "user",
"content": "Warmup"
},
"uuid": "bc67d6b9-cfb0-475d-b0a6-1ebd3a1dfa86",
"timestamp": "2026-01-17T04:59:28.909Z"
}
{
"parentUuid": "bc67d6b9-cfb0-475d-b0a6-1ebd3a1dfa86",
"isSidechain": true,
"userType": "external",
"cwd": "/Users/kevin/src/tries/2026-01-16-codex-sessions",
"sessionId": "047be05c-c85e-415d-bc06-cc3ed9ae7310",
"version": "2.0.76",
"gitBranch": "",
"agentId": "afe00e9",
"message": {
"model": "claude-sonnet-4-5-20250929",
"id": "msg_015iNmjrJRxZqKio8h8dQ9Ux",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "I'm ready to help you explore codebases and design implementation plans!\n\nAs a read-only planning specialist, I can:\n\n1. **Explore your codebase** using:\n - `Read` to examine file contents\n - `Glob` to find files matching patterns\n - `Grep` to search for specific code patterns\n - `Bash` for read-only operations (ls, cat, git log, etc.)\n\n2. **Design implementation plans** by:\n - Understanding existing patterns and architecture\n - Creating step-by-step strategies\n - Identifying dependencies and trade-offs\n - Recommending the most critical files for implementation\n\n3. **Provide clear outputs** with:\n - Absolute file paths (never relative)\n - Relevant code snippets\n - Detailed reasoning\n - No emojis\n\n**Important**: I cannot and will not modify, create, or delete any files. My role is strictly exploration and planning.\n\nWhat would you like me to help you design? Please share:\n- The requirements or feature you want to implement\n- Any specific perspective or approach you'd like me to take\n- Any relevant context about your codebase"
}
],
"stop_reason": null,
"stop_sequence": null,
"usage": {
"input_tokens": 872,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"cache_creation": {
"ephemeral_5m_input_tokens": 0,
"ephemeral_1h_input_tokens": 0
},
"output_tokens": 266,
"service_tier": "standard"
}
},
"requestId": "req_011CXCMqNPgtAHWNu3PcbESC",
"type": "assistant",
"uuid": "15df446d-a5a6-4dd8-9645-98425b6644d9",
"timestamp": "2026-01-17T04:59:35.301Z"
}
01KF55J1E9YMTJEP85C3J55AHD