Commit 2ef154a
committed
Fix TUI stuck in Working state after failed sub-agent transfer_task
When a child stream emitted an ErrorEvent, runSubSessionForwarding returned
immediately without reading remaining events. This caused StreamStoppedEvent
to never reach the TUI, leaking the streamDepth counter and leaving the UI
permanently stuck in the Working state.
Drain all remaining child events (including StreamStoppedEvent) before
returning on error, keeping streamDepth balanced.
Fixes #2255
Assisted-By: docker-agent1 parent 2021b77 commit 2ef154a
2 files changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
131 | 137 | | |
132 | 138 | | |
133 | 139 | | |
| |||
0 commit comments