Skip to content

fix(session): notify parent when subagent sessions finish #35066

Description

@opencode-agent

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions