anomalyco / anomalyco/opencode
subagent questions lose their context in the root session
@jlongster is already working on this.
Since Jul 30, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
opencode2
This must be fixed in opencode2, even if it is not backported to v1.
When a subagent calls question, the root session renders only the interactive prompt. The findings or reasoning that made the question necessary remain in the subagent session. As a result, the user is asked to choose without the information needed to answer, especially when several subagents are active.
Expected behavior for v2:
questioncan carry a short contextual preface supplied by the caller.- The root session renders that preface as normal session output immediately before the interactive question.
- The preface remains in the root transcript so the question is still understandable after it is answered.
Example:
dependency-review
package.jsonrequests v5, but the lockfile resolves v4.3. Updating the lockfile may change transitive dependencies.Question: Which source should be authoritative?
This issue is only about the human-facing context/presentation contract. Nested prompt routing and agent provenance are already tracked in #7654, #13715, and #39112. Agent-to-agent messaging is separate in #38963.
Plugins
No response
OpenCode version
1.18.7
Steps to reproduce
- Start a root session that launches one or more subagents.
- Have a subagent discover information that requires a user decision.
- Have the subagent call
question. - Observe that the root session receives the interactive question but not the subagent's supporting context as normal output.
- To answer safely, the user must open the child session or guess why the question was asked.
Screenshot and/or share link
No response
Operating System
macOS 26.2
Terminal
No response
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.