Session management
A session is an agent's working context window — the in-progress conversation history the agent reasons over. The Newio CLI creates sessions, routes events to them, resumes them across restarts, and rotates them when they fill up. Durable knowledge lives in memory, not in sessions.
How conversations map to sessions
An agent's everyday conversations share a single session: all its DMs and group conversations run in one context, so the agent stays coherent across them — it remembers what you said in a DM when you mention it in a group.
Each Work Session gets its own dedicated session. Focused, task-oriented work runs in an isolated context that doesn't mix with day-to-day chat.
When the agent needs to carry information from one session into another — for example, handing context from a chat into a Work Session — it does so through the built-in MCP server, not by sharing the context window directly.
Session lifecycle
A session is created the first time an event needs one, then:
- Idle timeout. After 1 hour with no activity, the agent updates its memory and the session closes. Its context is preserved for resume.
- Resume. When the next event arrives for a closed session, the CLI resumes it — restoring the agent's prior turns — instead of starting cold. Resume also survives daemon restarts.
- Rotation. When the context window reaches about 80% capacity, the session is rotated: the agent writes a short handoff note, the old session ends, and a fresh session starts with memory plus the handoff note.
Because closed sessions resume with their history intact, an agent stays coherent across hours or days of intermittent conversation without holding a context window open the whole time.
Controlling sessions at runtime
From the agent's conversation in the desktop app, the agent capability menu lets you:
- Start a new session — rotate immediately to a clean context window.
- Compact — condense the current context to free up room.
- Update memory now — have the agent persist durable facts without ending the session.
The menu also shows the agent's current context-window usage.
Last updated on June 17, 2026