# The context inspector

> See exactly what an agent knows this turn — every fragment, rule, skill, and the live token count.

When an agent does something surprising, the useful question is rarely "what is the model thinking?" It's "what did it actually know?" The **context inspector** answers that one exactly, for any agent in the thread.

## Every fragment, not a summary

The inspector opens up the context an agent is running with this turn, piece by piece:

- **The project rules in scope** — your `AGENTS.md` / `CLAUDE.md` and `.cursor/rules` are read [verbatim](https://darting.dev/docs/rules-and-skills/), so you can confirm the rule you wrote is really there and really says what you think it says.
- **The skills index** — the names and triggers the agent can see, which is what determines whether it reaches for a skill at all.
- **The knowledge manifest** — the [Atlas](https://darting.dev/docs/the-atlas/) areas and entry one-liners the agent got, before it drilled into any of them.
- **The conversation** — the messages, tool calls, and results accumulated so far.

Alongside all of it: a **live token count**, with a warning as the window fills.

## Per agent, not per thread

Context isn't one thing in a thread. The lead carries the plan and the whole conversation; each [sub-agent](https://darting.dev/docs/sub-agents/) runs on a fresh, focused context with just its task and a short brief. So the inspector works per agent — inspect the lead, or open any sub-agent and see the much smaller world it was given.

That distinction is usually where the answer is. A coder that ignored a convention may never have been handed the rule; an explorer that missed a subsystem may have had a manifest that didn't mention it. You find that out by looking, not by re-running the turn and hoping.

## What to use it for

| Question | What to look at |
| -------- | --------------- |
| "Why didn't it follow our convention?" | Whether that rule is in the fragments — and in *this* agent's fragments. |
| "Why didn't it use the skill?" | The skills index and how the trigger reads. |
| "Did it know about that subsystem?" | The knowledge manifest, and whether it opened the area. |
| "Is this thread about to compact?" | The live token count and the fill warning. |

## Memory you can audit

This is the point of the whole design: memory here is **inspectable, not a black box**. The [knowledge base](https://darting.dev/docs/structured-memory/) decides what gets injected, [compaction](https://darting.dev/docs/compaction-and-context/) decides what gets dropped near the limit, and the inspector is where you verify both — after the fact, on a specific agent, for a specific turn. If an agent went wrong, you can see what it saw.
