Document dual-step best-effort run-store cleanup behavior

Co-authored-by: Eric Allam <eric@trigger.dev>
This commit is contained in:
Cursor Agent
2026-02-15 02:01:50 +00:00
parent 43205f7cad
commit aab79a08dc
3 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -623,7 +623,8 @@ optional `runId`, and the underlying `error` (non-Error throws are normalized to
instances).
Run-store cleanup is handled as best effort, and cleanup failures won't mask the original
transport failure that triggered `onError`.
transport failure that triggered `onError`. Cleanup still attempts both persistence steps
(`set` inactive state and `delete`) even when one step fails.
```ts
import type { TriggerChatRunState, TriggerChatRunStore } from "@trigger.dev/ai";
+1
View File
@@ -16,3 +16,4 @@
- Added phase-aware `onError` reporting across send, stream-subscribe, reconnect, and stream-consumption paths.
- Added normalization of non-Error throw values into Error instances before `onError` reporting.
- Added best-effort run-store cleanup so cleanup failures do not mask root transport errors.
- Improved best-effort run-store cleanup to attempt both inactive-state writes and deletes even if one step fails.
+2 -1
View File
@@ -141,7 +141,8 @@ The callback receives:
- `error`
Cleanup operations against custom `runStore` implementations are best-effort. If store cleanup
fails, the original transport error is still preserved and surfaced.
fails, the original transport error is still preserved and surfaced. The transport also attempts
both cleanup steps (`set` inactive state and `delete`) even if one of them fails.
## Reconnect semantics