Commit f00c655
committed
fix(agents): release session write-lock immediately when holder PID is dead
When an agent run fails abnormally during tool execution, the session
write-lock remains held in memory. The watchdog's force-release threshold
inherited the full maxHoldMs (up to 17 minutes for a 15-minute agent
timeout), causing all subsequent requests to the same session to fail
with SessionWriteLockTimeoutError until the watchdog fires.
Fix: read the lock file payload during each watchdog check and release
the lock immediately if the holder PID is no longer alive, regardless
of maxHoldMs.
Fixes #1008721 parent 1ce0d4b commit f00c655
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
289 | 309 | | |
290 | 310 | | |
291 | 311 | | |
| |||
0 commit comments