Summary
Subagent sessions with a parent session should write a synthetic result message back into the parent when the child session finishes.
Foreground task tool calls are the exception: the parent already receives the subagent output in the tool result, so the child completion path should suppress the synthetic parent prompt while that foreground job is still owned by the task tool.
Context
Acceptance notes
- Background subagent completion wakes the parent with a synthetic
<task ...> result containing the child session id and final assistant text.
- Reprompted/background child sessions still notify from the child session completion path.
- Foreground subagent tool calls do not double-inject into the parent; they continue to return through the tool call result.
Summary
Subagent sessions with a parent session should write a synthetic result message back into the parent when the child session finishes.
Foreground
tasktool calls are the exception: the parent already receives the subagent output in the tool result, so the child completion path should suppress the synthetic parent prompt while that foreground job is still owned by the task tool.Context
Acceptance notes
<task ...>result containing the child session id and final assistant text.