Parent reports completion while a native subagent is still working

Aperta
#65,316 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
18/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
227k
Fork
30.7k
Merge medio
3h 57m
PR unite (30g)
484

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di anomalyco/opencode

Tutte le issue di anomalyco/opencode

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.