You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: ChatGPT desktop app provider support #234
Codeburn currently has a --provider chatgpt flag but it returns zero data. The ChatGPT desktop app (macOS) stores local data at:
~/Library/Application Support/com.openai.chat/
~/Library/Application Support/com.openai.atlas/
Both directories contain SQLite databases (logs_2.sqlite, state_5.sqlite) but they do not appear to contain token-level usage data in a format codeburn can parse.
Expected Behavior
Running codeburn report --provider chatgpt should surface token usage and cost data from ChatGPT desktop app sessions, similar to how Claude Code sessions are read from ~/.claude/.
If the ChatGPT desktop app does not expose per-session token data locally, an alternative approach could be reading from the OpenAI API usage endpoint (requires an API key) or supporting the OpenAI Codex CLI session format as a proxy for GPT model usage.
Would be happy to share more details about the local file structure if helpful.
redacts the home directory to ~ in text and JSON output
does not read conversation rows, message text, or column values
The goal is to confirm whether ChatGPT Desktop exposes defensible local token/cost fields before shipping a provider. If the diagnostic shows stable columns like prompt_tokens, completion_tokens, model, or cost_usd, the next PR can add the real provider with fixtures. If it only shows state/log tables, this should stay blocked on upstream local storage/API data rather than estimating costs from message text.
Once the PR branch is available locally, the useful command for affected machines is:
codeburn doctor chatgpt-desktop --format json
If the app data is in a custom location:
CODEBURN_CHATGPT_DESKTOP_DIRS="/path/to/com.openai.chat:/path/to/com.openai.atlas" \
codeburn doctor chatgpt-desktop --format json
On my machine those ChatGPT Desktop roots are not present, so the local result is storage-not-found; this needs output from a machine that has the desktop app data.
the part that breaks parsing chatgpt desktop's sqlite isn't reading the files, it's that those databases are private state openai changes between minor app versions. logs_2.sqlite and state_5.sqlite have no documented schema and no commitment to backward compatibility, so the next desktop update can rename columns or restructure tables without notice. you'd be building on an interface that's free to break weekly. the usage API has a stable contract but loses per-session granularity, which is what codeburn actually needs. no clean middle path unless openai ships a local usage export.
Closing as not planned for now, blocked upstream: the diagnostic spike (#314, codeburn doctor chatgpt) and the analysis in this thread stand. The ChatGPT desktop databases are private state whose schema OpenAI reshuffles between minor versions, and they do not expose stable per-message token usage, so a provider built on them would silently break and misprice. The --provider chatgpt flag remains reserved. Happy to reopen the moment OpenAI ships stable local usage data (or an export/API worth polling); subscribe here if you spot that happening.
Reporting back with the output you asked for, from a machine that has the ChatGPT Desktop data. Agreeing with the close, and adding a data point that strengthens it.
I ran the #314 spike branch (spike/chatgpt-desktop-provider, b0c9571) against my install.
The part worth noting:com.openai.chat no longer contains any SQLite databases at all. The whole directory is 108 KB and holds only app_pairing_extensions/ stubs. The logs_2.sqlite and state_5.sqlite files I described when I opened this issue in May are gone as of the build above. Every database the diagnostic found is under com.openai.atlas, and all of it is ordinary Chromium plumbing.
So the concern in this thread was not just that the schema is undocumented. Between May and September the files themselves disappeared. Anything built on them would have shipped and then broken within one release cycle.
One small note on the spike itself: findSqliteFiles uses maxDepth: 4, which misses browser-data/host/GPUPersistentCache/GPUCache/<hash>/cache.db at depth 5. I confirmed by hand that it is a GPU cache with no usage columns, so it does not change the conclusion, but the default depth is slightly too shallow for the Atlas tree if this is ever revived.
Happy to re-run this if OpenAI ships a local usage export and you want fresh schema output.
Activity
ozymandiashh commentedon May 11, 2026
Implemented this as a diagnostic spike in PR #314: #314
The PR intentionally does not add a real
chatgptusage provider yet. It addscodeburn doctor chatgpt-desktop, which:~/Library/Application Support/com.openai.chatand~/Library/Application Support/com.openai.atlaslogs_2.sqlite/state_5.sqlite~in text and JSON outputThe goal is to confirm whether ChatGPT Desktop exposes defensible local token/cost fields before shipping a provider. If the diagnostic shows stable columns like
prompt_tokens,completion_tokens,model, orcost_usd, the next PR can add the real provider with fixtures. If it only shows state/log tables, this should stay blocked on upstream local storage/API data rather than estimating costs from message text.Once the PR branch is available locally, the useful command for affected machines is:
If the app data is in a custom location:
CODEBURN_CHATGPT_DESKTOP_DIRS="/path/to/com.openai.chat:/path/to/com.openai.atlas" \ codeburn doctor chatgpt-desktop --format jsonOn my machine those ChatGPT Desktop roots are not present, so the local result is
storage-not-found; this needs output from a machine that has the desktop app data.m13v commentedon May 24, 2026
the part that breaks parsing chatgpt desktop's sqlite isn't reading the files, it's that those databases are private state openai changes between minor app versions. logs_2.sqlite and state_5.sqlite have no documented schema and no commitment to backward compatibility, so the next desktop update can rename columns or restructure tables without notice. you'd be building on an interface that's free to break weekly. the usage API has a stable contract but loses per-session granularity, which is what codeburn actually needs. no clean middle path unless openai ships a local usage export.
ozymandiashh commentedon Aug 3, 2026
Closing as not planned for now, blocked upstream: the diagnostic spike (#314,
codeburn doctor chatgpt) and the analysis in this thread stand. The ChatGPT desktop databases are private state whose schema OpenAI reshuffles between minor versions, and they do not expose stable per-message token usage, so a provider built on them would silently break and misprice. The--provider chatgptflag remains reserved. Happy to reopen the moment OpenAI ships stable local usage data (or an export/API worth polling); subscribe here if you spot that happening.nkmd108 commentedon Sep 8, 2026
Reporting back with the output you asked for, from a machine that has the ChatGPT Desktop data. Agreeing with the close, and adding a data point that strengthens it.
I ran the #314 spike branch (
spike/chatgpt-desktop-provider,b0c9571) against my install.Versions: ChatGPT Desktop
26.901.51231, ChatGPT Atlas1.2026.189.1, macOS 26.6.2.The part worth noting:
com.openai.chatno longer contains any SQLite databases at all. The whole directory is 108 KB and holds onlyapp_pairing_extensions/stubs. Thelogs_2.sqliteandstate_5.sqlitefiles I described when I opened this issue in May are gone as of the build above. Every database the diagnostic found is undercom.openai.atlas, and all of it is ordinary Chromium plumbing.So the concern in this thread was not just that the schema is undocumented. Between May and September the files themselves disappeared. Anything built on them would have shipped and then broken within one release cycle.
One small note on the spike itself:
findSqliteFilesusesmaxDepth: 4, which missesbrowser-data/host/GPUPersistentCache/GPUCache/<hash>/cache.dbat depth 5. I confirmed by hand that it is a GPU cache with no usage columns, so it does not change the conclusion, but the default depth is slightly too shallow for the Atlas tree if this is ever revived.Happy to re-run this if OpenAI ships a local usage export and you want fresh schema output.