Cut Hermes costs by limiting old chat history
Agent spending can drop through changes without switching the model, framework, or workflow. In one tracked OpenClaw case, about 90% of the token spend came from extra material around the real task, such as background overhead, old , and unused .
An agent often sends the whole prior conversation again with each new request, so make the same old text billable again and again. By the time a session reaches 40 messages, each new answer can include all 40 previous messages as .
The main visible setting is a conversation-history cap of 20 messages. In OpenClaw, the example uses `maxHistoryMessages` set to 20 in `~/.openclaw/openclaw.json`; in Hermes, look for the equivalent history or in the agent config.
Key points
- Limit to 20 messages.
- resend old messages, which raises token spend.
- In OpenClaw, the setting is `maxHistoryMessages: 20` in `~/.openclaw/openclaw.json`.
- In Hermes, find the matching history or in the agent config.
- Unused and background overhead can add silent cost on every API call.