Skip to content

v0.6.12

Choose a tag to compare

@anilmurty anilmurty released this 14 Sep 00:07
· 53 commits to main since this release
6e17768

Twenty-one commits from nine contributors, six of them shipping their first TokenJam PR.

No schema migration in this release. The upgrade path is clean — verified against a copy of a 6.1GB production database.

Cost correctness

Cache-write tokens are now priced on the alternative side of the quota audit's counterfactual. The actual side already counted all four token classes while the alternative counted three, so every implied saving was inflated by the candidate's full cache-write cost. The headline figure moves down. Thanks @DhruvGarg111.

Session readers across seven surfaces now report the same canonical totals. The sessions list, session detail, /status tiles and archive rows, tj status --json, the MCP server and the session timeline were each omitting cache buckets in different combinations, so the same session could show different numbers depending on where you looked. Also @DhruvGarg111.

MCP get_cost_summary returns complete rows — cache_tokens, cache_write_tokens and call_count — and accepts group_by=tool. The HTTP-proxy path used whenever the database is locked was returning an error for every non-empty summary; it now matches the direct path exactly. Thanks @be-student.

Closed sessions are included in drift baselines again, and tj demo's trace count no longer caps at 50. Thanks @sanmaxdev and @AmirF194.

The statusline tells you more

The driver name stays current without a backfill. The attribution cache is refreshed by the daemon's optimize pass, running from the job's finally so an analyzer failure cannot skip it. A driver past its freshness window now renders with an age marker instead of disappearing, so a dated measurement is labelled rather than silently withheld.

Nudges compose instead of short-circuiting. A session near its context limit whose re-reads come from statically re-injected sources now gets /compact now (window near full), then tj context — previously it received a bare /compact, which cannot reduce re-reads that are re-injected every turn regardless of compaction. An unknown or unrecognised driver no longer suggests /compact at all and points at tj context instead.

Product surface

tj optimize <analyzer> --expand renders full detail for findings below the one-percent significance threshold. The minor-findings pointer advertises the flag; before this it pointed at a command that re-rendered the same suppressed view, so following the advice returned you to where you started. Thanks @be-student.

Session budget and duration alerts fire for llm-only ingest. They were structurally unreachable on any stream without an invoke_agent marker, which describes most raw-OTLP producers, so those checks could never trigger no matter the spend. Thanks @mikemikimike.

Daemon reliability

The daemon no longer treats an unidentifiable process as its own. Where neither /proc nor ps can establish identity, a recycled PID is left alone rather than signalled. A transient resource failure in that probe — a fork failure under memory pressure, say — is now surfaced during tj upgrade instead of being reported as "nothing to restart" while a live daemon keeps running the old version. Both from @be-student.

Build and test infrastructure

CI runs --dist loadscope, keeping each module's tests on one worker. Thirteen module-scoped fixtures across nine files were being rebuilt per worker under the default scheduler. Note for anyone running the suite locally: this flag is now required, and tests/integration/test_xdist_isolation.py fails without it. Thanks @sujalgawas.

A dated pricing row no longer breaks main on a date nobody is watching. Five tests read live rates while asserting introductory numbers, so main went red the morning claude-sonnet-5's introductory pricing expired, days after the last green run.

The relearn API tests clear the compute flag the routes actually read. The isolation fixture had been clearing a different module's threading.Event, so the flake it was written to prevent kept firing and kept reddening contributor pull requests.

Contributors

@sujalgawas, @mikemikimike, @AmirF194, @be-student, @DhruvGarg111, @sanmaxdev, @syf2211 and @Yukitty. Six of you sent a first PR to TokenJam in this cycle; @be-student landed four and @DhruvGarg111 two. Thank you.

Upgrading

pipx upgrade tokenjam