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

Closed
opened 2026-02-16 17:36:51 -05:00 by yindo · 7 comments
Owner

Originally created by @arsham on GitHub (Nov 8, 2025).

Originally assigned to: @thdxr on GitHub.

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

Originally created by @arsham on GitHub (Nov 8, 2025). Originally assigned to: @thdxr on GitHub. ### 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: <img width="2560" height="1110" alt="Image" src="https://github.com/user-attachments/assets/8e65cf58-69d6-4904-9aef-5bf97431efbf" /> The view for the sub-agent: <img width="2592" height="1854" alt="Image" src="https://github.com/user-attachments/assets/08e22b04-1e08-4e31-8d46-589a8947f546" /> ### Operating System Arch Linux ### Terminal foot
yindo added the opentuibug labels 2026-02-16 17:36:51 -05:00
yindo closed this issue 2026-02-16 17:36:51 -05:00
Author
Owner

@rekram1-node commented on GitHub (Nov 8, 2025):

we will fix

@rekram1-node commented on GitHub (Nov 8, 2025): we will fix
Author
Owner

@jgordijn-ah commented on GitHub (Nov 18, 2025):

Any progress on this?

@jgordijn-ah commented on GitHub (Nov 18, 2025): Any progress on this?
Author
Owner

@rekram1-node commented on GitHub (Nov 18, 2025):

Yeah ill fix it today but github is down haha

@rekram1-node commented on GitHub (Nov 18, 2025): Yeah ill fix it today but github is down haha
Author
Owner

@rekram1-node commented on GitHub (Nov 20, 2025):

@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

@rekram1-node commented on GitHub (Nov 20, 2025): @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
Author
Owner

@arsham commented on GitHub (Nov 20, 2025):

Yes it works! Thanks!

@arsham commented on GitHub (Nov 20, 2025): Yes it works! Thanks!
Author
Owner

@arsham commented on GitHub (Nov 20, 2025):

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 8ab206b4 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

@arsham commented on GitHub (Nov 20, 2025): 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 8ab206b4 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
Author
Owner

@rekram1-node commented on GitHub (Nov 21, 2025):

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

@rekram1-node commented on GitHub (Nov 21, 2025): @arsham [fixed that](https://github.com/sst/opencode/commit/adbb6037aca2f2c7edd839ea7a121da5bc514873) shortly after, any new release should have the fix
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2694