Files
openclaw/src
Akari 455bc1ebba fix: use last API call's cache tokens for context-size display (#13698) (#13805)
The UsageAccumulator sums cacheRead/cacheWrite across all API calls
within a single turn. With Anthropic prompt caching, each call reports
cacheRead ≈ current_context_size, so after N tool-call round-trips the
accumulated total becomes N × actual_context, which gets clamped to
contextWindow (200k) by deriveSessionTotalTokens().

Fix: track the most recent API call's cache fields separately and use
them in toNormalizedUsage() for context-size reporting. This makes
/status Context display accurate while preserving accumulated output
token counts.

Fixes #13698
Fixes #13782

Co-authored-by: akari-musubi <259925157+akari-musubi@users.noreply.github.com>
2026-02-12 08:01:36 -06:00
..
2026-01-30 03:16:21 +01:00
2026-02-04 10:37:14 -05:00
2026-02-09 09:58:58 +09:00
2026-01-14 15:02:19 +00:00
2026-02-03 06:10:19 +00:00
2026-02-09 18:56:58 -08:00