Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
# this, core.autocrlf=true on Windows checks them out as CRLF, vitest rewrites
# them as LF on the next run, and git reports them modified.
*.snap text eol=lf

# Golden output files compared byte for byte (vitest toMatchFileSnapshot writes LF).
tests/integration/__golden__/* text eol=lf
24 changes: 22 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,26 @@ This log starts at v1.6.5 (the reliability-pillar repositioning). Earlier histor

## [Unreleased]

_Nothing landed since [1.7.4]._
_Nothing landed since [1.7.5]._

## [1.7.5] - 2026-10-15

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.zst` and keeps only the newest ones as plain `.jsonl`. Sipcode skipped the compressed ones, so it saw almost none of a Codex user's history: `forecast` said it needed more days, `limits` started again at 0%, and `stats`, `why`, `today`, `trend`, `impact` and `regress` missed 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 `--json` the note "N compressed Codex log(s) (.jsonl.zst) skipped: reading them needs Node.js 22.15 or newer (you have vX)." goes to stderr.
- **`regress` sandbox warning with `--agent`.** The "could not be read" WARNING told the user to allow read access to both log folders, and with `--agent codex` it named an empty one ("allow read access to and ..."). It now names only the folders the run read.
- **`regress --bug-report` with 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`, `limits` and `regress` now 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, and `why`, `receipt` and `drift` did not mention these logs at all. With `--json` the notes stay on stderr and the JSON is unchanged (`stats` keeps its `warnings` array). 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: `regress` checks the Codex logs by default.** A first `regress` over 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 `~/.sipcode` never warms the cache. When the user asks about Codex or names no tool, the regress skill now runs `sipcode 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.zst` too, decoding it with `node:zlib` itself, 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).

## [1.7.4] - 2026-10-14

Expand Down Expand Up @@ -405,7 +424,8 @@ This release rolls v1.6.9's B3 work (bumped but never published to npm) together

---

[Unreleased]: https://github.com/Anuj7411/sipcode/compare/v1.7.4...HEAD
[Unreleased]: https://github.com/Anuj7411/sipcode/compare/v1.7.5...HEAD
[1.7.5]: https://github.com/Anuj7411/sipcode/compare/v1.7.4...v1.7.5
[1.7.4]: https://github.com/Anuj7411/sipcode/compare/v1.7.3...v1.7.4
[1.7.3]: https://github.com/Anuj7411/sipcode/compare/v1.7.2...v1.7.3
[1.7.2]: https://github.com/Anuj7411/sipcode/compare/v1.7.1...v1.7.2
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<a href="https://github.com/Anuj7411/sipcode/stargazers"><img src="https://img.shields.io/github/stars/Anuj7411/sipcode?color=5B4FCF&label=stars" alt="GitHub stars" /></a>
<a href="https://www.npmjs.com/package/sipcode"><img src="https://img.shields.io/npm/dm/sipcode?color=5B4FCF&label=downloads" alt="npm downloads per month" /></a>
<a href="https://github.com/Anuj7411/sipcode/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-5B4FCF" alt="MIT licensed" /></a>
<img src="https://img.shields.io/badge/tests-2%2C225%20passing-28C840" alt="2225 tests passing" />
<img src="https://img.shields.io/badge/tests-2%2C409%20passing-28C840" alt="2409 tests passing" />
<img src="https://img.shields.io/badge/network%20calls-0-2D3142" alt="zero network calls" />
</p>

Expand Down Expand Up @@ -164,7 +164,9 @@ Sipcode also reads OpenAI Codex CLI session logs (`~/.codex/sessions` and `~/.co

**Prices.** Codex models are priced from OpenAI's API price table ([developers.openai.com/api/docs/pricing](https://developers.openai.com/api/docs/pricing), and each Codex model's page under developers.openai.com/api/docs/models, as of 2026-10-09), 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 still counted, a line under the cost says how many were left out of it, and it is never shown as $0.

**Not supported for Codex yet:** writing rules to `AGENTS.md` (`rules`, and the rules step of `init`), registering the MCP server in Codex, the proxy and hooks (`proxy`, `hygiene`), `estimate` and `benchmark`. `rules --agent codex` and `estimate --agent codex` stop with error E009 instead of showing Claude Code data. Compressed Codex logs (`.jsonl.zst`) are skipped, and a note says how many.
**Not supported for Codex yet:** writing rules to `AGENTS.md` (`rules`, and the rules step of `init`), registering the MCP server in Codex, the proxy and hooks (`proxy`, `hygiene`), `estimate` and `benchmark`. `rules --agent codex` and `estimate --agent codex` stop with error E009 instead of showing Claude Code data.

**Compressed Codex logs.** Codex compresses older session logs to `.jsonl.zst`. Sipcode reads them exactly like plain logs on Node.js 22.15 or newer. On an older Node.js it skips them, and every report starts with a warning that says how many it could not read and that reading them needs Node.js 22.15 or newer. A damaged or unreadable log gets the same kind of warning. With `--json` the warning is a note on stderr and the JSON is unchanged.

### Codex limits: `sipcode limits`

Expand Down Expand Up @@ -286,7 +288,7 @@ OpenAI's docs do not describe a button in the desktop app for adding a marketpla

## How to install (more detail)

Sipcode works on Mac, Linux, and Windows. You need Node.js 20 or newer.
Sipcode works on Mac, Linux, and Windows. You need Node.js 20 or newer, and Node.js 22.15 or newer to read the session logs Codex compresses (`.jsonl.zst`).

### Step 1. Install Node.js

Expand Down Expand Up @@ -487,7 +489,7 @@ Run any of them with `--help` for full options.

## Requirements

- Node.js 20 or newer
- Node.js 20 or newer. Node.js 22.15 or newer to read the session logs Codex compresses (`.jsonl.zst`); on an older Node.js they are skipped, with a warning at the top of each report.
- Claude Code installed (for the proxy hook). Sipcode also works as standalone CLI tools (benchmark, score, etc.) without Claude Code installed.
- Optional: OpenAI Codex CLI, for Codex spend analytics.

Expand Down
6 changes: 3 additions & 3 deletions docs/site/public/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ On a locked, public, synthetic 20-task benchmark corpus (scripted transcript pai

Sipcode also reads OpenAI Codex CLI session logs for spend analytics. `stats`, `today`, `forecast`, `trend`, `impact`, `why`, `receipt` and `drift` accept `--agent codex`; with both tools installed they show one section per tool. Codex models are priced from OpenAI's API price table as of 2026-10-08, and a model with no known price is shown as unpriced, never as $0. The proxy, hooks and rules are not supported for Codex yet. `sipcode limits` reads the usage-limit readings Codex writes into its logs: percent used per limit window, when it runs out at the current pace, which sessions used it, and how many tokens 1% bought over time, with a cautious possible-limit-cut flag.

Sipcode is solo-maintained, MIT licensed, has 2,225 passing tests, and makes zero network calls during normal use. A privacy test in the repo fails the build if any `node:http`, `node:https`, `node:net`, or `node:dns` import is added to `src/`. Your code and transcripts never leave your laptop.
Sipcode is solo-maintained, MIT licensed, has 2,409 passing tests, and makes zero network calls during normal use. A privacy test in the repo fails the build if any `node:http`, `node:https`, `node:net`, or `node:dns` import is added to `src/`. Your code and transcripts never leave your laptop.

## How Sipcode differs from neighboring tools

Expand Down Expand Up @@ -126,7 +126,7 @@ projected month-end $17,674 (range $14,139 to $21,208)

## How to install (more detail)

Sipcode works on Mac, Linux, and Windows. Node.js 20 or newer is required.
Sipcode works on Mac, Linux, and Windows. Node.js 20 or newer is required, and Node.js 22.15 or newer to read the session logs Codex compresses (`.jsonl.zst`).

### Step 1. Install Node.js

Expand Down Expand Up @@ -229,7 +229,7 @@ npm uninstall -g sipcode

## Requirements

- Node.js 20 or newer
- Node.js 20 or newer. Node.js 22.15 or newer to read the session logs Codex compresses (`.jsonl.zst`); on an older Node.js they are skipped, with a warning at the top of each report.
- Claude Code installed (for the proxy hook). Sipcode also works as standalone CLI tools (benchmark, score, etc.) without Claude Code installed.

## License
Expand Down
6 changes: 3 additions & 3 deletions docs/site/public/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ On a locked, public, synthetic 20-task benchmark corpus (scripted transcript pai

Sipcode also reads OpenAI Codex CLI session logs for spend analytics. `stats`, `today`, `forecast`, `trend`, `impact`, `why`, `receipt` and `drift` accept `--agent codex`; with both tools installed they show one section per tool. Codex models are priced from OpenAI's API price table as of 2026-10-08, and a model with no known price is shown as unpriced, never as $0. The proxy, hooks and rules are not supported for Codex yet. `sipcode limits` reads the usage-limit readings Codex writes into its logs: percent used per limit window, when it runs out at the current pace, which sessions used it, and how many tokens 1% bought over time, with a cautious possible-limit-cut flag. `sipcode regress` checks the user's own Claude Code and Codex logs for regressions after an update (prompt-cache misses, 5-minute cache TTL, uncached context, hourly cache rebuilds, Codex limit draining faster per token) and pins each one to the version, comparing each version with the user's other versions. A Sipcode plugin for Codex (`codex plugin marketplace add Anuj7411/sipcode`) lets users ask about spend, limits and regressions in plain words; it runs the installed `sipcode` CLI.

Sipcode is solo-maintained, MIT licensed, has 2,225 passing tests, and makes zero network calls during normal use. A privacy test in the repo fails the build if any `node:http`, `node:https`, `node:net`, or `node:dns` import is added to `src/`. Your code and transcripts never leave your laptop.
Sipcode is solo-maintained, MIT licensed, has 2,409 passing tests, and makes zero network calls during normal use. A privacy test in the repo fails the build if any `node:http`, `node:https`, `node:net`, or `node:dns` import is added to `src/`. Your code and transcripts never leave your laptop.

## How Sipcode differs from neighboring tools

Expand Down Expand Up @@ -57,8 +57,8 @@ Sipcode ships an MCP server exposing 16 tools so Claude Code can introspect its

## Source code

- [GitHub repository](https://github.com/Anuj7411/sipcode): MIT licensed source, 2,225 tests
- [npm package](https://www.npmjs.com/package/sipcode): `sipcode` on npm, current version 1.7.4
- [GitHub repository](https://github.com/Anuj7411/sipcode): MIT licensed source, 2,409 tests
- [npm package](https://www.npmjs.com/package/sipcode): `sipcode` on npm, current version 1.7.5
- [Privacy test](https://github.com/Anuj7411/sipcode/blob/main/src): build-blocking check that no network modules are imported in `src/`

## License
Expand Down
4 changes: 2 additions & 2 deletions docs/site/src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
<div class="badges">
<span class="badge">
<span class="badge-dot"></span>
v1.7.4
v1.7.5
</span>
<span class="badge">
<span class="badge-dot badge-dot--green"></span>
2,225 tests passing
2,409 tests passing
</span>
</div>
<a
Expand Down
6 changes: 3 additions & 3 deletions docs/site/src/components/Hero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import PlotBackground from "./PlotBackground.astro";

// Tier-1 fix #2 — test count from the project root. Single source of truth.
// Update on each release alongside Hero/Footer version labels.
// Last bumped: 2026-10-14 (v1.7.4: one command per plugin answer, Windows cache rename retry; `npx vitest run` count, e2e included).
const TEST_COUNT = 2225;
// Last bumped: 2026-10-15 (v1.7.5: reads compressed Codex logs (.jsonl.zst), regress --bug-report says when there is nothing to report; `npx vitest run` count, e2e included).
const TEST_COUNT = 2409;
---

<section class="hero">
Expand All @@ -19,7 +19,7 @@ const TEST_COUNT = 2225;

<div class="container">
<div class="hero-head-row">
<span class="hero-eyebrow"><span class="hero-tick"></span>v1.7.4 · MIT licensed</span>
<span class="hero-eyebrow"><span class="hero-tick"></span>v1.7.5 · MIT licensed</span>
<span class="hero-head-meta">{TEST_COUNT.toLocaleString()} tests passing</span>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sipcode",
"version": "1.7.4",
"version": "1.7.5",
"mcpName": "io.github.Anuj7411/sipcode",
"description": "Sip your tokens, don't gulp them. Keep Claude Code's context clean: drift detection, re-read dedup, integrity scoring, AST-aware reads, and 16 MCP tools for Claude Desktop.",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion plugins/sipcode/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sipcode",
"version": "1.7.4",
"version": "1.7.5",
"description": "Ask about your Codex usage in plain words: spend, usage limits, why a session was expensive, and whether Codex or Claude Code got worse after an update. Runs the Sipcode CLI on this computer, which reads your local Codex and Claude Code logs and makes no network calls.",
"author": {
"name": "Anuj Ojha",
Expand Down
2 changes: 1 addition & 1 deletion plugins/sipcode/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "sipcode",
"version": "1.7.4",
"version": "1.7.5",
"description": "Ask about your Codex usage in plain words: spend, usage limits, why a session was expensive, and whether Codex or Claude Code got worse after an update. Runs the Sipcode CLI on this computer, which reads your local Codex and Claude Code logs and makes no network calls.",
"author": {
"name": "Anuj Ojha",
Expand Down
2 changes: 1 addition & 1 deletion plugins/sipcode/skills/sipcode-limits/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Answer from the limit readings Codex writes into its own logs on this computer,
| how close they are, when it resets, what used it | `sipcode limits` |
| whether a limit shrank, or the history | `sipcode limits --since all` |

Run it once, without `--json`. This answer is mostly times (resets, run-out estimates), and Sipcode prints them in the user's local time zone, which it reads from this computer; the JSON has UTC timestamps and unrounded values that you would have to convert. Lines Sipcode prints on stderr that start with `note:` are part of the answer.
Run it once, without `--json`. This answer is mostly times (resets, run-out estimates), and Sipcode prints them in the user's local time zone, which it reads from this computer; the JSON has UTC timestamps and unrounded values that you would have to convert. Lines Sipcode prints on stderr that start with `note:` are part of the answer. If Sipcode prints a line starting "warning:" that log files could not be read, say it first in your answer, as printed: the numbers leave those logs out.

## Present numbers

Expand Down
Loading
Loading