GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(session): notify parent when subagent sessions finish · Issue #35066 · anomalyco/opencode

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

New issue
Copy link
New issue
Copy link
Closed
Closed
fix(session): notify parent when subagent sessions finish#35066
Copy link
Assignees
kitlangton

Description

@opencode-agent
opencode-agent
bot
opened on Jul 3, 2026
Issue body actions

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

  • Discord discussion: https://discord.com/channels/1391832426048651334/1522382096511930419
  • Draft implementation: fix(session): notify parent when subagents finish #35041
  • Target/tagging @kitlangton per request.

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.

Activity

  1. opencode-agent
    assigned
    kitlangton
    on Jul 3, 2026
  2. opencode-agent commented on Jul 3, 2026

    @opencode-agent
    opencode-agentBot
    on Jul 3, 2026 – with OpenCode Agent
    ContributorAuthor
    More actions

    @kitlangton tagging you here for the subagent parent-notification issue. Draft PR: #35041

  3. dreampuf
    added a commit that references this issue on Jul 20, 2026

    test(opencode): add regression test for lost terminal-iteration wakeup

    1391879
  4. EnigmaJazz commented on Aug 11, 2026

    @EnigmaJazz
    EnigmaJazz
    on Aug 11, 2026
    More actions

    Occurrence: headless serve — child completion never notifies the parent

    Observed today on opencode 1.18.15/1.18.16 headless opencode serve (Linux), driving an autonomous SDD workflow through the serve HTTP API:

    • 5/5 orchestrator sessions had a foreground task tool part stuck running forever while the child sub-agent session had already finished its work (its parts show complete reads/writes, batch-flushed). The child-completion notification never reached the parent, so the parent turn never resumed.
    • The same binary/providers/network in interactive TUI sessions: 226 task parts across all sessions — 132 completed + 89 errored + 5 running — i.e. 96%+ resolve. The TUI receives the completion; the headless serve does not.
    • The stuck-parent signature appears to ride on a tool-completion envelope drop: in a controlled probe on a freshly-recycled serve, one session ran read/glob/bash — glob and bash flipped to completed with output present, the read stayed running with no output for 300s until the caller aborted. Work completes; the completion envelope selectively never lands; the turn stalls.
    • Recovery on our side works by artifact-checking the child work from disk (the work is done), but the parent session itself never completes — exactly the gap this issue addresses.

    This issue (and the draft PR #35041) would fix the class we are hitting at scale. Happy to add any of the probe details or raw part-state dumps if useful.

  5. NamedIdentity commented on Aug 27, 2026

    @NamedIdentity
    NamedIdentity
    on Aug 27, 2026
    More actions

    #45482 addresses this — a caller's Task call is now held until the children it started have settled, and an idle parent is woken so a late result is actually observed.

  6. neriousy commented on Oct 1, 2026

    @neriousy
    neriousy
    on Oct 1, 2026
    Member
    More actions

    In V2, when a subagent session finishes, its result is posted to the parent session as a <subagent ...> message with the final state, and an idle parent is resumed by default so it can act on the result.

    Wired up in #34320; delivery is shared since #46054.

    Closing as completed.

  7. neriousy
    closed this as completedon Oct 1, 2026
  8. Premik
    added a commit that references this issue on Oct 4, 2026

    fix(runner): queue work when already running instead of discarding

    4e78ca3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @kitlangton
    kitlangton

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.