Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
OpenClaw organizes conversations into sessions. Each message is routed to a session based on where it came from -- DMs, group chats, cron jobs, etc.
| Source | Behavior |
|---|---|
| Direct messages | Shared session by default |
| Group chats | Isolated per group |
| Rooms/channels | Isolated per room |
| Cron jobs | Fresh session per run |
| Webhooks | Isolated per hook |
By default, all DMs share one session for continuity. This is fine for single-user setups.
The fix:
json5{ session: { dmScope: "per-channel-peer", // isolate by channel + sender }, }
Other options:
mainper-peerper-channel-peerper-account-channel-peerDock commands let a user move the current direct-chat session's reply route to another linked channel without starting a new session. See Channel docking for examples, config, and troubleshooting.
Verify your setup with
openclaw security auditSessions are reused until they expire:
sessionIdsession.reset.idleMinutes/new/reset/new <model>When both daily and idle resets are configured, whichever expires first wins. Heartbeat, cron, exec, and other system-event turns may write session metadata, but those writes do not extend daily or idle reset freshness. When a reset rolls the session, queued system-event notices for the old session are discarded so stale background updates are not prepended to the first prompt in the new session.
Sessions with an active provider-owned CLI session are not cut by the implicit daily default. Use
/resetsession.resetAll session state is owned by the gateway. UI clients query the gateway for session data.
~/.openclaw/agents/<agentId>/sessions/sessions.json~/.openclaw/agents/<agentId>/sessions/<sessionId>.jsonlsessions.jsonsessionStartedAtsessionIdlastInteractionAtupdatedAtOlder rows without
sessionStartedAtlastInteractionAtOpenClaw automatically bounds session storage over time. By default, it runs in
warnsession.maintenance.mode"enforce"json5{ session: { maintenance: { mode: "enforce", pruneAfter: "30d", maxEntries: 500, }, }, }
For production-sized
maxEntriesopenclaw sessions cleanup --enforcePreview with
openclaw sessions cleanup --dry-runopenclaw statusopenclaw sessions --json--active <minutes>/status/context list© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine