Commit 571dfe8
fix(agentex): recheck task status on keepalive to catch lost terminal events
Pure event-driven termination can't recover if a terminal transition's
task_updated publish fails (the DB flips terminal but the event never lands,
and the errors are logged-and-suppressed). On each keepalive interval, re-read
the task status and end the stream if it is terminal — an authoritative
backstop for a dropped event. Status-only, so it never closes a live task on a
reclaimed key.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent a62cdeb commit 571dfe8
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
168 | 175 | | |
169 | 176 | | |
170 | 177 | | |
| |||
0 commit comments