← All artifacts

ChatGPT

ChatGPT desktop forensics: local threads in plaintext with every tool call and command, cached cloud conversations and images, automations and hooks.

Status
available
CLI plugin
ai.chatgpt
Categories
ai, communication

Overview

Since July 2026, "ChatGPT" for Mac is OpenAI's unified Electron app, with Chat, Work and Codex modes under the bundle ID com.openai.codex. Unlike most chat clients, it keeps locally run threads in plaintext under ~/.codex/, which it shares with the Codex CLI, and caches its chatgpt.com traffic in an ordinary Chromium HTTP cache. The ai.chatgpt plugin collects that footprint.

What sets this collector apart:

  • Local threads recovered in plaintext, including every tool call and shell command the agent ran, with inputs, outputs and exit codes.
  • Cached cloud conversations and generated images recovered from the HTTP cache.
  • Automations and hooks surfaced as persistence: scheduled prompts with their run history, MCP servers, the notify command and lifecycle hooks.
  • Desktop and CLI attribution: every thread is attributed to the desktop app or the Codex CLI, so activity is not double-counted when both are in use.
  • Secrets are never emitted: OAuth tokens and API keys are recorded as present, never as values.

What Each Source Yields

  • Threads (rollouts and sqlx databases) - The thread catalog (title, first user message, working directory, model, creator account, origin, archived and pinned state) and each thread's items: messages, tool calls, command executions, web searches, turns and token usage. Rollouts are copied before parsing, because the app may append to them while it runs.
  • Cloud conversations (codex-dev.db and HTTP cache) - ChatGPT conversations listed in the desktop catalog, and cached backend-api responses parsed into messages. Messages seen in more than one source are cross-referenced, and differences are flagged.
  • Automations - Each scheduled prompt's text, recurrence rule, working directories and status, with run history and inbox items. A scheduled prompt runs an agent without the user present, so treat it as a persistence and execution lead.
  • MCP servers and hooks - Command, arguments, environment variable names and transport for each MCP server; event, matcher and command for each hook; and the resolved path and SHA-256 of local executables and scripts.
  • Drafts, prompt history, memories and goals - Composer drafts, prompts the user typed, stored memories, thread goals and queued prompts.
  • Workspaces - Files the agent wrote for threads with no project folder, under ~/Documents/Codex/.
  • Logs, browser and installation - Desktop and database logs, in-app browser visits, saved-login metadata (origin and use counts, never passwords), installer attribution, app bundles and first desktop use.

What the Collector Does Not Guarantee

Cloud conversations are recovered from local caches, not from OpenAI's servers. What is found depends on what the app cached and what has not yet been evicted, so a recovered set is not a guarantee of complete conversation history. Absence from the collection is not evidence that a conversation did not happen.

ChatGPT Classic (the former native app, com.openai.chat) is not yet collected. Its conversation cache is encrypted with a key held in the login Keychain, and the collector never reads the Keychain. Classic support is planned; decryption will need a key supplied by the examiner.

~/.codex/ is shared with the Codex CLI. Threads started from the CLI are counted but not emitted by default; they belong to the planned Codex CLI collector. Set include_cli_threads to emit them with ChatGPT's records.

Privacy Defaults

  • Secrets are redacted in parsed records. Values matching token, secret, key, password, auth and cookie patterns are replaced with a short hash placeholder, so equal secrets still correlate without being disclosed.
  • Raw evidence is copied byte-for-byte. Rollouts, the SQLite databases, logs and kept cache entries are preserved as found and hashed with SHA-256.
  • Secret-bearing files are not copied (auth.json, shell snapshots, cookie and saved-login databases) unless include_secrets is set. Shell snapshots yield variable and function names only.
  • Encrypted values are never decrypted. Cookie values and model reasoning are recorded as present only.
  • skip_content collects metadata only: message, tool, draft, prompt, memory, log and title text is dropped while structure, counts and tool names remain.

Analysis Tips

  • Reconstruct agent activity: Follow a thread's tool calls and commands in order, then compare them with the files in its working directory or ~/Documents/Codex/.
  • Review automations and hooks for persistence: Check each automation's prompt, schedule and working directories, and look for hook commands or MCP executables outside standard locations.
  • Separate desktop from CLI use: Use each thread's origin to tell work done in the app from work done in a terminal.
  • Compare sources: A conversation present in the HTTP cache but missing from the catalog, or the reverse, indicates partial eviction rather than absence.
  • Correlate with the system timeline: Align thread and command timestamps with FSEvents, Unified Logs and Quarantine records to place AI-assisted activity in context.

Related Artifacts

  • Claude Desktop - Another AI assistant with cached conversations and MCP servers
  • Persistence - Cross-check automations, hooks and MCP executables against launch items
  • Shell History - Compare agent-run commands with commands the user typed
  • FSEvents - Match files an agent wrote to filesystem activity
  • Unified Logs - Correlate agent activity with process launches

References

Data sources

rollout-*.jsonl, state_N.sqlite, thread_history_N.sqliteJSON Lines / SQLite

~/.codex/sessions/, ~/.codex/archived_sessions/ and ~/.codex/

Locally run threads in plaintext: user and assistant messages, tool calls with inputs and outputs, shell commands with exit codes, web searches, turns and token usage. Reasoning is recorded as present with its encrypted length only

codex-dev.dbSQLite

~/.codex/sqlite/

The desktop thread catalog, including ChatGPT cloud conversations, plus scheduled-prompt automations with their run history and inbox items

Cache_Data/Chromium Simple Cache

~/Library/Caches/Codex/Default/Cache/ and Partitions/*/Cache/

Cached chatgpt.com backend-api responses parsed into cloud conversation messages, account and memory responses, and generated images extracted as files

.codex-global-state.jsonJSON

~/.codex/

Composer drafts, prompt history, thread activity times and first desktop use. Conversation resume tokens are recorded as present only

config.toml, hooks.jsonTOML / JSON

~/.codex/

MCP servers, plugins, the notify command and lifecycle hooks, with local executables and hook scripts resolved and hashed for persistence review. Environment values are redacted

Project-less workspacesDirectory

~/Documents/Codex/YYYY-MM-DD/<slug>/

Files the agent wrote (outputs/) and its scratch area (work/), hashed and copied, or inventoried only with skip_workspaces

LogsText / SQLite

~/Library/Logs/com.openai.codex/ and ~/.codex/logs_N.sqlite

Desktop log files in UTC date folders and the structured log database, whose rows carry thread and process IDs

Application stateJSON / LevelDB / SQLite / plist

~/Library/Application Support/Codex/ and ~/Library/Preferences/

In-app browser visits, cookie metadata, Local Storage keys, memories, goals and queued prompts, installer attribution, updater and Sentry state. Secret-bearing files are parsed into redacted records and not copied by default