# fix\(opencode\): retain queued native child continuation output · PR \#19388 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/19388)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: closed

Source repository: Unavailable fork

Source branch: fix/opencode-native-child-continuations

Target branch: main

Head commit: 2f388703d0bd7d5342c21d51f68fe5431d3f6d40

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/19388)

[Commits](https://git.cafe/pingdotgg/t3code/pull/19388/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/19388/diffs?format=markdown)

## Description

---

After an OpenCode root turn completes, ingestion can stop between a child subagent’s completion and its queued native continuation. That drops the continuation’s messages and terminal update.

OpenCode now emits ordered, deduplicated snapshots of pending continuation work. The execution service uses consumed snapshots to keep owned child streams open until that work drains, while retaining the ownership-loss rule for newer root work. Adapters without this metadata keep their existing thread-scoped fallback.

Fixes #19228. The issue’s maintainer triage identifies the missing adapter signal as the required fix.

Validation on Windows x64, Node 24.19.0:

- `vp test run --root apps/server src/orchestration-v2/RunExecutionService.test.ts src/orchestration-v2/Adapters/OpenCode2AdapterV2.test.ts`: 151 tests passed. Service regressions cover both retained and lost root ownership and verify that the child continuation’s running event, message, and completion all arrive. Adapter coverage checks queued-report snapshots.
- Server, provider-core, and provider-opencode package typechecks passed. Scoped lint, formatting, and `git diff --check` passed.
- Independent review checked event ordering, snapshot deduplication, stop propagation, and ownership release. A real OpenCode session was not exercised.

Implemented with GPT-6.1-Sol through the Codex harness in T3 Code.

