-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Labels
good first issueGood for newcomersGood for newcomersopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui
Description
Description
When switching to a subagent view by clicking on a delegated subagent in the right-hand panel, the text input box remains active and accepts user input. However, the primary agent (as selected by the 'tab' key) responds within the subagent's view instead of the subagent itself.
This creates two critical issues:
- Unexpected interaction behavior: Users expect to engage with the subagent when typing in a subagent view, but the primary agent responds instead, making it unclear which agent's context is being used
- Inaccessible subagent views: When the primary agent delegates a new task while in a subagent's view, the newly created subagent view becomes completely inaccessible
This prevents proper debugging of subagent behavior and makes it impossible to review their tool calls, responses, or interact with them directly in complex agent workflows.
OpenCode version
v1.0.67 (issue likely persists in v1.0.68)
Steps to reproduce
- Start an OpenCode session with the primary agent
- Have the primary agent delegate a task to a subagent (e.g., using the task tool)
- Click on the subagent entry in the right-hand panel to switch to its view
- Type a message in the text input box while viewing the subagent
- Observe that the primary agent responds in the subagent's view instead of the subagent
- While still in the subagent view, have the primary agent delegate another task
- Observe that the newly created subagent view is now inaccessible
Expected behavior
- When viewing a subagent, user input should engage with that specific subagent
- OR the text input should be disabled/hidden when viewing a subagent to prevent confusion
- All delegated subagent views should remain accessible regardless of which view the delegation occurred from
- Clear visual indication of which agent is currently active for user input
Actual behavior
- Primary agent responds in the subagent's view
- Unclear which agent's context receives user messages
- Newly delegated subagent views become inaccessible when delegation happens from within another subagent's view
Screenshot and/or share link
[Will be provided if requested - issue is reproducible with any agent workflow involving subagent delegation]
Operating System
macOS 26.1 (arm64, nix-darwin)
Terminal
Ghostty v1.1.2
Additional context
- It's unclear whether messages sent while viewing a subagent are added to the primary agent's context or handled separately
- This may be related to issue opentui: fatal: undefined is not an object (evaluating 'lines().length') #4372 which involves fatal errors when working with subagents
- Also potentially related to Sub-agent's request for permission is not shown in the primary agent's view #4078 (subagent permission requests not visible) and ctrl-left/right doesn't navigate between subagents since 1.0 TUI - TUI captures left and right? #4180 (navigation between subagents)
- The issue affects the ability to debug and monitor subagent workflows effectively
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui