Parent reports completion while a native subagent is still working

Abierto
#65,316 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
18/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

This is a design-level issue about the native subagent lifecycle in the OpenCode TUI: a parent turn can finalize while a required child is still running, and the late child report triggers another assistant reply. Start by reading the agent/subagent orchestration and tool-lifecycle code in the TypeScript repository, then trace where a parent turn decides it is complete relative to pending child sessions. A fix likely needs a pending-work state or a native wait/join mechanism; done means a parent cannot commit and report completion while a required child is outstanding, and a late child report does not wake a finished parent.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area/core platform/macos type/feature version/v2
Description

In the OpenCode TUI, the parent committed its changes and sent a final “done” report while a native subagent was still working. The subagent later sent its first <subagent state="completed"> report, which woke the parent and resulted in a second assistant reply without another user prompt.

In the latest case, the parent assigned one new code-fixer session a test file and a syntax check. The parent owned implementation and final integration testing. They shared the workspace, so the parent could see the test file, run the full integration suite successfully, and commit before the child reported back. The child was still trying its own database test when the parent declared the work complete. Code edits were disjoint. Syntax checks and execution of the new cases overlapped.

I expect the parent to be able to yield while a required child runs, then review its report before committing or declaring the task complete. A pending-work state or a native wait/join option would make this reliable without polling and would still allow independent parent work in parallel.

Plugins

Oh My OpenCode Slim was disabled for this occurrence. The server config declares plugins: []. Local plugin files are present for Herdr agent state, Magpie model integration, and RTK. The CLI config enables the Herdr plugin. A run with all local plugins disabled is still pending.

OpenCode version

opencode v2.3.2 (V2 CLI/TUI). Parent model route magpie/auto/gpt-6.2-sol. Configured child route magpie/group/auto-deepseek-flash#high.

Steps to reproduce
  1. Use a global AGENTS.md that delegates bounded work to native subagents, assigns non-overlapping files, and makes the parent responsible for reviewing results and final verification. My configuration defines code-fixer, designer, fast-generic, oracle, and repo-scout. The affected turn used only code-fixer in a fresh child session. My rules call for fresh sessions for independent tasks and reuse only for follow-ups to the same task.
  2. Ask the parent to finish a change. Have it delegate a regression test and syntax check to the child while implementing the production change itself. The child writes its file and continues checking it.
  3. Let the parent run integration checks after the child's file appears. In the observed turn, the parent then committed and reported completion before the native child report arrived.
  4. Leave the session open without sending another prompt. Observe the late child report and the additional parent reply. Similar premature “done” reports have occurred repeatedly in my workflow. These steps describe the observed case, and I have not established a deterministic minimal reproduction.
Related reports

My earlier Slim report documented repeated replays of previously delivered results. The latest occurrence involved one late first delivery from the native tool. I would like to understand whether OpenCode can support waiting for required child results before a parent finalizes. This may involve model behavior as well as the native tool lifecycle. OMO Slim #1940 · OpenCode #63785 · OpenCode #64073

Operating System

macOS 13.3 (Darwin 22.4.0, x86_64).

Terminal

OpenCode TUI in Herdr, TERM=xterm-256color, COLORTERM=truecolor, /bin/zsh.

Lenguaje dominante
TypeScript
Estrellas
227k
Forks
30.7k
Merge medio
3 h 57 min
PR fusionados (30 d)
484

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de anomalyco/opencode

Todos los issues de anomalyco/opencode

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.