You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/system-prompt.md
+15-13Lines changed: 15 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,8 @@ PR.
166
166
167
167
## Workspace bootstrap injection
168
168
169
-
Bootstrap files are trimmed and appended under **Project Context** so the model sees identity and profile context without needing explicit reads:
169
+
Bootstrap files are resolved from the active workspace, then routed to the
170
+
prompt surface that matches their lifetime:
170
171
171
172
-`AGENTS.md`
172
173
-`SOUL.md`
@@ -177,23 +178,24 @@ Bootstrap files are trimmed and appended under **Project Context** so the model
177
178
-`BOOTSTRAP.md` (only on brand-new workspaces)
178
179
-`MEMORY.md` when present
179
180
180
-
All of these files are **injected into the context window** on every turn unless
181
-
a file-specific gate applies. `HEARTBEAT.md` is omitted on normal runs when
182
-
heartbeats are disabled for the default agent or
181
+
On the native Codex harness, OpenClaw avoids repeating stable workspace files
182
+
in every user turn. Codex loads `AGENTS.md` through its own project-doc
183
+
discovery. `SOUL.md`, `IDENTITY.md`, `TOOLS.md`, and `USER.md` are forwarded as
184
+
Codex developer instructions. `HEARTBEAT.md` content is not injected; heartbeat
185
+
turns get a collaboration-mode note pointing to the file when it exists and is
186
+
non-empty. `MEMORY.md` and active `BOOTSTRAP.md` content keep the normal
187
+
turn-context role for now.
188
+
189
+
On non-Codex harnesses, bootstrap files continue to be composed into the
190
+
OpenClaw prompt according to their existing gates. `HEARTBEAT.md` is omitted on
191
+
normal runs when heartbeats are disabled for the default agent or
183
192
`agents.defaults.heartbeat.includeSystemPromptSection` is false. Keep injected
184
-
files concise, especially `MEMORY.md`. `MEMORY.md` is intended to stay a
185
-
curated long-term summary; detailed daily notes belong in `memory/*.md` where
193
+
files concise, especially `MEMORY.md`. `MEMORY.md` is intended to stay a curated
194
+
long-term summary; detailed daily notes belong in `memory/*.md` where
186
195
`memory_search` and `memory_get` can retrieve them on demand. Oversized
187
196
`MEMORY.md` files increase prompt usage and can be partially injected because of
188
197
the bootstrap file limits below.
189
198
190
-
When a session runs on the native Codex harness, Codex loads `AGENTS.md`
191
-
through its own project-doc discovery. OpenClaw still resolves the remaining
192
-
bootstrap files and forwards them as Codex config instructions, so `SOUL.md`,
193
-
`TOOLS.md`, `IDENTITY.md`, `USER.md`, `HEARTBEAT.md`, `BOOTSTRAP.md`, and
194
-
`MEMORY.md` keep the same workspace-context role without duplicating
195
-
`AGENTS.md`.
196
-
197
199
<Note>
198
200
`memory/*.md` daily files are **not** part of the normal bootstrap Project Context. On ordinary turns they are accessed on demand via the `memory_search` and `memory_get` tools, so they do not count against the context window unless the model explicitly reads them. Bare `/new` and `/reset` turns are the exception: the runtime can prepend recent daily memory as a one-shot startup-context block for that first turn.
Copy file name to clipboardExpand all lines: docs/gateway/heartbeat.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -376,10 +376,12 @@ channels:
376
376
377
377
## HEARTBEAT.md (optional)
378
378
379
-
If a `HEARTBEAT.md` file exists in the workspace, the default prompt tells the agent to read it. Think of it as your "heartbeat checklist": small, stable, and safe to include every 30 minutes.
379
+
If a `HEARTBEAT.md` file exists in the workspace, the default prompt tells the agent to read it. Think of it as your "heartbeat checklist": small, stable, and safe to consider every 30 minutes.
380
380
381
381
On normal runs, `HEARTBEAT.md` is only injected when heartbeat guidance is enabled for the default agent. Disabling the heartbeat cadence with `0m` or setting `includeSystemPromptSection: false` omits it from normal bootstrap context.
382
382
383
+
On the native Codex harness, `HEARTBEAT.md` content is not injected into the turn. If the file exists and has non-whitespace content, the heartbeat collaboration-mode instructions point Codex at the file and tell it to read before proceeding.
384
+
383
385
If `HEARTBEAT.md` exists but is effectively empty (only blank lines and markdown headers like `# Heading`), OpenClaw skips the heartbeat run to save API calls. That skip is reported as `reason=empty-heartbeat-file`. If the file is missing, the heartbeat still runs and the model decides what to do.
384
386
385
387
Keep it tiny (short checklist or reminders) to avoid prompt bloat.
0 commit comments