Commit 2aa245e
committed
fix(tui): display error message when subagent crashes
Previously when a subagent task crashed or failed, it was immediately
removed from the UI without displaying what error occurred. This made
debugging very difficult as users could see the task disappear but had
no information about what went wrong.
Changes:
- Add error_message field to SubagentTaskDisplay to store the error
- Update ToolEvent::Failed handler to set the error message and keep
the failed subagent visible instead of immediately removing it
- Update render_subagent to display the error message in red when
status is Failed
- Failed subagents are still cleaned up on the next conversation turn
via clear_tool_calls which retains only non-terminal subagents1 parent 039cd2a commit 2aa245e
File tree
3 files changed
+48
-6
lines changed- cortex-tui/src
- runner
- views
3 files changed
+48
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
275 | 278 | | |
276 | 279 | | |
277 | 280 | | |
| |||
294 | 297 | | |
295 | 298 | | |
296 | 299 | | |
| 300 | + | |
297 | 301 | | |
298 | 302 | | |
299 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3419 | 3419 | | |
3420 | 3420 | | |
3421 | 3421 | | |
3422 | | - | |
| 3422 | + | |
| 3423 | + | |
3423 | 3424 | | |
3424 | 3425 | | |
3425 | | - | |
3426 | | - | |
3427 | | - | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
3428 | 3439 | | |
3429 | 3440 | | |
3430 | 3441 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
416 | | - | |
417 | | - | |
| 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 | + | |
418 | 445 | | |
419 | 446 | | |
420 | 447 | | |
| |||
0 commit comments