fix(claude_sdk,conversations,rotation): context size from the last api call, new-day text by rotation reason

This commit is contained in:
hh committed 2026-08-29 16:54:29 +02:00
1 parent 2895e677c0
commit 8d252f9867
8 files changed
+120 -16

No files matched your search

+6
View File
@@ -27,6 +27,12 @@ class TurnUsage:
model_usage: dict[str, Any] | None = None
"""``ResultMessage.model_usage`` verbatim: per-model tokens, cost, web searches."""
context_tokens: int = 0
"""Input of the last API call in the turn (fresh + cached + written to
cache) - the context size the model actually ran with, what Claude Code
shows as the context. The token fields above are sums over every API
call of the turn and grow with the number of tool calls."""
@dataclass
class TurnCapture: