Repository navigation
Commit 370eaba
fix(session): recover orphaned assistant messages on startup (#59)
When the server crashes or restarts while a session is actively
executing tool calls, in-memory session state is lost but the database
retains stale incomplete messages. This leaves sessions permanently
stuck in a 'Thinking' state with no way to recover.
Add Session.recover() that runs during InstanceBootstrap to:
- find assistant messages with no time.completed
- force running/pending tool parts to error status
- mark orphaned messages as completed
- emit bus events so connected frontends update
Closes anomalyco#19023
Co-authored-by: engineer <[email protected]>1 parent 3e8d555 commit 370eaba
1 file changed
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
0 commit comments