diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e7c41256..e5a96fcf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,10 +23,11 @@ - Plugins: add `clawdbot plugins install` (path/tgz/npm), plus `list|info|enable|disable|doctor` UX. - Plugins: voice-call plugin now real (Twilio/log), adds start/status RPC/CLI/tool + tests. - Docs: add plugins doc + cross-links from tools/skills/gateway config. +- Docs: clarify memory flush behavior + writable workspace requirement in Memory/Session/FAQ. - Docs: add beginner-friendly plugin quick start + expand Voice Call plugin docs. - Tests: add Docker plugin loader + tgz-install smoke test. - Tests: extend Docker plugin E2E to cover installing from local folders (`plugins.load.paths`) and `file:` npm specs. -- Tests: add coverage for pre-compaction memory flush settings. +- Tests: add coverage for pre-compaction memory flush settings (including read-only/CLI skips). - Tests: modernize live model smoke selection for current releases and enforce tools/images/thinking-high coverage. (#769) — thanks @steipete. - Agents/Tools: add `apply_patch` tool for multi-file edits (experimental; gated by tools.exec.applyPatch; OpenAI-only). - Agents/Tools: rename the bash tool to exec (config alias maintained). (#748) — thanks @myfunc. @@ -71,6 +72,7 @@ - Agents: skip pre-compaction memory flush when the session workspace is read-only. - Auto-reply: allow inline `/status` for allowlisted senders (stripped before the model); unauthorized senders see it as plain text. - Auto-reply: include config-only allowlisted models in `/model` even when the catalog is partial. +- Auto-reply: ignore inline `/status` directives unless the message is directive-only. - Auto-reply: align `/think` default display with model reasoning defaults. (#751) — thanks @gabriel-trigo. - Auto-reply: flush block reply buffers on tool boundaries. (#750) — thanks @sebslight. - Auto-reply: allow sender fallback for command authorization when `SenderId` is empty (WhatsApp self-chat). (#755) — thanks @juanpablodlc. diff --git a/docs/concepts/memory.md b/docs/concepts/memory.md index 1af220920..246987400 100644 --- a/docs/concepts/memory.md +++ b/docs/concepts/memory.md @@ -31,10 +31,10 @@ These files live under the workspace (`agents.defaults.workspace`, default ## Automatic memory flush (pre-compaction ping) -When a session is **close to auto-compaction**, Clawdbot triggers a **silent +When a session is **close to auto-compaction**, Clawdbot triggers a **silent, agentic turn** that reminds the model to write durable memory **before** the -context is compacted. The default prompt encourages the model to respond with -`NO_REPLY` when there's nothing to store, so the user never sees this turn. +context is compacted. The default prompts explicitly say the model *may reply*, +but usually `NO_REPLY` is the correct response so the user never sees this turn. This is controlled by `agents.defaults.compaction.memoryFlush`: @@ -60,6 +60,7 @@ Details: - **Soft threshold**: flush triggers when the session token estimate crosses `contextWindow - reserveTokensFloor - softThresholdTokens`. - **Silent** by default: prompts include `NO_REPLY` so nothing is delivered. +- **Two prompts**: a user prompt plus a system prompt append the reminder. - **One flush per compaction cycle** (tracked in `sessions.json`). - **Workspace must be writable**: if the session runs sandboxed with `workspaceAccess: "ro"` or `"none"`, the flush is skipped. diff --git a/docs/concepts/session.md b/docs/concepts/session.md index 902c174a0..5aae678e9 100644 --- a/docs/concepts/session.md +++ b/docs/concepts/session.md @@ -25,6 +25,12 @@ All session state is **owned by the gateway** (the “master” Clawdbot). UI cl Clawdbot trims **old tool results** from the in-memory context right before LLM calls by default. This does **not** rewrite JSONL history. See [/concepts/session-pruning](/concepts/session-pruning). +## Pre-compaction memory flush +When a session nears auto-compaction, Clawdbot can run a **silent memory flush** +turn that reminds the model to write durable notes to disk. This only runs when +the workspace is writable. See [Memory](/concepts/memory) and +[Compaction](/concepts/compaction). + ## Mapping transports → session keys - Direct chats collapse to the per-agent primary key: `agent::`. - Multiple phone numbers and providers can map to the same agent main key; they act as transports into one conversation. diff --git a/docs/start/faq.md b/docs/start/faq.md index 825c42ebe..d8afa42d1 100644 --- a/docs/start/faq.md +++ b/docs/start/faq.md @@ -208,7 +208,8 @@ Clawdbot memory is just Markdown files in the agent workspace: - Curated long-term notes in `MEMORY.md` (main/private sessions only) Clawdbot also runs a **silent pre-compaction memory flush** to remind the model -to write durable notes before auto-compaction. See [Memory](/concepts/memory). +to write durable notes before auto-compaction. This only runs when the workspace +is writable (read-only sandboxes skip it). See [Memory](/concepts/memory). ## Where things live on disk