| … | … | @@ -248,6 +249,134 @@ export function subagentResultForRun( | |
| 293 | + | owners.set(run.id, undefined); | |
| 294 | + | let owner = run.delegatedTaskId; | |
| 295 | + | if ( | |
| 296 | + | owner === undefined && | |
🟠 High server/subagentProjection.ts:296
The spawning follow-up can report result_available with its stale reply while the steered receiving turn is still running. Because the recipient has a delegatedTaskId, ownerOf skips the wokenInRun ancestry and assigns that run only to the receiving follow-up; preserve the spawning task’s dependency/result association as well as the explicit tag.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @packages/provider-core/src/server/subagentProjection.ts around line 296: |
| 2 | |
| 3 | The spawning follow-up can report `result_available` with its stale reply while the steered receiving turn is still running. Because the recipient has a `delegatedTaskId`, `ownerOf` skips the `wokenInRun` ancestry and assigns that run only to the receiving follow-up; preserve the spawning task’s dependency/result association as well as the explicit tag. |