Skip to content

Sub-agent's request for permission is not shown in the primary agent's view #4078

Closed

Description

@arsham

Description

After delegating to a sub-agent, if the subagent requires user's permission on a tool, the permission is not shown and the user is not informed. You need to manually navigate to all subagents to check if they need any permissions.

OpenCode version

v1.0.45

Steps to reproduce

  1. Set the permissions to "ask"
  2. Ask the primary agent to delegate to a subagent and target the tool. For example: get the list of files in the home directory using bash tool.
  3. Wait and observe nothing is happening
  4. Navigate to the sub-agent's view to see the permission

Screenshot and/or share link

Primary agent's view, as you can see there are no indications of a sub-agent waiting:

Image

The view for the sub-agent:

Image

Operating System

Arch Linux

Terminal

foot

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 8, 2025
  2. rekram1-node commented on Nov 8, 2025

    @rekram1-node
    Collaborator

    we will fix

  3. self-assigned this
    on Nov 8, 2025
  4. assigned and unassigned on Nov 12, 2025
  5. jgordijn-ah commented on Nov 18, 2025

    @jgordijn-ah

    Any progress on this?

  6. rekram1-node commented on Nov 18, 2025

    @rekram1-node
    Collaborator

    Yeah ill fix it today but github is down haha

  7. rekram1-node commented on Nov 20, 2025

    @rekram1-node
    Collaborator

    @arsham @jgordijn-ah I made a fix for this for time being, if the subagent is asking permission the view will automatically navigate to the child session.'

    This was the easiest fix I wanted to do a dialog but realized that i'd need to handle diff views and a bunch of other stuff

  8. arsham commented on Nov 20, 2025

    @arsham
    Author

    Yes it works! Thanks!

  9. arsham commented on Nov 21, 2025

    @arsham
    Author

    I've traced the TypeError: undefined is not an object (evaluating 'currentSession.id') bug to its source. Here's what I found:

    In packages/opencode/src/cli/cmd/tui/routes/session/index.tsx (line 155) where the code attempts to access currentSession.id without checking if currentSession is undefined.

    This was introduced in 8ab206b by adding the createEffect block.

    Possibly during component mount, the async session sync operation hasn't completed yet, so sync.session.get(route.sessionID) returns undefined.

    This is the error I'm seeing:

    TypeError: undefined is not an object (evaluating 'currentSession.id')
        at <anonymous> (src/cli/cmd/tui/routes/session/index.tsx:116:64)
        at find (native:1:11)
        at <anonymous> (src/cli/cmd/tui/routes/session/index.tsx:116:39)
        at runComputation (../../node_modules/.bun/solid-js@1.9.9/node_modules/solid-js/dist/dev.js:742:22)
        at updateComputation (../../node_modules/.bun/solid-js@1.9.9/node_modules/solid-js/dist/dev.js:724:3)
        at runTop (../../node_modules/.bun/solid-js@1.9.9/node_modules/solid-js/dist/dev.js:833:7)
        at runUserEffects (../../node_modules/.bun/solid-js@1.9.9/node_modules/solid-js/dist/dev.js:943:36)
        at runUpdates (../../node_modules/.bun/solid-js@1.9.9/node_modules/solid-js/dist/dev.js:849:17)
        at completeUpdates (../../node_modules/.bun/solid-js@1.9.9/node_modules/solid-js/dist/dev.js:900:17)
        at runUpdates (../../node_modules/.bun/solid-js@1.9.9/node_modules/solid-js/dist/dev.js:850:5)
    

    @rekram1-node

  10. rekram1-node commented on Nov 21, 2025

    @rekram1-node
    Collaborator

    @arsham fixed that shortly after, any new release should have the fix

  11. added a commit that references this issue on Feb 18, 2026
    badbc64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions