Local only · Read only · Open source

Your agent's context window is a black box. Open it.

ContextClues reads a running Claude Code session on your own machine and shows exactly what is in its context window, what is filling it, and how much working room is left before it compacts.

Nothing is uploaded. Nothing is modified. Every number is labeled with how it was obtained.

$ git clone https://github.com/MaxwellVolz/contextclues.git && cd contextclues && npm i && npm run dev
No cloud No account No telemetry Never writes to ~/.claude
CONTEXTCLUES
CASE FILE ● refactor-billing · /Users/dev/acme-api LIVE · pid 41827 · busy stream on   rendered just now
Context Meter Observed
37.9%
379k / 1.00M
TOKENS
7085
405 requestscontext growth
burn rate~2.0k/req
runway2.1 h · ~306 to 925 req
cache read378k
fresh input2
observedjust now
modelclaude-opus-5

Token count is the API's own figure from the last assistant turn (observed). Max window is assumed. Rate observed, runway projected.

Composition ~379k accounted
tool results assistant user injected system overhead
Evidence 490 entries · newest 250
#SourcePreview~TokensAgeStatus
#1360tool result[Read] src/billing/invoice.ts~4,102just nowIN CTX
#1359assistantRead({"file_path":"src/billing/…~86just nowIN CTX
#1358tool result[Bash] npm test: 41 passing~6128s agoIN CTX
#1357useralso update the proration path~1122s agoIN CTX
#1356assistantThe proration branch assumes a…~34031s agoIN CTX
#1355tool result[Grep] "prorate": 18 matches~1,20444s agoIN CTX
#1352injected[total_tokens_reminder]~131m agoIN CTX
#1341tool result[Read] package-lock.json~31,88014m agoCOMPACTED OUT
#1338systemcompact_boundary: 412k → 96k·14m agoBOUNDARY
#1330tool result[Read] src/db/schema.sql~2,91019m agoCOMPACTED OUT
Tool Registry 17 used · 346 known
USEDEdit×68   built-in
USEDBash×65   built-in
USEDRead×47   built-in
DEFERnotion-search×0   mcp

"Assumed" built-ins come from a static list. Used and deferred entries were observed in this session's transcript.

