How-To Guide
Configure Session Reset Policies for Messaging
Control when messaging sessions automatically reset — balance context length, API costs, and conversation continuity.
Quick answer
Session reset policies stop conversation context from growing forever — and your token bill with it — by clearing old context automatically while keeping important details in persistent memory. Configure when resets trigger to balance continuity against cost; pair with context compression for long sessions that stay cheap.
Without resets, conversation context grows indefinitely — increasing API costs with every message. Session reset policies automatically clear old context while preserving important information in persistent memory. Find the balance between continuity and cost.
Managed cloud · API costs included · Skill library · Cancel anytime
Before you start:
- ☑Hermes Agent with messaging gateway enabled
- ☑Understanding of context windows and token costs
Steps
- 1
Understand reset modes
Options: 'both' (idle + daily), 'idle' (inactivity only), 'daily' (fixed hour), 'none' (never auto-reset)
- 2
Set the mode
In config.yaml, set session_reset: mode: both
- 3
Configure idle timeout
Set session_reset: idle_minutes: 1440 (24 hours of inactivity)
- 4
Set daily reset hour
Set session_reset: at_hour: 4 (4 AM local time)
- 5
Configure per-user group sessions
Set group_sessions_per_user: true to isolate users in group chats
Pro Tips
- 💡Mode 'both' is recommended — resets on either inactivity OR daily boundary, whichever comes first
- 💡Before reset, the agent gets one turn to save important memories — nothing is lost permanently
- 💡Users can always manually reset with /reset or /new in chat
- 💡Set group_sessions_per_user: true to prevent users in group chats from seeing each other's context
Troubleshooting
❌ Sessions resetting too often
✅ Increase idle_minutes from 1440 to 2880 (48 hours) or set mode: none to disable auto-reset.
❌ Agent forgetting important context after reset
✅ Ensure memory: memory_enabled: true so the agent saves facts to MEMORY.md before reset. Critical info persists across sessions.
❌ Different users in group seeing each other's messages
✅ Set group_sessions_per_user: true to isolate sessions per participant in group chats.
❌ Daily reset happening at wrong time
✅ at_hour uses local time, not UTC. Set to the hour you want in your timezone (0-23).
FAQ
Why configure session resets?
Without them, context grows with every message and so do API costs. Reset policies clear old context automatically while preserving key facts in persistent memory.
Won't resetting lose important context?
Not if it's in persistent memory, which survives resets. Resets clear the live conversation window; long-term knowledge stays in ~/.hermes memory.
Resets or context compression — which?
They complement each other. Compression summarizes to fit the window; resets clear it on a policy. Use both for long sessions that stay capable and cheap.