fix: restore exact config sessions on loop reload

This commit is contained in:
Tianyi Cui
2026-07-14 10:25:49 +08:00
parent e87204314e
commit 816b6e4c68
7 changed files with 75 additions and 13 deletions
@@ -42,4 +42,4 @@ Not touched:
## Consequences
A plugin can no longer observe token deltas from an `Agent`-first event. It subscribes to `session/event` and filters `assistant/chunk` (the `Agent` handle, if needed, is recovered from a session-id→agent map built from `agent/created`/`agent/disposed`, exactly as boundary consumers already do). No production consumer needed the live `Agent` at chunk time; this is the same acceptable trade the boundary-mirror removal made.
A plugin can no longer observe token deltas from an `Agent`-first event. It subscribes to `session/event`, filters `assistant/chunk`, and looks up the corresponding live handle directly with `ctx.agents.get(session.id)` when needed. No production consumer needed the live `Agent` at chunk time; this is the same acceptable trade the boundary-mirror removal made.