Repository navigation
Releases
v1.7.5: read compressed Codex logs
Codex now compresses its older session logs, and Sipcode reads them.
Fixed
- Compressed Codex logs are read. Current Codex compresses older session logs to
rollout-*.jsonl.zstand keeps only the newest ones as plain.jsonl. Sipcode skipped the compressed ones, so it saw almost none of a Codex user's history:forecastsaid it needed more days,limitsstarted again at 0%, andstats,why,today,trend,impactandregressmissed most sessions. Sipcode now reads them exactly like plain logs, on Node.js 22.15 or newer (zstd ships in Node's own zlib, so there is no new dependency and still no network). A session with both a plain and a compressed log is read once, from the plain log. A damaged or cut-off compressed log is counted as unreadable, never a crash. - Older Node.js: a clear warning. On a Node.js without zstd the compressed logs are still counted and reported (see "Logs Sipcode could not read" below). JSON output is unchanged; with
--jsonthe note "N compressed Codex log(s) (.jsonl.zst) skipped: reading them needs Node.js 22.15 or newer (you have vX)." goes to stderr. regresssandbox warning with--agent. The "could not be read" WARNING told the user to allow read access to both log folders, and with--agent codexit named an empty one ("allow read access to and ..."). It now names only the folders the run read.regress --bug-reportwith nothing to report says so. With no finding, the flag used to print only the plain result, which Codex read as "no output". It now ends with "No bug report: there is no finding to report." The answer was and is always on stdout.
Changed
- Logs Sipcode could not read are impossible to miss. When some log files cannot be read (compressed Codex logs on a Node.js older than 22.15, a damaged or unreadable file, a folder that cannot be listed),
stats,today,forecast,trend,impact,why,receipt,drift,limitsandregressnow start their terminal output with one line per reason, for example "warning: 3 Codex log file(s) could not be read (compressed .jsonl.zst logs need Node.js 22.15 or newer; you have v22.11.0). Numbers below leave them out." It used to be a small note, often the last line and on stderr, andwhy,receiptanddriftdid not mention these logs at all. With--jsonthe notes stay on stderr and the JSON is unchanged (statskeeps itswarningsarray). When every log is read, the output is byte for byte what it was. The four Codex plugin skills say this warning first in their answer. - Codex plugin:
regresschecks the Codex logs by default. A firstregressover large Claude Code logs can take a minute or more (49 seconds on 5.4 GB on the maintainer's machine; about 1 second once the usage cache is warm), Codex stopped the command after about 10 seconds with empty output, and a sandbox that cannot write~/.sipcodenever warms the cache. When the user asks about Codex or names no tool, the regress skill now runssipcode regress --bug-report --agent codex(Codex logs only, about 1 second). It reads the Claude Code logs only when the user asks about Claude Code, says first that the run can take a minute or more, and gives the command a timeout of at least 3 minutes. Empty output is never reported as a result. - README: Node.js 22.15 or newer is needed to read compressed Codex logs.
Notes
scripts/verify-counts.mjs(the independent counter) reads.jsonl.zsttoo, decoding it withnode:zlibitself, so it cannot agree with a Sipcode that skips them. On the maintainer's frozen logs it matches Sipcode on all 17 Codex logs (15 of them compressed).- Test count: 2,225 to 2,409 (
npx vitest run, which includes the 20 e2e tests).
v1.7.4: leaner Codex plugin answers
The Codex plugin uses fewer requests per answer.
Changed
- Codex plugin: one command per answer. Each skill used to run
sipcode --versionbefore the real command. Every extra command is another request that re-sends the whole chat, so in a long chat that check cost about as much as the question itself (about 108,000 tokens in one measured chat on the maintainer's machine). Skills now run the real command straight away; ifsipcodeis not found they give the install hint, and if Sipcode does not know a command or option they give the update hint. - README: ask Sipcode questions in a new, short Codex chat, and start a new chat after updating the plugin (a chat keeps the skill instructions it started with).
Fixed
- Usage cache on Windows. Saving the cache renames a temp file; antivirus scanning the new file, or another open handle, can refuse that rename for a moment (EPERM, EBUSY, EACCES), and the update was skipped. It is now retried for about a second.
Notes
- Test count: 2,222 to 2,225 (
npx vitest run, which includes the 20 e2e tests).
v1.7.3: readable plugin answers and honest why wording
Clearer answers from the Codex plugin, and honest labels for two lines in sipcode why and sipcode stats.
Changed
- Codex plugin: numbers read the way the terminal shows them. The spend and why skills round raw JSON values the way Sipcode's terminal does: dollars to the cent ("under $0.01" below a cent), whole percents (one decimal below 1%), thousands separators, and no ISO timestamps. They never invent, add up or recompute a number. Before, Codex could answer with values such as
$3.2481702571428572or88.99999999999999%. - Codex plugin: limits from the terminal output. The limits skill runs
sipcode limitswithout--json, because its answer is mostly times and Sipcode prints them in your local time zone. A limit that has reset is described as the terminal says it ("no readings since it reset", or "reset since your last Codex request"), never with the percent from before the reset. The "what used it" list is described as use of the limit in the current period. why: "largest requests", not "most expensive tool calls". The list credits each tool call with the tokens of the whole request that made it: mostly the context sent with that request, split evenly when one request made several calls. It ranks the largest requests, not what each tool call cost. The heading is now "largest requests (the tool call each one made):", each row says "N tokens in the request that called ...", and a note under the list says what the tokens are. The MCPaudit_latest_sessiondescription,docs/MCP.mdand both why skills say the same. JSON keys are unchanged.whyandstats: the tokens that are not output are context, not exploration. Every request re-sends the conversation so far, so most non-output tokens are that context, much of it read from cache at a fraction of the price. Thewhyone-liner now reads "you used N tokens. M were output (text, code and reasoning). the other K were context sent with each request, P% of it read from cache."statssays "the other Y% was context sent with each request, P% of it read from cache", and its HTML card says "the rest is context sent with each request". Only theoneLinerstring changes inwhy --json.why: the output ratio says what it is a share of. It leaves cache reads out (it has since 1.4.0), so the line now reads "of the tokens not read from cache" instead of "of all tokens".
Notes
- A guard test keeps "expensive tool calls" and "exploration, re-reads, and idle context" out of user-facing files.
- Test count: 2,206 to 2,222 (
npx vitest run, which includes the 20 e2e tests).
v1.7.2: Codex plugin and sipcode regress
Ask Codex about your usage in plain words with the new Sipcode plugin, and check whether a Claude Code or Codex update made things worse with sipcode regress.
Added
sipcode regress. Checks your own Claude Code and Codex logs for regressions and pins each one to the version that brought it, comparing each version with your other versions: prompt-cache misses on back-to-back turns, a cache that stays cold after an idle break, main-conversation cache written with the 5-minute TTL, large uncached input after tool results, the whole cache rebuilt about every hour, and a Codex version using more of your limit per token than your other versions on the same plan and window. Findings that match a confirmed regression (R1 to R5) say so; others are a signal worth reporting, not proof.--bug-reportadds a GitHub-ready block (token counts only),--json,--agent,--min-n(default 20). Exit code 2 and "Nothing to analyse ... This is NOT a clean result." when no logs could be read.- Sipcode plugin for Codex (
plugins/sipcode, marketplace in.agents/plugins/marketplace.json): four skills that answer "how much did I spend", "how close am I to my limit", "why was that session expensive" and "did it get worse after an update" by running the installedsipcodeCLI. Add it withcodex plugin marketplace add Anuj7411/sipcodeandcodex plugin add sipcode@sipcode; if you use Codex only in the ChatGPT desktop app, run the same two commands asnpx -y @openai/codex plugin ...and restart the app (see the README). Skills only: no hooks, no MCP server, no network calls. - Independent check:
scripts/verify-counts.mjsrecomputes everyregress --jsonnumber (coverage, the five Claude Code tables, the Codex table, the findings) from the raw logs without Sipcode code. All match on the maintainer's logs.
Changed
- Period commands now also note Claude Code log folders they could not read (they already did for Codex).
- The usage cache stores each Claude Code request's version, entrypoint and two flags, so
regressreuses it; the cache is rebuilt once after the update.
Notes
regressis not an MCP tool: a first run reads every transcript and can take longer than the MCP time limit. The MCP server still has 16 tools.- Test count: 2,108 to 2,206 (
npx vitest run, which includes the 20 e2e tests).
v1.7.1: Codex limit tracking
Sipcode now reads the usage-limit readings Codex writes into its own logs: when you will hit your Codex limit, what used it, and whether it may have shrunk.
Added
sipcode limits(Codex). For each limit window the logs report (5-hour, weekly, 30-day, named from the window length): percent used, reset time, and when it runs out at this pace. The pace is the percent used divided by the time since the period started, counted up to now, so the estimate moves later while Codex is idle. Zero network calls; "as of" is your last Codex request.- What used it. The current period's top 5 sessions and projects (folder name only), with Codex's automatic reviews (
codex-auto-review) as one line. Each rise in the percent is shared by the requests made since the previous rise, in proportion to their tokens; a rise with no request on this computer is shown as unattributed, since limits are shared with other devices and Codex cloud. Attributed plus unattributed equals the percent used. - Tokens per 1%, and a possible limit cut. How many tokens 1% of a limit bought in each finished period with at least 20% used, compared only within one model (90% or more of the period's tokens). Periods that started on the same day also show their start time (
Jul 5 16:39). A period that bought at most half the median of at least two earlier periods is flagged as a possible limit cut, with a note that Codex use on other devices or in the cloud can look like one. On the maintainer's logs this flags the week of Apr 13: 77K tokens per 1% against 425K and 357K on gpt-5.4, about 5x fewer. - Options:
--json,--since <window>(default90d, how far back the tokens-per-1% history goes),--here(narrows only the "what used it" list).--agent claude-codestops with E009: Claude Code's logs do not record limits. todayadds one line for the Codex limit closest to running out, when Codex has logged limit readings. Without them the output is byte-identical;today --jsonis unchanged.- MCP: new tool
get_codex_limits(optionalsince) returns the same JSON assipcode limits --json. 16 tools. - Independent check:
scripts/verify-counts.mjsrecomputes the limits from the raw logs without Sipcode code (newest percent and number of periods per window, the "what used it" lines of the current period, attributed plus unattributed against the rise of every period, tokens per 1%, the possible cut) and compares them withlimits --json. All match on the maintainer's 15 Codex logs (1,146 readings).
Notes
- A limit that resets early (seen on a 30-day window right after it reached 100%) starts a new period even when the new reset time is within the drift tolerance.
- Older Codex versions refresh the limit reading once per turn, so a rise is shared by the requests since the previous rise, not only those since the previous reading.
- A reading logged after its own reset time, or one whose reset time is more than 15 minutes earlier than the open period's, is stale (older Codex repeats a turn's first reading on every line of the turn) and is skipped.
- For contributors: the release smoke test (
npm run test:e2e) now packs into its own temp folder, so asipcode-<version>.tgzkept in the repo root is no longer overwritten and deleted. - Test count: 1,996 to 2,108 (
npx vitest run, which includes the 20 e2e tests).
v1.7.0: Codex analytics
Sipcode now reads OpenAI Codex CLI session logs for spend analytics, and Claude Code totals no longer count requests that a resumed session copies from its parent.
Added
- Codex spend analytics.
stats,today,forecast,trend,impact,why,receiptanddriftread Codex session logs (~/.codex/sessionsand~/.codex/archived_sessions, or the folderCODEX_HOMEpoints to).--agent codexshows Codex only. - Both tools in one view. With no
--agentflag and both tools installed,stats,today,forecast,trendandimpactprint one section per tool, andstats,todayandforecastend with aBoth tools:line (total tokens, then each tool's cost).why,receiptanddriftreport on the newest session across both tools and print a one-line hint when the other tool has a recent session too.--jsonstays one tool per call: without--agentit covers Claude Code and says on stderr that Codex logs were found, so scripts keep working. --herefor Codex, matched against the working folder Codex records for each session.- How Codex tokens are counted. Sipcode reads Codex's per-request usage records, or, in logs from older Codex versions, the change in the running total Codex logs after each request. Cached input is part of Codex's input count, so it is never billed twice. A request copied into a resumed or forked file counts once. On the maintainer's machine, Sipcode's per-file totals equal Codex's own final
total_token_usageon all 15 real session logs. - OpenAI prices. Codex models are priced from OpenAI's API price table (developers.openai.com/api/docs/pricing, and each Codex model's page under developers.openai.com/api/docs/models, as of 2026-10-09: gpt-5-codex, gpt-5.1-codex, gpt-5.1-codex-max, gpt-5.1-codex-mini, gpt-5.2-codex, gpt-5.3-codex, codex-mini-latest), including the long-context rate for prompts over 272,000 input tokens. A model with no known price is shown as unpriced: its tokens are counted, a line says how many the cost leaves out, and it is never shown as $0.
- MCP: the 7 session tools take an optional
agentinput ("claude-code"or"codex"). Still 15 tools. drift --agent,--hereand--session <id>. Pick the tool, limit the check to the folder you are in, or check a specific session instead of the latest.- Codex short session ids are 18 characters (the UUIDv7 timestamp plus random bits), so sessions started close together stay distinct. Claude Code ids are unchanged.
Fixed
- Requests copied into resumed Claude Code sessions were counted twice. When Claude Code resumes a session, the new log file repeats requests from the old one, and Sipcode summed both. On one real machine, counting exactly the files Sipcode reads: 13.37B tokens summed vs 12.00B unique, 11.4% over (3,163 repeated requests in 8 resumed-session files).
stats,today,forecast,trendandimpactnow count each request once. whyandreceipton a resumed session included the parent's copied requests. Worst real case: a session shown as $218.00 whose own spend was $10.20. They now report the session's own requests, and skip a resumed session that holds nothing but copied history.verify_sipcode_impact(MCP) output now parses as JSON. A note used to be appended after the JSON.stats --since allcounted days from 1970 ("20735 days"). The window now starts at your earliest session.whyandreceiptwarned that pricing was out of date (E004) for any older session, because an older session is priced with the price table of its own date. The warning now checks the newest table Sipcode ships, and a Codex section ofstatschecks the OpenAI table.- Cursor next to other tools: with no
--agentflag, a Cursor pick now shows the tools whose logs Sipcode can read (Claude Code, Codex), instead of a Cursor section that could only report error E009. Cursor's E009 stays when neither has logs. - An empty
~/.claude/projectsno longer hides Codex. Claude Code counts as having logs only when it has a transcript, the same rule for every command:why --json,receipt --jsonand MCPaudit_latest_sessionfailed with E003 while Codex had sessions. --hereand copied requests. Logs outside the folder still claim the requests they hold, so a Codex fork whose parent ran in another folder reports only its own requests in period commands, aswhydoes.driftpicked a session with turns but no token usage as "latest" when its metrics were cached. Warm and cold runs now use one rule: a session counts only if it used tokens.- Unpriced tokens in
--jsonand MCP.stats,today,forecast,trendandimpact --jsonprint the "tokens on models without a known price" note on stderr, aswhyandreceiptdo; MCP tools return it as its own text item after the JSON. JSON schemas are unchanged. - Skipped logs in
--json.today,forecast,trendandimpact --jsonprint the note about compressed or unreadable logs on stderr, as in terminal mode. impact:--agent cursorprints the coded E009 like every other command; with no install marker, Codex users are no longer told to runrules --install(it returns E009 for Codex).today's top leak counted reads as re-reads ("4 re-reads" for a file read 4 times); it now says 3.- Codex users whose rollouts are all archived (
archived_sessionsonly) were not detected. stats --htmlwrites.sipcode/stats-codex.htmlfor Codex every time (it used to depend on section order) and.sipcode/stats.htmlfor Claude Code. A Codex section'smetaPricingand "prices from" line show the OpenAI table date.- The usage cache no longer leaves a temp file behind for good when a run is killed mid-write.
- The GitHub Action ran
npx @sipcode/cli@latest; the package issipcode.
Changed
- Lower memory for period commands.
stats,today,forecast,trendandimpactread, dedupe and analyze one log at a time instead of holding every session in memory. On a synthetic 480,000-request log folder, peak memory went from 642 MB to 238 MB forstats --since alland from 752 MB to 265 MB fortoday(first run). On one real 2.4 GB log folder,stats,today,trendandimpactpeak at about 1.5 GB, against 2.3 to 3.4 GB in 1.6. Windowedstatsandtrendread only older logs that can hold a copy of a request in the window, and only their request keys (Codex logs too), sostatsfor 30 days is back to its 1.6 speed. - More Codex models priced: gpt-5-codex, gpt-5.1-codex, gpt-5.1-codex-max, gpt-5.1-codex-mini, gpt-5.2-codex and codex-mini-latest, from each model's page on developers.openai.com (as of 2026-10-09). The OpenAI table is now dated 2026-10-09.
impacton Codex shows one more line wherever it compares before and after: Sipcode does not act inside Codex yet, so the difference is not caused by Sipcode (on stderr with--json, its own item in MCP).manifest --delta/--explainnow say they are not supported, with no version promise.- README: Node.js on Linux is installed from nodejs.org (nvm), since Ubuntu's own package is often older than Node 20.
- PRIVACY.md: the Future telemetry section keeps its substance (opt-in, off by default, announced) without the major-version promise.
todayandforecastare faster on repeat runs. In measurement on a warm cache,todaywent from about 30-43s to about 1.4s andforecastfrom 24-32s to about 0.5s, with byte-identical output. The first run takes as long as before. They keep a local cache at~/.sipcode/usage-cache/<agent>.json: token counts, models, timestamps, the session's working folder and the paths of files the agent read. Never message text, never uploaded. PRIVACY.md says how to delete it.drifthas a new cache file,~/.sipcode/drift/sessions-v3.jsonl, built automatically on the first run. The oldsessions.jsonlis no longer used and can be deleted. Drift is also faster: about 6.1s to 2.3s cold and 1.24s to 0.29s warm in measurement.- Help text: every
--agentoption listscodex, andwhydescribes itself as auditing Claude Code or Codex sessions. - Commands that do not read Codex say "not supported for Codex yet" (error E009) for
--agent codex, instead of showing Claude Code data under a Codex flag.
Not supported for Codex yet
- Writing rules to
AGENTS.md(rules, and the rules step ofinit), registering the MCP server in Codex, the proxy and hooks (proxy,hygiene),estimateandbenchmark. - Compressed Codex logs (
.jsonl.zst) are skipped, and a note says how many.
Internal
scripts/verify-counts.mjs(dev only, not shipped): an independent token counter that imports nothing from Sipcode and cross-checks every period command, cold and warm cache, against the same Claude Code and Codex logs. On the maintainer's real logs: 210 checks match, 0 mismatches (Claude Code: 188 files, 26,782 requests, 3,182 copied requests dropped across 8 files; Codex: 15 files, 930 requests).- Three slow tests got their own timeouts after measuring past or near vitest's 5s default under full-suite load. Snapshot files are pinned to LF line endings (
.gitattributes), so a test run on Windows no longer leaves them modified. - Test count: 1,404 to 1,996 (
npx vitest run, which includes the 19 e2e tests).
v1.6.21: accuracy release
An accuracy release. Several of Sipcode's numbers were wrong in ways that matter. This release fixes them and says so plainly.
Fixed
- Token totals were counted 2 to 3 times. Claude Code writes one log line per content block of a response and repeats the request's usage on every line. Sipcode summed every line, so all totals (
stats,today,why,forecast,trend,impact,receipt,estimate) were inflated. On one real machine: 29.1 billion tokens reported vs 13.1 billion actual, across 113 sessions. Each request is now counted once. - Model prices now match Anthropic's official table. Opus 4.5 to 4.8 were priced at Opus 4's $15 / $75 per million tokens instead of $5 / $25. Opus 5, Opus 5.5, Sonnet 5, Sonnet 5.5, Fable 5, Fable 5.1 and Haiku 5.5 had no price at all and were costed at $0. 1-hour cache writes (2x input; Claude Code subscriptions use them for the main conversation) are now priced separately from 5-minute writes (1.25x), and Haiku 5.5's higher rate above 100K-token prompts is applied. With the token fix, the same machine's estimated spend went from $27,950 to $10,888.
- Duplicate-read and idle-file costs charged each read the whole cached conversation of the request that made it, instead of the file. They now use the size of what the read actually returned, so Claude Code's own "file unchanged since last read" stub costs almost nothing.
sipcode init --yesdid nothing in scripts and CI. With non-interactive stdin, importing the MCP tool count started the MCP server, which exited the process as soon as stdin closed. Init now completes and creates its files.- Python virtual environments are no longer scanned into the manifest (#22). They are detected by marker (
pyvenv.cfg,conda-meta/), whatever the folder is called, including a venv created in the project root itself. estimatelabels model rows by tier only ("opus", "sonnet", "haiku") and predicts against Opus 5.5, Sonnet 5.5 and Haiku 4.5.- Cache writes logged only in the nested 5-minute / 1-hour breakdown (Claude Code before 2.1.152) are now counted.
Changed
- The benchmark is described as what it is. The 20 transcript pairs behind the 62.6% median are synthetic, generated by
benchmark/_gen/build-corpus.mjs. The methodology previously called them "captured" sessions, which was inaccurate. Every page that cites 62.6% now says the corpus is synthetic and that real savings depend on the workload. The percentage is unchanged. The dollar total is $22.48, not $67.43, now that Opus 4.7 is priced correctly.
Internal
v1.6.20
Added
--herenow works ontoday,forecast,trend, andimpact. Previously onlywhy,stats, andreceiptaccepted it; the others errored with 'unknown option'. All analytics/report commands now scope to the current project consistently.
Tests: 1,388 → 1,389, full suite green. Full changelog: https://github.com/Anuj7411/sipcode/blob/main/CHANGELOG.md
v1.6.19
A growth feature plus a thorough hardening pass. A full component audit found and fixed a batch of edge-case bugs before more users hit them.
Added
- One-time GitHub-star nudge after
sipcode proxy --statsshows real savings (once per machine, never in--json, zero network calls). - README live GitHub-stars + npm-downloads badges.
Fixed
- Proxy output caps no longer hide a command's failure.
tsc/git/find/ls/grep/npmcaps usedcmd | head(exit 0 even on failure — a failingtsclooked like a clean build). Nowset -o pipefail; cmd | awk 'NR<=N': capped output, real exit code, no SIGPIPE false-failure. --hereworks for any project path (dots, spaces, parens) — matches Claude Code's exact dir encoding.today/forecast/trendno longer crash on--agent autoor a typo.init --no-proxy/--no-marker/--no-verify-mcp/--no-claude-mdandreceipt --no-shareare now honored.cat/greprewriters: no longer mangle bash'stypebuiltin;grep -rnkeeps its lines.- Empty/in-flight sessions skipped consistently in
impact,why, and MCPaudit_latest_session.
Tests: 1,373 → 1,388, full suite green. Full changelog: https://github.com/Anuj7411/sipcode/blob/main/CHANGELOG.md
v1.6.18
Registry-casing patch. No functional change to the CLI or MCP server.
Fixed
- Corrected
mcpNamecasing for the Official MCP Registry. v1.6.17 shippedio.github.anuj7411/sipcode(lowercase), but GitHub-based registry auth grants theio.github.Anuj7411/*namespace (exact GitHub username case) and the ownership check is case-sensitive. Since npm versions are immutable, v1.6.18 republishes withio.github.Anuj7411/sipcodebaked into package.json so the server can register.
Everything from v1.6.17 (sipcode update, session-pollution fix, opus 4.8) is included. 1,373 tests green.