orch counted only fresh input + output. hx reports input_tokens as the uncached part; cached input is in cache_read_tokens / cache_write_tokens. Johannes' hx stats on a bench session: input 39519 (fresh 2, cache read 39375, cache write 142), output 161, while orch report showed 134 tok/run.
Run state and telemetry now carry cache_read_tokens / cache_write_tokens; tokens() = fresh + cache read + cache write + output. Old telemetry lines load with cache = 0.
max_tokens budget now counts the full usage per request (it would have fired far too late).
orch status shows the total; orch report has a cache column (share of input served from the cache). cmd adapters get the two new fields in run.
orch eval token deltas use the full count too.
Note: numbers in telemetry written before this change stay low (cache is not recoverable from old lines; hx stats SESSION has the truth).
Verification: sh tests/all.sh exit 0, 20 unit tests (incl. the real numbers above: 39680 total, 100 % cache), e2e: budget test with 1160 tokens/turn per fake turn stops at turn 2 with spent 2320 (fresh-only counting would never reach the 2000 limit in 5 turns). Flake loop 5/5 under load.
orch counted only fresh input + output. hx reports `input_tokens` as the uncached part; cached input is in `cache_read_tokens` / `cache_write_tokens`. Johannes' `hx stats` on a bench session: input 39519 (fresh 2, cache read 39375, cache write 142), output 161, while `orch report` showed 134 tok/run.
- Run state and telemetry now carry `cache_read_tokens` / `cache_write_tokens`; `tokens()` = fresh + cache read + cache write + output. Old telemetry lines load with cache = 0.
- `max_tokens` budget now counts the full usage per request (it would have fired far too late).
- `orch status` shows the total; `orch report` has a `cache` column (share of input served from the cache). cmd adapters get the two new fields in `run`.
- `orch eval` token deltas use the full count too.
Note: numbers in telemetry written before this change stay low (cache is not recoverable from old lines; `hx stats SESSION` has the truth).
Verification: `sh tests/all.sh` exit 0, 20 unit tests (incl. the real numbers above: 39680 total, 100 % cache), e2e: budget test with 1160 tokens/turn per fake turn stops at turn 2 with spent 2320 (fresh-only counting would never reach the 2000 limit in 5 turns). Flake loop 5/5 under load.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
orch counted only fresh input + output. hx reports
input_tokensas the uncached part; cached input is incache_read_tokens/cache_write_tokens. Johannes'hx statson a bench session: input 39519 (fresh 2, cache read 39375, cache write 142), output 161, whileorch reportshowed 134 tok/run.cache_read_tokens/cache_write_tokens;tokens()= fresh + cache read + cache write + output. Old telemetry lines load with cache = 0.max_tokensbudget now counts the full usage per request (it would have fired far too late).orch statusshows the total;orch reporthas acachecolumn (share of input served from the cache). cmd adapters get the two new fields inrun.orch evaltoken deltas use the full count too.Note: numbers in telemetry written before this change stay low (cache is not recoverable from old lines;
hx stats SESSIONhas the truth).Verification:
sh tests/all.shexit 0, 20 unit tests (incl. the real numbers above: 39680 total, 100 % cache), e2e: budget test with 1160 tokens/turn per fake turn stops at turn 2 with spent 2320 (fresh-only counting would never reach the 2000 limit in 5 turns). Flake loop 5/5 under load.