Leaner Pups — Measuring and Taming the Token Hunger

A session chronicle of Leaner Pups — Measuring and Taming the Token Hunger.

Act I · Analysis

Weighing the Pack's Appetite

Odin

How many tokens are depot agents consuming? approx, give me percentiles

The rune-keeper delved into the archives — ~/.claude/projects/, where 747 JSONL session logs lay dormant. Each file a record of an agent's journey: input tokens, cache creation, cache reads, output tokens.

Through batch processing of all 690 sessions with data, the true hunger emerged: 4.38 billion tokens consumed across the project's lifetime. The median pup devours 1.8M tokens per run, but the fat tail is real — P99 reaches 84.3M, and one absolute unit consumed 374.3M.

The split between orchestrator sessions (125, median 5.7M) and subagents (565, median 1.5M) revealed a near-even divide: 2.36B vs 2.02B. The pack eats together.

Act II · Orchestration

The Pack Runs On

Odin

/fire-next-up --status

Between token audits, the orchestrator kept the pack moving. Five issues in flight: #190 (wizard animations, Loki PASS but merge-blocked by conflicts), #338 (features + pricing, Loki dispatched), #340 (blog MDX, agent failed), #352 (5-tab dashboard, awaiting FiremanDecko), #359 (broken static links, Loki QA pending).

Auto-executed: merged PR #361 for #359 (Loki PASS, clean merge). Dispatched FiremanDecko rebase for #190's conflicts. Dispatched FiremanDecko build for #352's 5-tab dashboard implementation.

Act III · Easter Egg

Heilung Rises from LCARS Ashes

Odin

File an issue to research hiding an easter egg link to Heilung Krigsgaldr YouTube video

Odin commanded: find the band behind a YouTube link and design an easter egg. Web searches revealed Heilung — a Norse experimental folk group from Copenhagen, 2014. Three members: Kai Uwe Faust (throat singing), Christopher Juul (percussion from human bones and reconstructed swords), Maria Franz (traditional Norwegian vocals). Their music: "amplified history from early medieval northern Europe."

The decree: replace Easter Egg #10 (LCARS Mode — Star Trek in a Norse app, too off-brand) with a Heilung Krigsgaldr modal. Same Ctrl+Shift+L trigger. Two-column layout: band profile left, YouTube embed right. Privacy-safe via youtube-nocookie.com.

Luna interview conducted inline. Issue #363 filed, added to board, dispatched to FiremanDecko on Depot.

development/frontend/src/components/easter-eggs/LcarsOverlay.tsx

Act IV · Orchestration

The Pack Merges and Dispatches

Odin

/fire-next-up --status (multiple rounds)

A flurry of merges and dispatches. #338 (features + pricing) — Loki PASS arrived, PR #356 merged, moved to Done. #359 — already merged earlier. #340 (blog MDX) — found closed as "Won't do" but Odin said re-open it. Reopened, blocker #337 confirmed resolved, dispatched FiremanDecko fresh.

At peak, five Depot agents running simultaneously: #190 (rebase), #340 (blog), #352 (5 tabs), #363 (Heilung), all FiremanDecko sessions actively updating.

Act V · Analysis

Diagnosing the Hunger

Odin

How can we make the depot agents leaner?

The deep analysis. Measured every source of token consumption:

4.3MB of .claude/ markdown files loaded as system context — re-sent on every tool call. An agent making 40 calls = 40M tokens on context alone. 1.3MB of Playwright output with --reporter=list (~300K tokens per test run). Build and npm outputs: surprisingly small (~3KB and ~2KB respectively).

The prescription: quick wins (reporter=dot, pipe output), medium effort (sandbox CLAUDE.md, targeted reads, verify.sh wrapper), and bigger wins (Haiku for simple tasks, smaller issues, pre-built verification).

Estimated impact: 60% reduction in median token usage — from 1.5M to ~600K per subagent.

Act VI · New Feature

Forging the Leaner Harness

Odin

yes, structure it in a way that reports on each branch don't conflict with each other

Odin approved the design: reports committed to branch, cleaned up on merge. Issue #364 filed — scripts/verify.sh wrapper that runs tsc, build, and Playwright in sequence. Stdout: condensed one-line-per-step summary (< 10 lines on full pass). Full output: quality/reports/ directory.

Key design decisions: fixed filenames (no branch prefix needed — each branch has its own copy). quality/reports/ in .gitignore as safety net. Loki cleans up reports before final commit. Squash merge to main never includes them.

The 15,000x reduction per Playwright run: 1.3MB → ~5 lines. Agent templates updated from 3 separate verification steps to a single bash scripts/verify.sh call.

Dispatched to FiremanDecko on Depot. Five agents now running in parallel.

# Before (3 steps, verbose — ~1.3MB output):
npx tsc --noEmit
npx next build
npx playwright test --reporter=list

After (1 step, lean — ~5 lines output):

bash scripts/verify.sh === Fenrir Verify === [1/3] tsc --noEmit .............. PASS [2/3] next build ................ PASS (23 routes) [3/3] playwright (47 tests) ..... PASS (47/47) === All checks passed ===

scripts/verify.sh .claude/skills/fire-next-up/templates/firemandecko.md .claude/skills/fire-next-up/templates/loki.md .claude/skills/fire-next-up/templates/heimdall.md .gitignore