token tracking

Every turn costs more tokens than the last. crystl tracks the burn per shard, estimates how many turns you have left, and shows you exactly what each plugin and skill is costing — so you can optimize for token usage before you hit the wall.

works withany CLI agentclaude codecodex · partial

Claude runs in a fixed context window that has to hold the system prompt, tool definitions, conversation history, and every file the model has read. As a session grows, each turn gets heavier, and eventually the model compacts its history or hits a hard ceiling. crystl watches every Stop hook and records how many tokens each turn actually burned.

Once a shard has three turns of real data, a ~N turns left indicator appears in the status bar. Click it to open the Context Load Panel: per-turn history, burn rate, model and window size, and an itemized breakdown of every plugin and skill loaded into the shard. Sort by cost, disable what you don't need for the current task, and the next turn's budget instantly stretches further.

Why it matters

Know every turn's cost

Each Stop hook records input and output tokens per turn, per shard. A long planning shard never pollutes the numbers for a fresh one next to it.

Turns left, not guesswork

After three turns crystl projects how many more fit in the remaining window, computed from the shard's average burn rate. Read large files and the estimate drops to match.

See what each plugin costs

The panel itemizes every installed plugin and skill loaded into the shard, with the token weight of each one. The heavy entries stop hiding.

Reclaim budget in one click

Click a heavy plugin or skill and disable it for this gem or globally. Disable a Claude entry and crystl hot-reloads the running session — no restart, and your turns-left estimate ticks up immediately.

Re-scales when you switch models

crystl reads the model ID out of the transcript and looks up its window. Drop from Opus to Haiku mid-session and the estimate re-scales on the next turn.

Dive deeper in the Context Load Tracking docs

Ready to try it?

Create a free account and download crystl for macOS.

get started getting started guide →

Frequently asked questions

When does the turns-left estimate appear?
Once a shard has accumulated three or more turns with real token data. Three turns is the minimum for a meaningful burn rate, so before that the indicator stays hidden rather than showing a wild estimate from one outlier turn.
How is the estimate calculated?
It's (window − used) ÷ burn rate, where burn rate is the shard's average tokens per turn so far. A shard reading large files burns faster and shows fewer turns left than one doing short exchanges.
What happens when I disable a plugin or skill?
For Claude, you can disable it for just this gem or for every gem and Claude session globally, and crystl injects /reload-plugins so the change takes effect mid-session. For Codex, disables land in ~/.codex/config.toml globally and you restart the codex process to apply them.
What does the panel track per turn?
Input tokens (prompt, history, tools, and file contents sent in) and output tokens (text, tool calls, and thinking generated). Each Stop hook appends a TurnMetric to the shard's session log; if the payload lacks token data, crystl falls back to parsing the transcript.
Does this work with Codex?
Yes, with fewer scopes. crystl scans ~/.codex/plugins/cache and ~/.agents/skills for Codex shards. Codex has no per-project plugin scope and no hot-reload, so disables are global and need a codex restart, where Claude disables can be gem-scoped and apply live.
Book of Spells
the crystl guild

Crystl's Book of Spells

Master crystl with a grimoire of powerful prompts. Summon heroes, assemble a party, revive shards, and complete epic quests.

open the book →

More features

Gems & Shards

Gems, shards, and the Crystal Rail keep every project one click away.

Action Panels

See what every Claude session is doing at a glance.

Parallel Sessions

Run multiple Claude instances on the same repo without conflicts.

Hero Shards

Summon a single hero as a shard — its own agent, model, and persona — without a quest party.

History Navigator

Browse, jump through, and search every session: conversation and tool calls.

Workbench

A slide-out task list in every project, backed by a WORKBENCH.md the agent reads and writes with you.

Prompt Integration

Facet Inserts give you one-click access to saved prompts, commands, and shortcuts.

Agent Config Editor

Create, edit, and manage CLAUDE.md, rules, skills, and agent config files with a block editor, file chooser, and project optimizer.

Project Optimizer

Scan your project for gaps in agent configuration (missing files, incomplete docs, oversized code, and setup issues) with one-click fixes.

Starter Bundles

New gems launch with CLAUDE.md, rules, skills, and MCP config, all pre-configured from your bundle library.

Skills Library

Browse and import agentic skills that teach agents like Claude Code or Codex new tricks: code review, testing, deployment, and more.

Cavrn

The terminal as structured data: every turn, tool call, result, and table captured as agent-readable metadata. Drawn fast on the GPU with Metal.

Remote Development

Full crystl integration over SSH: approval panels, file relay, and click-to-open on remote machines.

Agent Orchestration

One agent spawns, supervises, and merges the work of many: a control room for a team of coding agents.

crystl Quest

Assemble a party of specialized agents. Each brings unique skills, coordinates in shared chat, and executes in parallel.

Screenshot Bar

Drag recent screenshots into the terminal. Spotlight-powered, always up to date.

Copy Bar

A one-click copy bar under the terminal. Agents stage text, you click Copy. Editable, up to 10 tabs, free.