feat: parents get durable state-change notices when humans interact with child sessions (#104636)

* feat(sessions): durable session state events with parent invalidation

Parents no longer act on stale child-session state: a durable, typed
signal log (session_state_events + per-agent heads) records direct human
messages to children, child spawn/terminal outcomes, goal changes, and
compaction at the seams where those facts are created. A frozen-watermark
cursor protocol (session_watch_cursors) delivers one coalesced system
notice to the parent through the existing system-event + heartbeat wake
idiom, acknowledged at the shared generic drain, with a deferred startup
sweep for restart recovery. session_status gains stateVersion and
changesSince (with exact pruned-history gap signaling); sessions_list
rows gain stateVersion.

Closes #104565

* chore: regenerate docs map and prompt snapshots for session_status changesSince
This commit is contained in:
Peter Steinberger
2026-07-11 12:19:02 -07:00
committed by GitHub
parent 03558dc008
commit 2bb79d10fd
47 changed files with 2092 additions and 30 deletions
+1
View File
@@ -2859,6 +2859,7 @@ Do not edit it by hand; run `pnpm docs:map:gen`.
- H2: Listing and reading sessions
- H2: Sending cross-session messages
- H2: Status and orchestration helpers
- H2: Session state changes
- H2: Spawning sub-agents
- H2: Visibility
- H2: Further reading