chore(sync): mirror docs from openclaw/openclaw@35ec4a9991

This commit is contained in:
openclaw-docs-sync[bot] 2026-04-23 03:58:29 +00:00
parent a313d4eee0
commit b246b21183
2 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,5 @@
{
"repository": "openclaw/openclaw",
"sha": "dc5ab602dfa374413f2f42ba37d7b7dda6fb5113",
"syncedAt": "2026-04-23T03:37:54.932Z"
"sha": "35ec4a9991fd03d7e3a9848bc9fbfeb20fd8504e",
"syncedAt": "2026-04-23T03:58:29.373Z"
}

View File

@ -2,6 +2,7 @@
summary: "Agent loop lifecycle, streams, and wait semantics"
read_when:
- You need an exact walkthrough of the agent loop or lifecycle events
- You are changing session queueing, transcript writes, or session write lock behavior
title: "Agent Loop"
---
@ -48,13 +49,21 @@ wired end-to-end.
- This prevents tool/session races and keeps session history consistent.
- Messaging channels can choose queue modes (collect/steer/followup) that feed this lane system.
See [Command Queue](/concepts/queue).
- Transcript writes are also protected by a session write lock on the session file. The lock is
process-aware and file-based, so it catches writers that bypass the in-process queue or come from
another process.
- Session write locks are non-reentrant by default. If a helper intentionally nests acquisition of
the same lock while preserving one logical writer, it must opt in explicitly with
`allowReentrant: true`.
## Session + workspace preparation
- Workspace is resolved and created; sandboxed runs may redirect to a sandbox workspace root.
- Skills are loaded (or reused from a snapshot) and injected into env and prompt.
- Bootstrap/context files are resolved and injected into the system prompt report.
- A session write lock is acquired; `SessionManager` is opened and prepared before streaming.
- A session write lock is acquired; `SessionManager` is opened and prepared before streaming. Any
later transcript rewrite, compaction, or truncation path must take the same lock before opening or
mutating the transcript file.
## Prompt assembly + system prompt