Releases: Anuj7411/sipcode
Release list
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.
v1.6.17
Quality-of-life release: a real update path, cleaner numbers, the current model name, and Official MCP Registry readiness.
Added
sipcode update— shows your version +npm i -g sipcode@latest, or--runto upgrade in place. Zero network calls preserved. README "Updating Sipcode" section + FAQ.- MCP Registry readiness —
mcpNamein package.json +server.jsonso Sipcode can list on the Official MCP Registry.
Fixed
- Session-count pollution. Observer/telemetry plugin folders (e.g. claude-mem) and empty zero-token sessions were inflating
stats,today,why,forecast,trend— one machine showed 1,446 sessions when ~21 were real, andtodayreported "0 tokens." Now excluded everywhere (CLI + MCP). estimatenow shows opus 4.8 (was 4.7).- Friendlier first run —
statson a fresh machine says "no Claude Code sessions found yet" instead of falsely claiming transcripts exist.
Tests: 1,363 → 1,373, full suite green.
Full changelog: https://github.com/Anuj7411/sipcode/blob/main/CHANGELOG.md
v1.6.16 — F-CACHE-DEFER + F-NATIVE-GREP
F-CACHE-DEFER + F-NATIVE-GREP — the two P0 fixes from the 2026-06-17 dogfood backlog. Tests 1,317 → 1,363.
This is the third release in 9 days, each one closing a real bug found through dogfood:
- v1.6.14 (Jun 14) — path-normalization fix (the 83x undercount)
- v1.6.15 (Jun 15) — Verified Warm-Fill (mid-session install gap)
- v1.6.16 (Jun 22) — F-CACHE-DEFER + F-NATIVE-GREP
🐛 Fixed
F-CACHE-DEFER: sipcode init no longer invalidates the prompt cache of an active Claude Code session
v1.6.15's Verified Warm-Fill fixed Sipcode's own dedup cache. But a separate problem remained: writing ~/.claude/settings.json mid-session forces Anthropic's prompt cache to reset, which can cost more in extra input tokens than Sipcode saves on tool output. The 2026-06-17 dogfood session: sipcode drift flagged "Cache reuse down 83 points" and the regression dwarfed the proxy savings that day.
v1.6.16 detects active Claude Code sessions before writing settings.json and defers the write to a pending marker at ~/.sipcode/install-pending.json if one exists. The next quiet sipcode command auto-applies the install. The hook script file itself is still written immediately (safe — does not invalidate the cache).
Pass --force to sipcode init if you want to install anyway and accept the cache invalidation.
F-NATIVE-GREP: raised the native-grep cap from 50 to 100 matches
The same dogfood session showed native-grep was 30% of all proxy work but had the lowest signal-kept ratio (65%). Symbol lookups in larger codebases routinely returned 50–100 matches Claude needed for follow-up reads; the 50-cap was too aggressive. Doubling the cap restores most of that signal while still bounding pathological greps. Integrity declaration moves from 0.65 to 0.78.
➕ Added
src/modules/init/sessionDetection.ts— pure module that scans~/.claude/projects/<proj>/sessions/<sid>.jsonlfor files modified within the threshold (default 5 min = Anthropic's prompt-cache TTL).src/modules/init/pendingInstall.ts— marker module at~/.sipcode/install-pending.json(schemasipcode-install-pending/1). Strict version validation rejects unknown future schemas rather than mis-applying. Idempotent.maybeApplyPendingInstall— CLI startup wrapper wired intocli.tsvia a CommanderpreActionhook for every command exceptinit. Fast no-op when no marker; skips when an active session is detected; applies when safe and logs a single line.--forceflag onsipcode initto bypass the active-session detection.- New
StepStatusvariant{ kind: "deferred"; reason: string }for the SETUP card. Renders with the ⏸ glyph.
🔬 Engineering
- Test count: 1,317 → 1,363 (46 new tests)
- Branch `v1.6.16-fixes` shipped as PR #7 for review surface; full suite green every commit
- Each step (detection module / pending-install module / runSystemSetup integration / CLI auto-apply / nativeGrep tune) ships as a separate commit with related tests included, so any single step can be reverted in isolation
📦 Install
```bash
npm i -g sipcode@1.6.16
sipcode init
```
If you have a Claude Code session already running, sipcode init will detect it and defer the cache-invalidating step automatically. No flags needed.
📋 Full changelog
v1.6.15 — Verified Warm-Fill + sipcode init system-setup
Closes the mid-session install gap that yesterday's v1.6.14 surfaced. v1.6.14 fixed dedup for re-reads that happened after install; v1.6.15 fixes it for re-reads that happened before install — back-filling the cache from the Claude Code transcript with zero false-dedup risk by construction.
The story
24 hours ago, dogfood data showed sipcode drift reporting 624,940 tokens wasted on repeated reads while sipcode proxy --stats reported only ~7,553 saved by the dedup row. An 83x gap. Root cause: the dedup cache is empty when Sipcode is installed mid-session, so re-reads of files Claude already read pre-install have nothing to collide against.
Today, after installing v1.6.15 on the same machine and running a fresh session for an hour:
| Before (v1.6.14) | After (v1.6.15) | |
|---|---|---|
drift "Repeated file reads" |
624,940 tokens wasted | no drift detected |
proxy --stats dedup-read fires |
6 | 13 |
proxy --stats dedup-read tokens saved |
~7,553 | ~29,585 |
| Ratio (drift wasted ÷ proxy saved) | 83x | 0x — gap fully closed |
What changed
Verified Warm-Fill. New module src/modules/proxy/prewarmCache.ts walks the active Claude Code transcript JSONL on the hook's first fire per session, finds every full-file Read whose toolUseResult.file.content field records the bytes Claude saw, canonicalizes both transcript and current disk content (LF line endings + UTF-8 BOM stripped), and writes a cache entry only when both hashes agree. Drift between transcript bytes and current disk bytes (file edited externally between historical read and install) drops the candidate silently.
Zero false-dedup by architecture, not by tests. Warmfill only adds entries to the lookup table. The dedup decision rule is unchanged: every Read re-hashes current disk and only dedups on sha + mtime match. If disk drifted between warmfill and re-read, sha differs, the read passes through. There is no code path that produces a wrong dedup. This is a property of the design.
One-shot .warmed marker at ~/.sipcode/proxy-reads/<sid>.warmed prevents the hook from re-walking the transcript on every fire. Written only after a non-bailed warmfill attempt, so transient transcript-unavailable conditions still allow retry next fire.
sipcode init extended with system-setup. Existing project-setup steps (manifest + CLAUDE.md sub-block + output-compression rules) all preserved. New steps run after them on Claude Code targets: detect installation, verify ~/.claude/settings.json writable, install the proxy hook (idempotent — reports "already installed" when signature matches), set the sipcode impact baseline marker, verify the MCP server registers all 15 tools. Style-C output card replaces the legacy single-line success message.
New sipcode init flags: --no-proxy, --no-marker, --no-verify-mcp to opt out of individual system-setup steps. All default to off (run the step).
Architecture detail
Full research + design doc lives at docs/research/2026-06-15-mid-session-cache-warming.md — competitor analysis (read-once, claude-mem, codebase-memory-mcp, semantic-cache-mcp), Claude Code transcript format verified by direct inspection, prior art from Git / Bazel / Nix / HTTP ETag / pg_prewarm, and the locked Verified Warm-Fill procedure with its risk table.
Verification
- 1,317 tests passing (1,266 + 51 new): 27 prewarm unit specs, 5 hookReadDedup warmfill integration specs, 19 init system-setup specs.
- e2e MCP gate green (15 tools registered, each with a schema).
- Privacy guard (S090): zero forbidden network imports in any new file.
- Two consecutive full-suite runs both 1,317 / 1,317 with zero variance.
- Live acceptance test on Anuj's
Answerableproject:.warmedmarkers confirmed in three sessions; drift reports "no regression"; dedup-read row 2.2x more fires and 3.9x more tokens saved vs v1.6.14.
Upgrade
Users on v1.6.14 upgrade with npm i -g sipcode@latest. The proxy hook signature is unchanged at v4; the dynamic import design picks up the new module automatically. No sipcode proxy --install re-run is required.
Full release notes: CHANGELOG.md. Compare: v1.6.14...v1.6.15.
v1.6.14 — Path-normalization fix (dedup hit rate ~50x)
A real bug found in our own dogfood data and fixed before launch.
The bug
Anuj's sipcode drift was reporting 49,218 tokens wasted on duplicate reads in a single session. His sipcode proxy --stats was reporting 3 dedup fires saving ~1,053 tokens across ALL sessions. A ~50x undercount.
Root cause: Claude Code emits the same on-disk file as both C:\foo\bar.ts and c:/foo/bar.ts across different turns. Drift's duplicateReads analyzer correctly normalized those into the same key. The dedup hook (the thing that actually saves the tokens) used the raw string and missed the collision.
The fix
Extracted normalizeFilePath to src/lib/path-normalize.ts as the single source of truth. Lowercases the drive letter on Windows, converts backslashes to forward slashes, resolves through path.resolve, leaves trailing slashes alone (/foo ≠ /foo/). Applied at four call sites:
src/modules/proxy/hookReadDedup.ts— cache lookup AND cache writesrc/modules/proxy/vsRtk.ts— heuristic walker'sseenReadFilessetsrc/modules/transcript/analyzers/topExpensive.ts—readCountsmap (powerssipcode whyduplicate-read tags)src/modules/transcript/analyzers/duplicateReads.ts— was already correct; DRY-ed to import the shared helper
Verified clean (no fix needed): hookAstRead.ts (only opens the file from disk; OS handles case), signal-cache.ts (keys on grep patterns, not paths), sessionCachePath (already sanitized in v1.6.13).
Expected impact
After upgrading and reinstalling the hook, the dedup-read row in sipcode proxy --stats should jump from ~3 fires / ~1K tokens per session into the 20-30+ fires / 20-50K tokens range that drift was already correctly counting.
Verification
sipcode --version → 1.6.14
1266 tests passing (was 1252; added 14 path-normalization specs)
[sipcode-mcp] connected (sipcode v1.6.14, 15 tools)
Tarball: ~951 KB packed, 3.1 MB unpacked, 1012 files. CHANGELOG and absolute-URL logo bundled.
Full release notes: CHANGELOG.md. Compare: v1.6.13...v1.6.14.
v1.6.13 — Pre-launch security hardening
Pre-launch defensive hardening pass. Zero behavior changes for the happy path — all changes are defensive. Tests went 1247 → 1252. Score on the internal launch-readiness audit moved 87 → ~95.
Security fixes
H1 — path traversal via session_id (LOW).
session_id from PreToolUse events is now sanitized via an allowlist ([a-zA-Z0-9_-]{1,64}) before being used as a filename in ~/.sipcode/proxy-reads/<id>.jsonl or ~/.sipcode/proxy-signals/<id>.jsonl. A malicious id like ../../tmp/evil falls back to a literal unsafe-session. Realistic attack surface was small (Claude Code generates UUIDv4 ids), but defense-in-depth costs nothing.
H2 — ReDoS via prompt-injected Grep pattern (LOW).
The relevance scorer's regex tier (new RegExp(pattern) against extracted symbols) now short-circuits when pattern.length > 200 or symbol.length > 200. Tests assert sub-50ms wall time on catastrophic-backtracking patterns like ^(a+)+b.
F2 — non-atomic settings.json write (LOW).
The benchmark live-runner's withSipcodeStripped helper used to write ~/.claude/settings.json directly. A mid-write crash could truncate the user's settings. Now it writes to settings.json.sipcode-tmp-<pid> and renames. POSIX guarantees atomicity; Windows treats it as atomic within the same volume.
H3 — CSP on landing page (INFO).
Added Content-Security-Policy, X-Content-Type-Options, and Referrer-Policy meta tags to docs/site/src/pages/index.astro. The site is fully static; the only inline scripts are the mascot interactivity and scroll-reveal observer.
Operational fix
F6 — CI gate against minor/major bumps.
New workflow .github/workflows/guard-version-bump.yml fails on push to main if package.json's minor or major segment grew without a [minor-ok] or [major-ok] marker in the commit subject. Catches the v1.7.0-slip class of mistakes that almost shipped this week.
Verification
sipcode --version → 1.6.13
[sipcode-mcp] connected (sipcode v1.6.13, 15 tools)
1252 tests passing
Tarball: 951 KB packed, 3.1 MB unpacked, 1008 files. CHANGELOG.md and the absolute-URL logo both bundled.
Full release notes: CHANGELOG.md. Compare: v1.6.12...v1.6.13.
v1.6.12 — npm metadata polish
Pre-launch polish release. No behavior changes.
What changed
- package.json description rewritten: removed em-dash (was
Sip your tokens. Don't gulp them. — Unified token optimization for AI coding agents.); now leads with reliability per the locked positioning. Reads: Sip your tokens, don't gulp them. Keep Claude Code's context clean: drift detection, re-read dedup, integrity scoring, AST-aware reads, and 15 MCP tools for Claude Desktop. - Keywords expanded from 7 to 14: added
claude-desktop,context-engineering,drift-detection,context-rot,mcp,ast,reliability. Existing keywords kept. - README header now displays the Sipcode logo via absolute raw.githubusercontent URL so it renders on the npmjs.com page (where relative paths are unreliable).
Tests, MCP tools, behavior
Unchanged from v1.6.11. 1247 tests passing. 15 MCP tools registered.
v1.6.11 — Launch-ready
Live on npm. npm i -g sipcode@1.6.11
This release rolls in v1.6.9's B3 work (tagged but skipped on npm) together with sipcode trend, sipcode today, sipcode forecast, two new MCP tools (now 15 total), and includes CHANGELOG.md in the tarball for the first time.
What's in v1.6.11
- B3: AST-aware symbol-level reads for TypeScript, JavaScript, JSX, TSX, and Python files larger than 200 lines. Tree-sitter parses the file; relevance scorer matches symbol names against your recent Grep patterns; only the relevant symbol's line range is returned. Safety floor: passes the full file through when in doubt.
sipcode trend <metric> --since <NNd|NNw|NNm>: single-metric time series. Three metrics: output-ratio (robust to session-length variance), cost-per-session, recoverable-tokens-per-session. Sparkline + verdict (improving | stable | regressing | insufficient-data).sipcode today+get_today_summaryMCP tool: daily dashboard, adaptive 30/14/7/3 day baseline, top-leak detection.sipcode forecast+forecast_monthly_spendMCP tool: projected month-end spend with confidence band, last-month comparison.sipcode benchmark --vs-rtkheuristic now credits B3 AST trim potential: corpus goes from 72 to 144 rewrites, ~366,500 saved tokens (was ~150,500 in v1.6.7).- CHANGELOG.md bundled in the tarball as of this release.
- Pricing data refreshed to 2026-06-11; new model IDs registered.
Fixed in v1.6.11
- Critical (would have shipped silently). The B3 tree-sitter loader used
require("node:module").createRequire(...)in what compiles to an ES module.requireis undefined in ESM; the try/catch silently swallowed the ReferenceError; AST extraction always returned[]; B3 looked like it worked in unit tests but did nothing in a real Claude Code session. Caught by the new e2e smoke test. Replaced with a top-levelimport { createRequire } from "node:module".
Numbers you can verify
npx sipcode benchmark→ 62.6% median token savings, range 37.4%–80.6%, 3,567,170 tokens / $67.43 across the locked 20-task corpus.[sipcode-mcp] connected (sipcode v1.6.11, 15 tools).- 1247 tests passing.
Full changelog
CHANGELOG.md covers v1.6.5 → v1.6.11 in detail. Compare links: v1.6.8...v1.6.11.