Repository navigation
Commit ac7bb5f
committed
fix(server): a follow-up delegated task waits for the subagents its child starts
A t3_thread_send follow-up settled as soon as its own tagged run ended, so
the parent got the child's interim reply while a subagent the child started
in that turn was still running. The server's wake for that subagent ran
untagged, so the child's final reply never reached the parent.
A follow-up's runs now include the untagged delegatedCompletion wakes for
subagents its runs started. It stays open while those subagents or their
deliveries are pending, and settles with the last of its runs. Finalization,
delegatedTaskResultPending and task_status share this attribution.
Fixes #21837
AI-assisted; verified with the tests and tools listed above.1 parent ccbcfc4 commit ac7bb5f
4 files changed
Lines changed: 93 additions & 27 deletions
File tree
- apps/server/src
- mcp
- orchestration-v2
- packages/provider-core/src/server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| |||
1501 | 1506 | | |
1502 | 1507 | | |
1503 | 1508 | | |
| 1509 | + | |
| 1510 | + | |
1504 | 1511 | | |
1505 | | - | |
1506 | | - | |
1507 | | - | |
| 1512 | + | |
1508 | 1513 | | |
1509 | | - | |
1510 | | - | |
1511 | | - | |
1512 | | - | |
1513 | | - | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
1514 | 1521 | | |
1515 | 1522 | | |
1516 | 1523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
129 | 130 | | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
| |||
13509 | 13511 | | |
13510 | 13512 | | |
13511 | 13513 | | |
13512 | | - | |
| 13514 | + | |
13513 | 13515 | | |
13514 | 13516 | | |
13515 | 13517 | | |
13516 | 13518 | | |
13517 | 13519 | | |
13518 | | - | |
| 13520 | + | |
13519 | 13521 | | |
13520 | 13522 | | |
13521 | 13523 | | |
| |||
13575 | 13577 | | |
13576 | 13578 | | |
13577 | 13579 | | |
| 13580 | + | |
| 13581 | + | |
13578 | 13582 | | |
13579 | 13583 | | |
13580 | 13584 | | |
| |||
15136 | 15140 | | |
15137 | 15141 | | |
15138 | 15142 | | |
15139 | | - | |
15140 | | - | |
15141 | | - | |
| 15143 | + | |
| 15144 | + | |
| 15145 | + | |
| 15146 | + | |
| 15147 | + | |
| 15148 | + | |
| 15149 | + | |
| 15150 | + | |
15142 | 15151 | | |
15143 | 15152 | | |
15144 | 15153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
190 | 238 | | |
191 | 239 | | |
192 | 240 | | |
193 | | - | |
194 | 241 | | |
195 | | - | |
196 | | - | |
197 | | - | |
| 242 | + | |
198 | 243 | | |
199 | 244 | | |
200 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
251 | 264 | | |
252 | 265 | | |
253 | 266 | | |
| |||
274 | 287 | | |
275 | 288 | | |
276 | 289 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
| 290 | + | |
286 | 291 | | |
287 | 292 | | |
288 | 293 | | |
| |||
0 commit comments