Clues 4 open
Oversized tool result
package-lock.json read cost ~31.9k tokens
File loaded 4 times
src/billing/invoice.ts, ~16.4k total
Compaction dropped 316k
auto trigger, 412k to 96k, 14m ago
Live Activity newest first
Read result
src/billing/invoice.ts   ~4,102
just now
Assistant turn: context at 379k
Read({"file_path":"src/billing…
just now
Bash invoked
npm test
8s ago
Grep invoked
"prorate" in src/
44s ago
NOTES   Context totals come from the API usage numbers Claude Code records per assistant turn (observed); per entry sizes are chars/4 estimates.  ·  Maximum window is assumed: Claude Code does not expose it locally.  ·  ContextClues reads transcripts only. It has no access to the model's private reasoning, and inclusion between compactions is inferred from transcript order.

The full case file. One session, live, on localhost.

The problem

You find out the window was full after it costs you.

A long agent session fills its context window quietly. There is no gauge, no breakdown, and no warning. One accidental read of a lockfile can take a third of the window, and nothing tells you it happened. You are steering a process whose most important state variable is invisible.

When the window fills, the session compacts. Older material is summarized away and dropped. Work you assumed was still in context is gone, and the only signal is the agent starting to behave as if it forgot something. By then you have already paid for it: a repeated explanation, a wrong answer you trusted, a debugging cycle chasing a problem that was never in the code.

ContextClues turns that black box into an instrument panel. It runs beside your session and answers the questions you currently have to guess at: how full is the window, what is taking up the room, what did compaction actually drop, and how long can I keep going.

How it works

It reads the files the agent already writes.

Claude Code keeps a registry of running sessions and an append only transcript of every event on local disk. ContextClues watches those files, tail parses the transcript incrementally, indexes it into a local database, and streams updates to the dashboard over server sent events. Claude's files are opened read only and are never modified.

It deliberately does not install an agent hook. A hook would give push style events, but installing one edits your configuration, and this tool does not change your setup without being asked.

~/.claude/sessions/*.json      ──┐                          ┌─ local SQLite
~/.claude/projects/**.jsonl    ──┤──► collector ──►──
settings, .mcp.json, plugins   ──┘    read only          └─ event bus ─► SSE ─► dashboard
What it shows

Seven panels, one case file.

Every session is a case file. Context entries are evidence. What the tool notices, it files as clues.

Context Meter

Tokens in the window from the API's own count, as a share of maximum, with cache breakdown and observation age.

Context Trajectory

Growth across every API request, with burn rate, projected runway in time and requests, and compaction boundaries marked.

Composition

What is occupying the window, stacked by source: your messages, replies, tool results, injected context, and system overhead.

Evidence

Every transcript record, searchable, with size, age, whether it is still in context, and why it is believed to be there.

Tool Registry

Every known tool with its provider, its status, where that knowledge came from, and how many times it was actually used.

Live Activity

Tool calls, file reads, results, compactions, and tool availability changes, streaming in as they happen.

Clues

Oversized results, files read repeatedly, exact compaction drops, unused tools, window pressure, and stale heavy entries.

Local and safe

Your transcripts never leave the machine.

This tool reads the most sensitive text on your computer: your code, your prompts, and your command output. It is built so that none of it goes anywhere.

No network

No cloud service, no account, no authentication, no telemetry. The dashboard is a localhost page and the process makes no outbound calls.

Read only

Claude's session files are opened read only and are never written to. Nothing under your agent's configuration directory is created, edited, or deleted.

Secrets redacted

API keys, tokens, JWTs, private keys, and secret style environment assignments are detected and scrubbed before any preview is stored or rendered.

Disposable state

The tool's own index lives in a local folder you can delete at any time. It rebuilds itself from the transcripts on next run.

Honesty policy

Every number says how it was obtained.

A context dashboard is only useful if you can tell measurement from guesswork. Some of these figures are genuinely knowable and others are not, so nothing is presented as plain fact. Every value carries one of four confidence labels, visible in the interface, so you always know which one you are reading.

Observed
Read directly from the agent's own artifacts: per turn token usage, compaction records with exact before and after totals, and tool availability changes. The growth curve and burn rate are observed.
Estimated
Per entry sizes, using a characters divided by four heuristic. The transcript stores content, not per message token counts, so entry sizes are always approximations and are always marked as such.
Inferred
Derived indirectly. System prompt overhead is the observed total minus the sum of estimates. Runway is inferred, because it extrapolates observed data forward, so the interface says "projected" and never says "will".
Assumed
Static mappings that cannot be verified locally, such as which maximum context window a given model has. No local file exposes it, so it is mapped and labeled rather than presented as known.

The same care goes into the projection. Growth per request is strongly right skewed: most requests add a little, and an occasional large file read adds a lot. Runway is a question about cumulative growth, so the projection is driven by the mean rather than the median, because the mean counts large requests at the rate they actually occur. A median would describe a typical request while systematically under predicting how fast the window fills. The panel reports both, and when the average sits far above the typical request it says the session is spike dominated and widens the runway into a range.

ContextClues never claims access to the model's hidden reasoning, and it does not pretend to know exactly which messages survive between compactions. That is inference, and it is labeled as inference.

Install

Four commands, no services, no config.

Clone it, install it, run it. Then start a Claude Code session in another terminal and it appears automatically.

# requires Node.js 22.5 or newer
$ git clone https://github.com/MaxwellVolz/contextclues.git
$ cd contextclues
$ npm install
$ npm run dev

→ http://localhost:4310

Node.js 22.5+  uses the built in SQLite module, so there is nothing to compile.
A machine where Claude Code has run  it reads the session files that are already there.
Live sessions are auto detected  marked with a dot, updating in real time as the transcript grows.

You cannot manage a context window you cannot see.

GET CONTEXTCLUES →