# Context window exceeded at turn 23. Here's how I track token usage without a tokenizer.

> Source: <https://dev.to/mukundakatta/context-window-exceeded-at-turn-23-heres-how-i-track-token-usage-without-a-tokenizer-2cm1>
> Published: 2026-05-25 21:21:14+00:00

*This is a submission for the Hermes Agent Challenge.*

My Hermes agent's context window fills up gradually. Each turn adds messages. Tool call results add more. After 23 turns, the API returned a context length error — with no warning, no graceful handling, just an exception in the middle of a synthesis step.
