Commit 1ce9552
fix(agentex): end SSE stream when the task row no longer exists
The periodic status recheck's get_task raises ItemDoesNotExist for a
hard-deleted task (e.g. retention cleanup). That was caught by the generic
handler and retried with backoff indefinitely, spinning error events and
holding SSE + DB connections until the client disconnected. Catch
ItemDoesNotExist specifically and end the stream — a vanished row is terminal.
Other exceptions still fall through to the transient retry path.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent e019c3b commit 1ce9552
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
171 | 180 | | |
172 | 181 | | |
173 | 182 | | |
| |||
0 commit comments