Context

The Context tab — token usage, the breakdown of what is filling the window, the system prompt, and the raw messages behind a session.

Every reply the agent sends carries the whole conversation back to the model, so a session gets more expensive and closer to the model's limit with each turn. The ring beside the session title is the short version of that. The Context tab is the long one.

Opening it

The ring sits next to the ⋯ menu at the top right of a session. Hovering it shows the three numbers you usually want — Cost, Usage, Tokens — and the filled arc is the usage percentage.

Clicking it opens the side panel and puts Context in front. Clicking it again closes the tab, and closes the panel with it when that click is the only reason the panel was open — so the one button both opens and puts away, without stranding an empty panel.

Context is an ordinary tab in that panel: it sits beside Review and any files you have opened, it closes with the × or mod+w, and mod+shift+r toggles the panel it lives in. Its scroll position is remembered, including how far into an expanded message you had read, so leaving and coming back does not send you to the top.

What the numbers mean

One thing is worth reading twice: the token figures describe the last model reply, not the session added up. That is what the model was actually working with on its most recent turn, which is the number that decides whether the next turn fits. Costs and message counts are cumulative — they are marked below.

FieldWhat it shows
SessionThe session's title, or its id until the model has named it
MessagesEvery message in the session — cumulative
Provider / ModelThe provider and model that produced the last reply
Context LimitThe model's context window
Total TokensInput + output + reasoning + cache read + cache write, for that last reply
UsageTotal Tokens as a percentage of Context Limit — the number the ring draws
Input TokensWhat was sent up on that turn: the conversation so far, plus the tools
Output TokensWhat the model wrote back
Reasoning TokensWhat it spent thinking, where the model reports it separately
Cache Tokens (read/write)Prompt cache hits, then writes
User Messages / Assistant MessagesCumulative counts, split by role
Total CostWhat the session has cost so far — cumulative
Session CreatedWhen the session started
Last ActivityWhen the reply these figures come from arrived

A dash means the figure is not knowable rather than zero. Context Limit is blank when the model has no declared context window — common with custom providers and gateway-proxied catalogues — and Usage goes blank with it, since it is a fraction of that limit. Provider and Model fall back to the raw ids the server reported when there is no catalogue entry to give them a display name.

The figures come from the last reply that reported token usage, not simply the last reply. A turn you interrupted before the provider accounted for it is passed over, so the panel keeps showing the last real measurement instead of dropping to zeros.

Context Breakdown

The bar under the numbers splits Input Tokens — the part of the budget you can do something about — into System, User, Assistant, Tool Calls and Other. It appears once a reply has reported input tokens.

It is an estimate, and deliberately so. No provider reports which message each token came from, so CoDev measures the text of every message part and divides by four, then scales the result to add up to the input tokens actually billed. Treat the shares as proportions, not as an audit.

Other is the remainder: whatever was in the request that is not message text. Tool definitions are usually most of it, along with message scaffolding and provider overhead. It grows with the number of tools available to the agent, not with the length of the conversation.

The bar is most useful for the question what do I do about this. Tool Calls running away with the window — a long chain of file reads and searches, each one kept in full — is the common case, and it is what compacting or a fresh session buys back. A large User share means the files and selections you attached are the weight, and a large System share points at the agent's own instructions.

System Prompt

When the session carries a system prompt, it is rendered below the breakdown as formatted text rather than as a wall of JSON. This is the instruction set the agent is working under — the one assembled from your agent, your rules files and the built-in defaults — and reading it is usually the fastest way to explain why the agent keeps doing something you did not ask for.

Raw messages

The bottom of the tab lists every message in the session, one collapsible row each, showing its role, its id and when it was created. Expanding one renders that message and all of its parts as syntax-highlighted JSON, and the text is selectable so you can copy it out.

This is the record exactly as the server holds it. It is the place to look when a tool returned something the transcript summarised away, when you want to see which parts a single message is actually made of, or when you are filing a bug and need to attach what really happened rather than a description of it.

Rows open independently, so you can leave several expanded and scroll between them.

Elsewhere

The Context tab is part of the shared interface, so the same panel is in CoDev web, with the same ring opening it. The terminal app has no equivalent view; /compact and the model footer are its counterparts.