for agents/llms.txtv0.13.110

Home / Articles / The tokens hook / Versions / v1.2.0

The tokens hook: what changed in v1.2.0

From v1.1.0 (2026-10-19, d303ce0f1) to v1.2.0 (2026-10-27, db67c5ce1), paragraph by paragraph.

0 paragraphs added, 0 removed, 3 changed in place, 47 unchanged. About 0 words added and 93 removed. Insertions are marked like this, deletions like this; unchanged runs are folded to one line; figures appear as their file names.

← v1.1.0 · all versions

2 unchanged paragraphs

!shot tk-architecture.webp | images/ | The tokens hook: a policy filefile, saysa whathook tothat count, showcounts and limit; the hook reads only the new lines of the session transcriptprices each time,response, countsand each response once, prices it bywhere its model and keeps running totals. Its output goes to the user, to the model, to a block when the budget is spent, or to a collector. Dashed boxes are proposed.goes. | architecture

13 unchanged paragraphs, under In short {#in-short}, Why tokens need a policy {#why}, Asking the model does not work {#prompt}

!shot tk-prompt-vs-hook.webp | images/ | The same two-turn conversation in headless Claude Code, once with a system prompt asking the model to report its tokens and cost, once with the tokens hook. With the prompt, the model said it could not see the numbers. With the hook, it reported them exactly, one turn behind. | comparison

17 unchanged paragraphs, under What a hook can see in Claude Code {#see}, The hook {#hook}, The other places to look {#elsewhere}…

!shot tk-where.webp | images/ | Where the token numbers are, tool by tool: what a hook can see and what the user is shown in the coding agents and chat apps checked for this article, from each tool's documentation or source code.shown. | comparison

15 unchanged paragraphs, under A site for one small hook {#site}, What this does not claim {#limits}, Where this comes from {#sources}

← v1.1.0 · all versions