Developer tool · v0.1 · MIT

Whittle down what your agent reads.

whittle collects the techniques that cut a coding agent’s token bill and turns each one into a lever you switch on per repository. It wires itself into Claude Code and Codex from your home directory and writes nothing into the repositories it serves.

  • Claude Code · Codex
  • No telemetry
  • Node 22.12+
$ whittle install
claude-code: written ~/.claude/settings.json (5 appended)
codex: not installed (~/.codex does not exist); skipped
nothing is active yet: run `whittle enable` inside a repository to opt it in

$ whittle enable
enabled ~/code/shop (repo a5106c195910)
  shell-output: off
  prefix-audit: on

$ whittle prefix-audit
TOKENS  CHARS  KIND       SOURCE
~644    2506   claude-md  ~/code/shop/CLAUDE.md
total ≈ 644 tokens across 1 components
not measured: Claude Code's own system prompt and built-in
tool schemas; MCP server instructions and tool schemas; …

$ git status --short
$ 
Real output from whittle 0.1.0 in a fresh home directory. Paths are shortened to ~ and a few lines are trimmed. The empty git status is the point.

Where the tokens go

An agent pays in six layers.

Every turn re-sends a fixed prefix, tool schemas and the history so far, on top of tool output, file reads and the model’s own reply. Each lever targets one layer, so you can tell what changed when you switch it.

  1. L1Fixed prefixmemory files, rules, skill descriptions
  2. L2Tool schemasthe tools offered on every turn
  3. L3Tool outputwhat a shell command prints back
  4. L4Code retrievalwhole-file reads to find one symbol
  5. L5Agent outputthe model’s own tokens
  6. L6Historyeverything above, carried forward

a shipped lever covers it a lever is planned

Levers

Off until you say so.

whittle install only wires the hook. Nothing runs in a repository until you enable it there, and each lever can be switched on its own.

shell-outputopt-in

L3 · tool output · hook

Rewrites allowlisted Bash commands through rtk, which filters their output before the agent reads it. Enforced in Claude Code; Codex gets the hook but not the rewrite.

Needs the rtk binary, which you install yourself. A published paired run measured +7.6% cost with it, so whittle shows that figure, labelled as someone else’s.

prefix-auditon when enabled

L1 + L2 · fixed prefix · report

Ranks what rides along on every turn, memory files, rules and skill descriptions, in approximate tokens, and lists what it could not measure. It reports only and injects nothing.

Counts use the o200k tokenizer as an estimate; Claude’s own tokenizer is not public.

retrievalnot yet shipped

L4 · code retrieval

Will answer “where is this, who calls it” from a code graph instead of whole-file reads, through graft.

Three rules

Built to be trusted with your setup.

01

Nothing is written into a repository

Hooks go into your user-level harness config; state and caches live under the XDG directories. whittle footprint lists every path it has ever written, and the test suite fails if a stray file appears in a repo.

02

Nothing leaves the machine

No telemetry, no hosted service, no network calls at runtime and no install-time scripts. The hook fails open and always exits 0, with a time cap per lever.

03

No number taken on trust

A lever shows what was measured on your machine or says “unmeasured”. Figures from elsewhere are printed as external evidence with their source.

Commands

Everything is reversible.

install / uninstall
Wire or unwire the hook. Uninstall is a dry run unless -y, and reports whether each config came back byte-identical to its backup.
enable / disable
Opt a repository in or out, or switch a single lever for it. Worktrees of one checkout share the setting.
levers
Every lever with its layer, enforcement, dependency and measured effect.
status
Harness wiring, enabled repositories and footprint, also as --json.
doctor
Checks wiring, executables and the environment; exits 1 on a failure.
footprint
Every path whittle has written outside repositories.
prefix-audit
The per-turn prefix for a directory, ranked by approximate tokens.

Install

Two commands to wire it, one to opt in.

whittle is not on the npm registry yet. Install the packed release from this site, or build it from source. Either way the hook runs under Node, which starts fastest.

From this site
npm install -g https://whittle.aylith.com/downloads/aylith-whittle-0.1.0.tgz
whittle install    # wire each detected harness
whittle enable     # opt the current repository in
From source (Bun to build)
git clone https://github.com/aylith-labs/whittle.git
cd whittle && bun install && bun run build
npm install -g .
whittle install && whittle enable

Checksums: SHA256SUMS. Undo everything with whittle uninstall -y.

  • Node.js 22.12 or newer

    The shipped binary is plain JavaScript with two dependencies.

  • Claude Code or Codex

    install wires whichever it finds in your home directory and skips the rest.

  • rtk, only for shell-output

    whittle never installs it. whittle doctor tells you if it is missing.