Skip to content

subagent questions lose their context in the root session #39587

Description

@trin4ik

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:

  • question can 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.json requests 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

  1. Start a root session that launches one or more subagents.
  2. Have a subagent discover information that requires a user decision.
  3. Have the subagent call question.
  4. Observe that the root session receives the interactive question but not the subagent's supporting context as normal output.
  5. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions