1. Confirm The Binary And Environment
Run:env.hasApiKeymust betrueenv.autoSyncEnabledmust betruefor automatic uploadsenv.codexAutoSyncEnabledmust betrueto include Codex in auto-synclocal.codexDirshould betrueif a Codex sessions directory is detectedlocal.claudeCodeDirshould betrueif Claude Code local logs are present
hasApiKey is false, run:
2. How Auto-Sync Actually Works
Auto-sync runs only whenCOSTHAWK_AUTO_SYNC=true.
COSTHAWK_AUTO_SYNC=false: no local usage is synced automaticallyCOSTHAWK_AUTO_SYNC=true+COSTHAWK_CODEX_AUTO_SYNC=true(or unset): sync Claude + CodexCOSTHAWK_AUTO_SYNC=true+COSTHAWK_CODEX_AUTO_SYNC=false: sync Claude only
3. Codex Session Discovery (npm + brew users)
Codex installation method can change where session logs are stored. CostHawk now checks multiple standard locations, including:~/.codex/sessions~/.config/codex/sessions~/.local/share/codex/sessions
CODEX_HOME automatically ($CODEX_HOME/sessions).
If a user has a custom location, set:
4. Manual Codex Verification Flow
Run these in order:sessionsParsed > 0 and a payload preview/files list when dry run is enabled.
5. Manual Claude Code Verification Flow
6. If User Still Sees No Codex Sessions
Ask for these artifacts:- Output of
npm exec --yes costhawk@latest -- --self-test - Output of
npm exec --yes costhawk@latest -- --what-we-read - Output of
costhawk_list_codex_sessions - Output of
costhawk_sync_codex_usagewithdryRun=true,includeFileList=true,format="json"
- missing env/auth
- auto-sync disabled
- directory/path mismatch
- parsing mismatch for a specific Codex log format
7. Update Behavior
If MCP is configured withnpx/npm exec and costhawk@latest, users normally get new releases automatically on restart.
To force refresh:
