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
{{ message }}
Repository navigation
Commit 89a5bda
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/concepts/session-state.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ OpenClaw appends a typed event to the shared state database (`session_state_even
28
28
|`run_completed`| A child run ends successfully | No (log only) |
29
29
|`run_failed`| A child run fails, times out, or is cancelled | No (log only) |
30
30
|`compacted`| The session's history is compacted | No (log only) |
31
+
|`adopted`| A catalog session is adopted into OpenClaw | No (log only) |
31
32
32
33
Each event names its actor (`human`, `agent`, or `system`). Cancelled and timed-out child runs are recorded as failures with the precise outcome (`cancelled`, `timeout`, or `error`) preserved in the event payload.
33
34
@@ -46,6 +47,8 @@ Watcher identity must be an agent-qualified session key. Under `session.scope="g
46
47
47
48
Watches clean themselves up: cursor rows expire with signal-log retention, are removed when the watcher session resets, and are deleted with either session. There is no unwatch verb in v1.
48
49
50
+
Watched sessions adopted from a session catalog are checked for direct upstream human activity on a fixed cadence. Detected activity enters the same signal log and watcher flow as other direct human turns.
51
+
49
52
## Notices: one, not many
50
53
51
54
When a notify-eligible event lands and a watcher's cursor is behind, the watcher receives one system notice on its next turn:
@@ -97,6 +100,12 @@ Current limits:
97
100
- Notice delivery assumes one gateway process owns the shared state database. Multiple gateways share the durable log and `changesSince`, but v1 does not push notices across processes.
98
101
- Compaction events cover the embedded runtime's compaction owners; native-harness-only compaction is not fully logged.
99
102
- Cancelled-outcome payload detail is currently produced by ACP child runs; native sub-agent cancellations surface as generic failures.
103
+
- Upstream self-echo detection compares normalized user text. An external prompt matching one of the session's 10 most recent OpenClaw-side user messages is treated as self-echo.
104
+
- A single local Claude JSONL row larger than the 1 MiB per-cadence scan cap blocks that session's cursor in v1; unclassified bytes are never skipped.
105
+
- Paired-node Claude checks classify the latest 50 transcript items per cadence. Larger bursts can fall outside the v1 scan window.
106
+
- Catalog sessions that have not been adopted remain outside the awareness layer in v1.
107
+
- Sessions adopted before this feature carry no upstream link; continue them from the catalog once to start upstream monitoring.
108
+
- Upstream links assume each adopted session key maps to one owning agent (adoption uses the default store agent). Multi-agent adoption of the same external thread is not monitored in v1.
0 commit comments