Persist agent task state and stabilize CI

This commit is contained in:
adrian
2026-04-14 10:08:09 -07:00
parent c66f085580
commit 1176180367
24 changed files with 238 additions and 82 deletions

View File

@@ -0,0 +1,15 @@
# PR 17387 Agent Task Persistence Assumption
The review request said to persist the registered agent task_id "in the same place that other
session details are stored" without specifying the exact persistence shape.
Assumption used in this patch:
- Persist session-scoped agent task state in the thread rollout file, alongside other resumable
thread/session data.
- Keep agent identity registration on startup, but register the backend task lazily when a session
first needs task-scoped auth.
- Model task updates as an append-only RolloutItem::SessionState record instead of mutating the
canonical first SessionMeta line, because resumed threads need later updates and clears to win.
- Do not carry auth-binding fields on the persisted session task; only persist the task fields
needed to resume the same backend task for the same stored registered agent identity.