Parent reports completion while a native subagent is still working
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 18/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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
- Use a global
AGENTS.mdthat delegates bounded work to native subagents, assigns non-overlapping files, and makes the parent responsible for reviewing results and final verification. My configuration definescode-fixer,designer,fast-generic,oracle, andrepo-scout. The affected turn used onlycode-fixerin a fresh child session. My rules call for fresh sessions for independent tasks and reuse only for follow-ups to the same task. - 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.
- 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.
- 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.
- 主要语言
- TypeScript
- 星标
- 227k
- 派生
- 30.7k
- 平均合并
- 3 小时 57 分钟
- 30 天内合并 PR
- 484
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode 的其他 Issue
-
[Site] Active section detection should respect scroll-margin-top可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area/web reproduced type/bug
难度 2/5 1-3 小时 新手友好度 65/100
anomalyco/opencode#65384 · 1 条评论 ·
维护者通常 1 天内回复
-
area/cli type/feature version/v2
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/opencode#65379 · 1 条评论 ·
维护者通常 1 天内回复
-
Shell tool: no upper bound on the timeout a model can ask for, so one call can hold a turn for hours未关闭area/core platform/linux type/feature version/v2
难度 2/5 1-3 小时 新手友好度 75/100
anomalyco/opencode#65254 · 1 条评论 ·
维护者通常 1 天内回复
-
inference/go type/feature
难度 1/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#65148 · 1 条评论 ·
维护者通常 1 天内回复
-
area/providers type/feature version/v2
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/opencode#64845 · 1 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode 的全部 Issue
相似的 Issue
-
[Provider] antigravity-acp catalog omits gemini-4-hydrogen and gemini-4-neon that agy acp offers可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭catalog provider provider-compatibility
难度 2/5 1-3 小时 新手友好度 62/100
lidge-jun/opencodex#9037 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 62/100
slavakurilyak/awesome-ai-agents#1005 ·
-
kind/bug triage/unresolved
难度 2/5 1-3 小时 新手友好度 60/100
维护者通常 1 天内回复
-
effort:S P3 refactor
难度 2/5 1-3 小时 新手友好度 72/100
nightscout/nocturne#3735 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
wpilibsuite/systemcore-blocks-interface#641 ·
维护者通常 2 天内回复