Repository navigation
Replies: 2 comments
|
Note Grok responding on behalf of Julius. Duplicate of #13073 — same request for per-thread token usage / estimated API cost (provider-reported or LiteLLM estimate), clearly distinguished from billed spend. Context Window popover / composer-badge placement is a UI detail that belongs on that thread (same outcome as closed dup #14770). Please +1 / fold any V2-specific detail into #13073. Related prior work (closed unmerged): #9136 (composer thread cost; V2 freeze), #9017, #9016. Sibling Ideas (not a dup — gateway budget source): #15042. |
|
+1, with one addition: roll subagents and delegated child threads into the thread's total. A thread that starts Agent-tool subagents (or Example from one Claude thread today, computed from the local transcripts at list prices: main thread $15.14, four subagents $12.08. The subagents were 44% of the thread and visible nowhere in T3. Suggested shape in the popover: with per-child cost on hover in the Lineage list. |
Uh oh!
There was an error while loading. Please reload this page.
Problem
The Usage page answers "what did I spend this week". Nothing in the thread view answers "what has this conversation cost so far?". The Claude Code CLI status line shows this (
cost.total_cost_usd). In T3 it's missing.PR #9136 implemented a thread cost estimate and was closed only because of the V2 freeze ("reopen once V2 lands"). V2 has landed, so this proposes the scope again on the new code.
Proposal
Show a thread cost row in the existing Context Window popover, under "Total processed":
Optionally, add a compact badge next to the context percentage in the composer (for example
$1.4 · 32%), behind a setting.All toggles live in the UI under Settings → General, next to the context window indicator:
Cost source, in priority order, with the source labelled in the UI:
total_cost_usd, the same number the CLI status line shows.usagePriceOverrides, so gateway users can match their gateway's prices. This also covers providers that don't report cost (Codex, etc.).Open questions for maintainers
total_cost_usdis cumulative per CLI session and resets when the CLI process is resumed. Should the thread total be the sum over sessions, or should it switch to the estimate when sessions span resumes?contextWindowMeterEnabled?Related: #15042 (gateway budget source).
All reactions