When an OpenCode session gets long, the token count alone doesn’t tell you what to trim. Is it the conversation, a tool that returned a huge result, or the schemas sent with every request? Context Doctor is a terminal dashboard that breaks that total into parts.
Inspect a session
Run /context-doctor in OpenCode V2 to see the estimated size of the system prompt, conversation history, and tool schemas. The Tools tab ranks schema size separately from tool inputs and outputs, so a verbose tool result doesn’t get confused with the cost of exposing that tool in the first place. The History tab shows how those estimates change across requests.

Provider-reported token counts appear separately on the Usage tab. The breakdown is an estimate, not a bill. Run /context-doctor all to compare captured sessions across projects.
What stays local
The plugin observes requests without modifying them or making its own network calls. It keeps bounded, aggregate snapshots in a local SQLite database, not copies of prompts or tool outputs. The screenshots use synthetic test data.