> ## Documentation Index
> Fetch the complete documentation index at: https://docs2.openclaw.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Sessions and multiple chats

## Sessions and multiple chats

> **How do I start a fresh conversation?**
>
> Send `/new` or `/reset` as a standalone message. See [Session management](https://docs2.openclaw.ai/concepts/session.md).

> **Do sessions reset automatically if I never send /new?**
>
> No, not by default. Sessions keep the same `sessionId`, and compaction bounds the active model context as conversations grow. `/new` and `/reset` remain available, or you can opt into automatic resets with `mode: "daily"` or `mode: "idle"`. Daily mode rolls over at `session.reset.atHour` (default `4`, 0-23) on the gateway host; idle mode uses `session.reset.idleMinutes` since the last real interaction, not heartbeat/cron/exec system events.
>
> ```json5 theme={"theme":{"light":"min-light","dark":"min-dark"}}
> {
>   session: {
>     reset: { mode: "daily", atHour: 4 },
>     resetByType: {
>       group: { mode: "idle", idleMinutes: 120 },
>       thread: { mode: "daily", atHour: 6 },
>     },
>     resetByChannel: {
>       discord: { mode: "idle", idleMinutes: 10080 },
>     },
>   },
> }
> ```
>
> `resetByType` supports `direct`, `group`, and `thread`. Doctor migrates legacy `dm` entries to `direct`; the schema rejects `dm`. Legacy top-level `session.idleMinutes` still works as a compatibility alias for an idle-mode default when no `session.reset`/`resetByType` block is set. See [Session management](https://docs2.openclaw.ai/concepts/session.md) for the full lifecycle.

> **Is there a way to make a team of OpenClaw instances (one CEO and many agents)?**
>
> Yes, via **multi-agent routing** and **sub-agents**: one coordinator agent plus several worker agents with their own workspaces and models.
>
> This is best seen as a fun experiment - it is token-heavy and often less efficient than one bot with separate sessions. The typical model is one bot you talk to, with different sessions for parallel work, spawning sub-agents when needed.
>
> Docs: [Multi-agent routing](https://docs2.openclaw.ai/concepts/multi-agent.md), [Sub-agents](https://docs2.openclaw.ai/tools/subagents.md), [Agents CLI](https://docs2.openclaw.ai/cli/agents.md).

> **Why did context get truncated mid-task? How do I prevent it?**
>
> Session context is limited by the model window. Long chats, large tool outputs, or many files can trigger compaction or truncation.
>
> * Ask the bot to summarize current state and write it to a file.
> * Use `/compact` before long tasks, `/new` when switching topics.
> * Keep important context in the workspace and ask the bot to read it back.
> * Use sub-agents for long or parallel work so the main chat stays smaller.
> * Pick a model with a larger context window if this happens often.

> **How do I completely reset OpenClaw but keep it installed?**
>
> ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
> openclaw reset
> ```
>
> Non-interactive full reset:
>
> ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
> openclaw reset --scope full --yes --non-interactive
> ```
>
> Then re-run setup:
>
> ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
> openclaw onboard --install-daemon
> ```
>
> To reset and immediately re-run onboarding, pass `openclaw onboard --reset`; reset is a command flag, not a **Setup mode** menu choice. See [Onboarding (CLI)](https://docs2.openclaw.ai/start/wizard.md). If you used profiles (`--profile` / `OPENCLAW_PROFILE`), reset each state dir (default `~/.openclaw-<profile>`). Dev-only reset: `openclaw gateway --dev --reset` wipes dev config, credentials, sessions, and workspace.

> **I am getting "context too large" errors - how do I reset or compact?**
>
> * **Compact** (keeps the conversation, summarizes older turns): `/compact` or `/compact <instructions>` to guide the summary.
> * **Reset** (fresh session ID for the same chat key): `/new` or `/reset`.
>
> If it keeps happening, tune **session pruning** (`agents.defaults.contextPruning`) to trim old tool output, or use a model with a larger context window.
>
> Docs: [Compaction](https://docs2.openclaw.ai/concepts/compaction.md), [Session pruning](https://docs2.openclaw.ai/concepts/session-pruning.md), [Session management](https://docs2.openclaw.ai/concepts/session.md).

> **Why am I seeing "LLM request rejected: messages.content.tool\_use.input field required"?**
>
> Provider validation error: the model emitted a `tool_use` block without the required `input`. Usually means the session history is stale or corrupted (often after long threads or a tool/schema change).
>
> Fix: start a fresh session with `/new` (standalone message).

> **Why am I getting heartbeat messages every 30 minutes?**
>
> Heartbeats run every **30m** by default, or **1h** when the resolved auth mode is Anthropic OAuth/token auth (including Claude CLI reuse) and `heartbeat.every` is unset. Tune or disable:
>
> ```json5 theme={"theme":{"light":"min-light","dark":"min-dark"}}
> {
>   agents: {
>     defaults: {
>       heartbeat: {
>         every: "2h", // or "0m" to disable recurring cadence
>       },
>     },
>   },
> }
> ```
>
> Heartbeat instructions live in the monitor's cron scratch. Effectively empty scratch skips the heartbeat run to save API calls; without scratch, the heartbeat still runs and the model decides what to do. `0m` does not block targeted event-driven wakes, such as a background exec completion follow-up; those can still run one agent turn without enabling recurring cadence.
>
> Per-agent overrides use `agents.entries.*.heartbeat`. Docs: [Heartbeat](https://docs2.openclaw.ai/gateway/heartbeat.md).

> **Do I need to add a "bot account" to a WhatsApp group?**
>
> No. OpenClaw runs on **your own account** - if you are in the group, OpenClaw can see it. By default, group replies are blocked until you allow senders (`groupPolicy: "allowlist"`).
>
> To restrict group replies to only you:
>
> ```json5 theme={"theme":{"light":"min-light","dark":"min-dark"}}
> {
>   channels: {
>     whatsapp: {
>       groupPolicy: "allowlist",
>       groupAllowFrom: ["+15551234567"],
>     },
>   },
> }
> ```

> **How do I get the JID of a WhatsApp group?**
>
> Fastest: tail logs and send a test message in the group.
>
> ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
> openclaw logs --follow --json
> ```
>
> Look for `chatId` (or `from`) ending in `@g.us`, like `1234567890-1234567890@g.us`.
>
> If already configured/allowlisted, list groups from config:
>
> ```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
> openclaw directory groups list --channel whatsapp
> ```
>
> Docs: [WhatsApp](https://docs2.openclaw.ai/channels/whatsapp.md), [Directory](https://docs2.openclaw.ai/cli/directory.md), [Logs](https://docs2.openclaw.ai/cli/logs.md).

> **Why does OpenClaw not reply in a group?**
>
> Two common causes: mention gating is on by default (you must @mention the bot, or match `mentionPatterns`), or you configured `channels.whatsapp.groups` without `"*"` and the group is not allowlisted.
>
> See [Groups](https://docs2.openclaw.ai/channels/groups.md) and [Group messages](https://docs2.openclaw.ai/channels/group-messages.md).

> **Do groups/threads share context with DMs?**
>
> Direct chats collapse to the main session by default. Groups/channels get their own session keys unless a route binding sets `session.groupScope: "main"` to merge that room into the main session; Telegram topics / Discord threads are separate sessions. See [Groups](https://docs2.openclaw.ai/channels/groups.md) and [Group messages](https://docs2.openclaw.ai/channels/group-messages.md).

> **How many workspaces and agents can I create?**
>
> No hard limits - dozens or even hundreds are fine, but watch:
>
> * **Disk growth**: active sessions and transcripts live in the per-agent SQLite database; legacy/archive artifacts can still accumulate under `~/.openclaw/agents/<agentId>/sessions/`.
> * **Token cost**: more agents means more concurrent model usage.
> * **Ops overhead**: per-agent auth profiles, workspaces, and channel routing.
>
> Keep one **active** workspace per agent (`agents.defaults.workspace`), prune old sessions with `openclaw sessions cleanup` if disk grows (do not edit active SQLite state by hand), and use `openclaw doctor` to spot stray workspaces and profile mismatches.

> **Can I run multiple bots or chats at the same time (Slack), and how should I set that up?**
>
> Yes, via **Multi-Agent Routing**: run multiple isolated agents and route inbound messages by channel/account/peer. Slack is supported as a channel and can be bound to specific agents.
>
> Browser access is powerful but not "do anything a human can" - anti-bot, CAPTCHAs, and MFA can still block automation. For the most reliable control, use local Chrome MCP on the host, or CDP on the machine that actually runs the browser.
>
> Best-practice setup: always-on Gateway host (VPS/Mac mini), one agent per role (bindings), Slack channel(s) bound to those agents, and local browser via Chrome MCP or a node when needed.
>
> Docs: [Multi-Agent Routing](https://docs2.openclaw.ai/concepts/multi-agent.md), [Slack](https://docs2.openclaw.ai/channels/slack.md), [Browser](https://docs2.openclaw.ai/tools/browser.md), [Nodes](https://docs2.openclaw.ai/nodes.md).
