diff --git a/packages/web/src/content/docs/tui.mdx b/packages/web/src/content/docs/tui.mdx index a92da6a022..013dc4a6ba 100644 --- a/packages/web/src/content/docs/tui.mdx +++ b/packages/web/src/content/docs/tui.mdx @@ -27,6 +27,26 @@ Give me a quick summary of the codebase. --- +## Session context + +OpenCode tracks token usage and cost for each session. You can open the **Context** tab from the context indicator in the session header. + +- Hover the indicator to see a quick tooltip (tokens, % usage, cost). +- Click it to open the **Context** tab. + +The **Context** tab includes: + +- Provider/model details and the model's context limit +- Token totals (input/output/reasoning/cache) plus an approximate breakdown +- The latest system prompt (if one was set) +- Raw message JSON for debugging + +:::note +The breakdown is an estimate; providers tokenize content differently. +::: + +--- + ## File references You can reference files in your messages using `@`. This does a fuzzy file search in the current working directory.