Commit fdd67f5
committed
🤖 fix: register foreground task promise before startTask
Address Codex review comment: foreground tasks now register their
pending completion promise BEFORE calling startTask, ensuring that
if startTask fails early (e.g., sendMessage returns an error),
handleTaskFailure can find and reject the promise, preventing the
parent stream from hanging indefinitely.
Added test case to verify this behavior.
Change-Id: Ib83798e7f7602edbe291686c8936519c8703cb6a
Signed-off-by: Thomas Kosiewski <tk@coder.com>1 parent b76d389 commit fdd67f5
2 files changed
+62
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
409 | 459 | | |
410 | 460 | | |
411 | 461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
237 | 247 | | |
238 | 248 | | |
239 | 249 | | |
| |||
252 | 262 | | |
253 | 263 | | |
254 | 264 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 265 | + | |
| 266 | + | |
259 | 267 | | |
260 | 268 | | |
261 | 269 | | |
| |||
0 commit comments