From 14bbb092d98ec19c1d86b1f1c7e1fc7e68fb1da0 Mon Sep 17 00:00:00 2001 From: "openclaw-docs-sync[bot]" Date: Mon, 4 May 2026 00:37:11 +0000 Subject: [PATCH] chore(sync): mirror docs from openclaw/openclaw@0fa70f5a47f89e201ec8a35e214f42b0eb452899 --- .openclaw-sync/source.json | 4 ++-- docs/concepts/agent.md | 4 ++-- docs/concepts/system-prompt.md | 5 +++-- docs/gateway/config-agents.md | 12 ++++++++---- docs/web/webchat.md | 1 + 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index db9abab6a..fe0b0ec6b 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "57b2d297613a29010b14eca8fefbeced00e5db86", - "syncedAt": "2026-05-04T00:31:46.485Z" + "sha": "0fa70f5a47f89e201ec8a35e214f42b0eb452899", + "syncedAt": "2026-05-04T00:35:18.667Z" } diff --git a/docs/concepts/agent.md b/docs/concepts/agent.md index d7280dd0e..9b9769cdc 100644 --- a/docs/concepts/agent.md +++ b/docs/concepts/agent.md @@ -33,13 +33,13 @@ Inside `agents.defaults.workspace`, OpenClaw expects these user-editable files: - `IDENTITY.md` — agent name/vibe/emoji - `USER.md` — user profile + preferred address -On the first turn of a new session, OpenClaw injects the contents of these files directly into the agent context. +On the first turn of a new session, OpenClaw injects the contents of these files into the system prompt's Project Context. Blank files are skipped. Large files are trimmed and truncated with a marker so prompts stay lean (read the file for full content). If a file is missing, OpenClaw injects a single “missing file” marker line (and `openclaw setup` will create a safe default template). -`BOOTSTRAP.md` is only created for a **brand new workspace** (no other bootstrap files present). If you delete it after completing the ritual, it should not be recreated on later restarts. +`BOOTSTRAP.md` is only created for a **brand new workspace** (no other bootstrap files present). While it is pending, OpenClaw keeps it in Project Context and adds system-prompt bootstrap guidance for the initial ritual instead of copying it into the user message. If you delete it after completing the ritual, it should not be recreated on later restarts. To disable bootstrap file creation entirely (for pre-seeded workspaces), set: diff --git a/docs/concepts/system-prompt.md b/docs/concepts/system-prompt.md index 725eddf4e..2dc5d7a39 100644 --- a/docs/concepts/system-prompt.md +++ b/docs/concepts/system-prompt.md @@ -176,9 +176,10 @@ Large files are truncated with a marker. The max per-file size is controlled by `agents.defaults.bootstrapMaxChars` (default: 12000). Total injected bootstrap content across files is capped by `agents.defaults.bootstrapTotalMaxChars` (default: 60000). Missing files inject a short missing-file marker. When truncation -occurs, OpenClaw can inject a warning block in Project Context; control this with +occurs, OpenClaw can inject a concise system-prompt warning notice; control this with `agents.defaults.bootstrapPromptTruncationWarning` (`off`, `once`, `always`; -default: `once`). +default: `once`). Detailed raw/injected counts stay in diagnostics such as +`/context`, `/status`, doctor, and logs. Sub-agent sessions only inject `AGENTS.md` and `TOOLS.md` (other bootstrap files are filtered out to keep the sub-agent context small). diff --git a/docs/gateway/config-agents.md b/docs/gateway/config-agents.md index 2de97c530..a59d2c9c4 100644 --- a/docs/gateway/config-agents.md +++ b/docs/gateway/config-agents.md @@ -116,12 +116,16 @@ Max total characters injected across all workspace bootstrap files. Default: `60 ### `agents.defaults.bootstrapPromptTruncationWarning` -Controls agent-visible warning text when bootstrap context is truncated. +Controls the agent-visible system-prompt notice when bootstrap context is truncated. Default: `"once"`. -- `"off"`: never inject warning text into the system prompt. -- `"once"`: inject warning once per unique truncation signature (recommended). -- `"always"`: inject warning on every run when truncation exists. +- `"off"`: never inject truncation notice text into the system prompt. +- `"once"`: inject a concise notice once per unique truncation signature (recommended). +- `"always"`: inject a concise notice on every run when truncation exists. + +Detailed raw/injected counts and config tuning fields stay in diagnostics such +as context/status reports and logs; routine WebChat user/runtime context only +gets the concise recovery notice. ```json5 { diff --git a/docs/web/webchat.md b/docs/web/webchat.md index 1df49c775..b5dca2a8b 100644 --- a/docs/web/webchat.md +++ b/docs/web/webchat.md @@ -28,6 +28,7 @@ Status: the macOS/iOS SwiftUI chat UI talks directly to the Gateway WebSocket. - Compaction entries render as an explicit compacted-history divider. The divider explains that earlier turns are preserved in a checkpoint and links to the Sessions checkpoint controls, where operators can branch or restore the pre-compaction view when their permissions allow it. - Control UI remembers the backing Gateway `sessionId` returned by `chat.history` and includes it on follow-up `chat.send` calls, so reconnects and page refreshes continue the same stored conversation unless the user starts or resets a session. - Control UI coalesces duplicate in-flight submits for the same session, message, and attachments before generating a new `chat.send` run id; the Gateway still dedupes repeated requests that reuse the same idempotency key. +- Workspace startup files and pending `BOOTSTRAP.md` instructions are supplied through the agent system prompt's Project Context, not copied into the WebChat user message. Bootstrap truncation only adds a concise system-prompt recovery notice; detailed counts and config knobs stay on diagnostic surfaces. - `chat.history` is also display-normalized: runtime-only OpenClaw context, inbound envelope wrappers, inline delivery directive tags such as `[[reply_to_*]]` and `[[audio_as_voice]]`, plain-text tool-call XML