Skip to content

Commit da59ab3

Browse files
committed
docs(ai-chat): clarify beforeBoot bubbles while onRecoveryBoot body is caught
1 parent 445f422 commit da59ab3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docs/ai-chat/patterns/recovery-boot.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ If your agent registers [`hydrateMessages`](/ai-chat/lifecycle-hooks#hydratemess
212212

213213
### Hooks throwing
214214

215-
If `onRecoveryBoot` throws, the runtime logs a warning and falls back to the smart default. The run does not fail. Customers who want stricter error handling should try/catch internally.
215+
If the body of `onRecoveryBoot` throws (or rejects), the runtime logs a warning and falls back to the smart default — the run does not fail. Wrap your own try/catch if you want stricter handling.
216+
217+
`beforeBoot` is the exception: it's the contract you opted into for blocking persistence, so errors thrown there **bubble** and fail the run rather than dispatch recovered turns against half-persisted state. Wrap it yourself if you want to soft-fail.
216218

217219
## See also
218220

0 commit comments

Comments
 (0)