Input prompt hidden when attaching to child/subagent session #4203

Closed
opened 2026-02-16 17:43:00 -05:00 by yindo · 5 comments
Owner

Originally created by @rmk40 on GitHub (Jan 4, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

When attaching directly to a child session (subagent session) via CLI, the input prompt is not displayed. Users cannot type anything—including exit or :q—and must navigate to the parent session to exit.

Root cause: In the Permission rework (#6319), the Prompt component's visibility was changed to:

visible={!session()?.parentID && permissions().length === 0}

This intentionally hides the prompt when parentID exists (child sessions), but breaks direct interaction with subagent sessions.

Location: packages/opencode/src/cli/cmd/tui/routes/session/index.tsx:1028

OpenCode version

1.1.1 (regression from 1.0.223)

Steps to reproduce

  1. Start a session and trigger a subagent task
  2. Note the child session ID from the output
  3. Exit and run: opencode -s <child-session-id>
  4. No input prompt appears; cannot type or exit

Operating System

Any

Terminal

Any

Originally created by @rmk40 on GitHub (Jan 4, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When attaching directly to a child session (subagent session) via CLI, the input prompt is not displayed. Users cannot type anything—including `exit` or `:q`—and must navigate to the parent session to exit. **Root cause:** In the Permission rework (#6319), the Prompt component's visibility was changed to: ```tsx visible={!session()?.parentID && permissions().length === 0} ``` This intentionally hides the prompt when `parentID` exists (child sessions), but breaks direct interaction with subagent sessions. **Location:** `packages/opencode/src/cli/cmd/tui/routes/session/index.tsx:1028` ### OpenCode version 1.1.1 (regression from 1.0.223) ### Steps to reproduce 1. Start a session and trigger a subagent task 2. Note the child session ID from the output 3. Exit and run: `opencode -s <child-session-id>` 4. No input prompt appears; cannot type or exit ### Operating System Any ### Terminal Any
yindo added the opentui label 2026-02-16 17:43:00 -05:00
yindo closed this issue 2026-02-16 17:43:00 -05:00
Author
Owner

@rekram1-node commented on GitHub (Jan 4, 2026):

this was intentional change

@rekram1-node commented on GitHub (Jan 4, 2026): this was intentional change
Author
Owner

@rmk40 commented on GitHub (Jan 4, 2026):

Understood but shouldn't it at least be possible to exit?

@rmk40 commented on GitHub (Jan 4, 2026): Understood but shouldn't it at least be possible to exit?
Author
Owner

@rekram1-node commented on GitHub (Jan 4, 2026):

yes

@rekram1-node commented on GitHub (Jan 4, 2026): yes
Author
Owner

@rekram1-node commented on GitHub (Jan 4, 2026):

should fix

@rekram1-node commented on GitHub (Jan 4, 2026): should fix
Author
Owner

@gc-victor commented on GitHub (Jan 12, 2026):

this was intentional change

@rekram1-node, please, could you provide some light on the reasons for removing the prompt input in the subagents view? I was using it a lot, and I would like to understand the pros and cons. Thanks!

@gc-victor commented on GitHub (Jan 12, 2026): > this was intentional change @rekram1-node, please, could you provide some light on the reasons for removing the prompt input in the subagents view? I was using it a lot, and I would like to understand the pros and cons. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4203