Repository navigation
Commit 3450410
committed
fix: preserve context after interrupts and propagate subagent interruption state
This commit addresses two critical interruption handling issues:
1. Context preservation after interruption (fixes anomalyco#2554):
- Messages with AbortedError are preserved in context (already in prompt.ts)
- filterSummarized() ignores errored summaries (message-v2.ts)
- prune() ignores errored summaries when checking compaction (index.ts)
2. Subagent interruption propagation:
- Task tool now checks result.info.error after subagent execution
- Throws error when subagent was interrupted or errored
- Includes partial output from interrupted subagents in error message
- Parent agents correctly detect when delegated tasks are interrupted
This ensures the model remembers work done before interruption and parent agents properly handle interrupted subagent tasks.1 parent d947df3 commit 3450410
3 files changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
| 304 | + | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | | - | |
| 572 | + | |
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
78 | 91 | | |
79 | 92 | | |
80 | 93 | | |
81 | 94 | | |
82 | 95 | | |
83 | | - | |
| 96 | + | |
84 | 97 | | |
85 | 98 | | |
86 | 99 | | |
| |||
0 commit comments