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
workflows: one failed restore() aborts entire session-start delivery reconciliation #109
Verified by read-only audit (seal/gpt-5.6-sol subagent, verdict: CONFIRMED).
The synchronous session_start handler iterates persisted runs and calls resultDelivery.restore(...) without per-run try/catch (extensions/workflows/index.ts:989-990, loop at index.ts:955-994).
For a held-for-inline run, restore() calls persistState(..., "pending")beforeenqueue() (result-delivery.ts:158-168), and persistState() invokes options.persist(details) with no error handling (result-delivery.ts:42-57; delegate index.ts:774-778).
When that persistence throws:
The failed run is not enqueued (enqueue() follows persistence), and its durable workflow.json remains at held-for-inline.
The exception propagates out of the session_start callback, so later runs are never read or queued.
flushIfIdle() (index.ts:993) is skipped — runs restored before the failure stay in the in-memory queue and are only flushed by a later trigger such as agent_settled.
Test coverage gap
result-delivery.test.ts covers successful held-inline restoration (:105-121) and receipt-persistence failure during flushing (:124-150), but not a restoration persistence failure midway through multiple persisted runs.
Suggested fix
Make restoration failure-isolated: wrap each run's restore() in try/catch, retain/enqueue the envelope for retry, continue reconciling the remaining runs, and always reach a final flushIfIdle().
Activity