Overview
A session is a continuous conversation between a user and the agent. Sessions maintain the full message history within a context window and persist across channel reconnections and gateway restarts.Session Lifecycle
- Created: When a new user first messages the agent (or manually via the dashboard)
- Active: Receiving and processing messages
- Idle: No recent activity but context preserved
- Compacted: Context window was full, older messages summarized
Context Windows
Each session has a context window — the amount of conversation history the model can see. This is limited by the model’s maximum context length (typically 200K tokens for Claude). As conversations grow, ArgentOS monitors the context usage and triggers compaction when approaching the limit.Compaction
When a session’s context approaches the model’s limit, ArgentOS compacts the conversation:1
Summarize
Older messages are summarized into a compact representation
2
Replace
The summary replaces the detailed message history
3
Preserve
Recent messages are preserved in full
4
Continue
The agent continues with the summarized context
Session Storage
Sessions are stored in the gateway’s state directory:Cross-Channel Sessions
Session Configuration
Channel Scope
ThechannelScope option controls how Discord guild channels map to sessions:
Managing Sessions
- Via CLI
- Via Dashboard
