`total_cost_usd` doesn't include historic context when resuming conversations

Resolved 💬 3 comments Opened Jan 20, 2026 by arunsathiya Closed Jan 24, 2026

When resuming a conversation, total_cost_usd only reflects the cost of latest messages sent in the current session. It doesn't account for the historic messages that get loaded into context and sent to the API.

The context_window.current_usage.input_tokens does include all tokens (historic + new), but the cost calculation appears to only track new messages. Would be helpful if total_cost_usd reflected the actual API cost including the full context being sent.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