Skip to content

Clicking on subagent labels in TUI does not navigate to subagent session #20184

Closed as not planned

Description

@altendky

Description

After commit c5442d4 ("refactor(session): effectify SessionPrompt service"), clicking on subagent labels in the TUI no longer navigates to the subagent session view. Clicking does nothing.

The TUI click handler checks props.metadata.sessionId and only navigates if it's truthy. The sessionId is set via ctx.metadata() during task tool execution, but this metadata is being silently dropped due to a race condition in the new queue-based LLM layer.

Plugins

None

OpenCode version

dev branch, after c5442d4

Steps to reproduce

  1. Start opencode TUI
  2. Prompt: "launch 3 subagents each sleeping for 60 seconds"
  3. While subagents are running, click on any subagent label
  4. Expected: navigate to subagent session view
  5. Actual: nothing happens

Screenshot and/or share link

N/A

Operating System

Linux (reproduced on Ubuntu)

Terminal

Ghostty


Bisect result: Regression introduced by c5442d4

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 31, 2026
  2. github-actions commented on Mar 31, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of or closely related to existing issues. Please check:

    If the fix from #15769 was inadvertently reverted or broken by c5442d418, it may be worth referencing those issues for context.

  3. rmk40 commented on Mar 31, 2026

    @rmk40
    Contributor

    Opened #20187 as a fix. The root cause is that ctx.metadata() fires while the part is still pending, and the processor's tool-call handler overwrites it with a fresh state. Fix uses a synchronous side-channel on the processor context to buffer metadata until the tool-call handler can merge it.

  4. rmk40 commented on Mar 31, 2026

    @rmk40
    Contributor

    Fix + E2E regression test: #20198 (supersedes #20187)

  5. rmk40 commented on Mar 31, 2026

    @rmk40
    Contributor

    Submitting as two PRs so the test infrastructure is reviewed separately from the bug fix:

    Merge #20208 first, then #20210.

  6. added a commit that references this issue on Mar 31, 2026
    eb71403
  7. Femumme commented on Mar 31, 2026

    @Femumme

    The same issue applies in the Web UI - clicking on subagents is not possible as long as they are running

  8. altendky commented on Mar 31, 2026

    @altendky
    ContributorAuthor

    @rmk40 has certainly made it further into this than i did. i'll close this for now presuming their work will be seen through. thanks!

  9. altendky commented on Mar 31, 2026

    @altendky
    ContributorAuthor

    uhm... this is the issue, not the pr. sorry, i'll go close my pr now...

  10. rmk40 commented on Mar 31, 2026

    @rmk40
    Contributor

    The same issue applies in the Web UI - clicking on subagents is not possible as long as they are running

    I hadn't checked but yes there's nothing TUI specific about this bug.

    Also, guessing everyone checking this bug is using some variation of the now-obsoleted Anthropic oauth plugin. The bug is when using @ai-sdk/anthropic directly, which is why it doesn't happen via Zen or other proxies.

  11. Femumme commented on Mar 31, 2026

    @Femumme

    Also, guessing everyone checking this bug is using some variation of the now-obsoleted Anthropic oauth plugin

    Actually, I'm experiencing this with GitHub Copilot.

  12. Navaneeth-Sharma commented on Mar 31, 2026

    @Navaneeth-Sharma

    same @Femumme , I'm also experiencing this with GitHub Copilot.

  13. nabilfreeman commented on Apr 11, 2026

    @nabilfreeman
    Contributor

    Confirmed on my side that this is working again in OpenCode 1.4.0 installed via Homebrew. In the TUI I can click into subagents again.

  14. nabilfreeman commented on Apr 11, 2026

    @nabilfreeman
    Contributor

    From looking through the 1.4.0 code changes, this does not appear to have been fixed by merging the original bugfix PR. The click-navigation code itself changed very little, but the TUI worker/session event-stream plumbing was refactored substantially in 1.4.0, so it looks more likely that this started working again as a side effect of those broader changes.

  15. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  16. github-actions commented on Jul 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions