Omid Sayfun

Set up Hermes compaction and cache TTL for long-running bots

November 19, 2026 · Updated on November 24, 2026via Xvia LinkedIn

My current Hermes bots configuration:

  • protect_first_n: 0 I use Hermes for long-running conversations, so it makes no sense to prevent the first few prompts from being compacted. Hermes defaults this to 3 because the first couple of messages in short-term sessions often carry meaningful context.

  • idle_compact_after_seconds: 1800 This compacts the session after 30 minutes. Compaction manages long-term memory and saves you from burning through your limits. Set this to anything under an hour so it can use your warm cache.

  • compression.threshold_tokens: 400k I might change this to 200k in the future, but for now I’m sticking with 400k as a conservative approach. I find models tend to lose quality after a while. The default compacts at half the window, which is 500k on a 1M model.

  • prompt_caching.cache_ttl: auto Auto gives a 1h TTL to chats (TUI, Telegram, etc.) and 5m to crons, subagents, and other machine-paced work. Since all my bots are long-running, auto fits better than the 5m default.

  • recall_sync: true I’m using Hindsight as an external memory provider for my bots. By default, Hindsight is one turn behind. With recall_sync, it matches your current message.

Over last 6 weeks, my Hermes bots rewrote a cold cache more than 230 times after I paused. I'm experimenting with these settings every single day.

Hermes has a ton of features that sometimes it makes it hard to choose what to use and I think that's the main benefit of Grok Bot over Hermes, that it just works!

Newsletter

Occasional notes on software, tools, and things I learn. No spam.

Unsubscribe anytime.