anomalyco / anomalyco/opencode
Task tool can drop a completed subagent result after persistence
@nexxeln is already working on this.
Since Sep 12, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
When the Task tool invokes a subagent, the child can complete with finish: stop and persist a valid final JSON result, while the parent receives an empty or absent task result.
This differs from #38866 because there is no provider stream error, and from #37852 because the finish reason is not unknown. The child output exists and is complete; it is lost between child completion and parent delivery.
Expected: the parent receives the persisted subagent result.
Actual: the parent receives no usable result and treats the completed task as empty or malformed.
Plugins
A custom Task-based orchestration integration.
OpenCode version
1.18.30
Steps to reproduce
- Configure a subagent that returns a small valid JSON object.
- Invoke it through the
Tasktool from a parent session. - Observe that the child session completes with
finish: stop. - Confirm that the valid JSON result is persisted in the child session.
- Observe that the parent receives an empty or absent task result.
The failure is intermittent, but the distinguishing evidence is that child completion and persistence succeed without a stream error.
Screenshot and/or share link
Not available.
Operating System
Windows 11
Terminal
OpenCode Desktop
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.