AI Companion and quick question
The AI Companion reads the sessions each agent already keeps on your computer and shows what they cost and which habits make them cost more. The quick question is a box for asking something one-off without adding it to the agent's conversation.
Both need AI Mode on.
The AI Companion
Open it with Ctrl+Shift+Y (⌘⇧Y on macOS), from the ≡ menu → AI Companion..., or from the palette.
It has two views: Session and Period.
The Session view
It shows the session of the agent in the active tab. If that tab has no agent, it shows the latest session.
- Cost: the one the agent reports, or an estimate at API prices.
- Tokens, split into New input, Written to cache, Read from cache and Output.
- Messages, Duration, Subagents and Compactions.
A subscription is not billed per token. The cost is for comparing sessions, not an invoice.
What could be better
The AI Companion points out the habits that made the session cost more, with how much could have been saved and what to do:
| Finding | What happened | What to do |
|---|---|---|
| A very full context | Messages answered with more than 150k tokens of context | Compact or start a new session when you change subject |
| Expired cache | You came back after a long pause and the cache had to be written again | Compact or start over before returning to a large conversation |
| More model than simple tasks need | Short questions answered by a top-tier model | Use a smaller model or a lower effort |
| Short messages into a large context | Each short message read the whole conversation again | Put several instructions in one message |
| Very large tool results | A tool returned more than 50k characters | Ask for files to be read in parts or output to be filtered |
| Files read several times | The same file was read in full three times or more | Name the file and the part that matters |
| Subagents took most of it | Most of the tokens were used by subagents | Keep them for broad searches |
| The session starts out heavy | A lot of context before your first message | Check for MCP servers, plugins and instructions you don't use |
| A very long session | Many messages over several days | One session per task |
Each finding has a severity: Important, Worth a look or Note.
The costliest messages
Below are the messages that cost the most, with their calls, tools and tokens. On each, Suggest a better prompt asks an agent for a more efficient version of that message. The request has a small cost.
The Period view
It adds up every session from the last few days:
- what they cost in total,
- By model, with a chart of what each day came to and a ring of each model's share, each model in its own color. Point at a day or at a part of the ring to see its figures,
- By agent and By project, each as a ring,
- MCP servers,
- The habits that cost the most,
- the list of sessions, with See the session to open each one.
The first time can take a while, because it reads every session.
Beside a top-tier model, a note says what share of its messages asked for little: short messages with a brief answer and hardly any tools, which a smaller model would have answered as well. Point at it for how many they were and what they cost. It only shows for the agents whose sessions keep the prompts.
MCP servers has a card for each server your sessions had connected, with three figures: Sessions that used it, out of the ones that had it connected; Tokens per call, what it adds to every call to the model whether it's used or not; and Uses. One that was never used in the period is marked Unused and shows the Cost of carrying it instead. This comes from Claude Code's sessions only, and the tokens count the server's instructions and its tools' names. The Session view lists the servers of one session.
Notices on the status bar
When an agent finishes a turn, the AI Companion looks over the session and, if something could be better, says so in a short notice on the status bar. It never interrupts or makes a sound. Clicking the notice opens the AI Companion.
It gives notice of: the cache about to expire, a very full context, short messages into a large context, more model than simple tasks need, and very large tool results.
Turn them on and pick them in Preferences → AI Mode → AI Companion → Notices.
The quick question
It is for a one-off question while an agent works: what a command does, what a function is called, what an error means. A small model answers it, in that console's folder and unable to change anything.
It is another session: it does not know what you said to the agent, and the agent does not learn the answer unless you paste it.
- Press
Ctrl+Shift+H(⌘⇧Hon macOS), or click the tab that shows at the bottom right of consoles with an agent. - Type the question.
Entersends it;Shift+Enterstarts a new line. - Copy the answer, or use Paste into the console: it leaves it in the agent's prompt, without sending it.
Send the last exchange with the agent along also sends your last message to the agent and its answer, so you can ask about them. For now it only works in Claude Code consoles.
Each question has a small cost, shown next to the answer.
Who answers
By default the same agent running in the console answers, with its smallest model where it lets one be picked (Haiku in Claude Code, Flash-Lite in Gemini CLI). Change it in Preferences → AI Mode → AI Companion → Who answers.
Turn them off
In Preferences → AI Mode → AI Companion, untick Turn the AI Companion on or Turn the quick question on. Off, the AI Companion shows nowhere and reads nothing.