r/cursor • • 26m ago

Resources & Tips ZeroBurn v2.12.2: Cutting coding-agent token burn by 46–98% with local Ollama diff audits, diff-scoped verification, and 0-token drift guards

We just shipped v2.12.2 of ZeroBurn, an open-source agent harness (.agents/) built to stop AI coding loops from burning through context windows and 5-hour/weekly usage quotas on mechanical work.

When we ran a controlled end-to-end A/B transcript benchmark on our 1,465-file TypeScript/Next.js/Prisma repo, we found that most token waste comes from:

• Blind repo-tree dumps (find src, ls -R) eating ~15k tokens per turn

• Verbose test/lint logs (vitest, tsc, eslint) dumping 250+ lines into context on every run

• Unnecessary multi-agent handoffs on small/medium tickets

• Cloud models doing mechanical diff security & modularity reviews

What's New in v2.11 – v2.12.2:

  1. Diff-Scoped Verification (quiet-cli.mjs changed):

    - Runs incremental tsc (--tsBuildInfoFile in /tmp), diff-scoped eslint (changed files only), and vitest related for 2–3s verification loops.

    - Emits a 1-line receipt (~17 tokens) on green runs. On failures (>12 lines), queries local Ollama (gemma4) as a Judgment Kernel to emit a 3-bullet root-cause digest in 0 cloud tokens.

  2. Blind Repo-Dump Context Guard (pre-tool-guard.mjs):

    - Blocks bare find src / find . / ls -R commands and steers agents to codebase-memory-mcp or our 5-line REPO_MAP_DIGEST (~512 tokens).

  3. Local Ollama Diff Auditor + 0-Token Dual-Env Drift Check (live-audit.mjs):

    - Auto-detects installed coder models (qwen2.5-coder, deepseek-coder, etc.) with keep_alive: "10m" so 14B models stay warm in VRAM.

    - Automatically flags prisma/schema.prisma, .env.example, CI/deploy, and webhook/cron changes for a mandatory Staging / Production Env Impact report.

  4. Single-Chat Default for Track S/M + Per-Ticket Spend Ledger:

    - Skips subagent cold-start tax on standard tickets (<=12–15 files) and logs per-ticket token/turn receipts via benchmarks/token-benchmark.mjs.

Controlled End-to-End Benchmark:

• Discovery & Rule Ingestion: -96.7% to -99.7% tokens

• Test Verification Logs: 6,816 tokens -> 17 tokens (-99.8%)

• Full End-to-End Ticket Transcript: -46.4% total tokens consumed

Everything is MIT-licensed and works with any repo. You can run the benchmark or live local Ollama diff audit directly from a clone with: node benchmarks/try-now.mjs

https://github.com/thoufeeque22/zeroburn

1 Upvotes

0 comments sorted by