You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sub-agent's request for permission is not shown in the primary agent's view #4078
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
Set the permissions to "ask"
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.
Wait and observe nothing is happening
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:
@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
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)
Activity
rekram1-node commentedon Nov 8, 2025
we will fix
jgordijn-ah commentedon Nov 18, 2025
Any progress on this?
rekram1-node commentedon Nov 18, 2025
Yeah ill fix it today but github is down haha
rekram1-node commentedon 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
arsham commentedon Nov 20, 2025
Yes it works! Thanks!
arsham commentedon Nov 21, 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 accesscurrentSession.idwithout checking ifcurrentSessionisundefined.This was introduced in 8ab206b by adding the
createEffectblock.Possibly during component mount, the async session sync operation hasn't completed yet, so
sync.session.get(route.sessionID)returnsundefined.This is the error I'm seeing:
@rekram1-node
rekram1-node commentedon Nov 21, 2025
@arsham fixed that shortly after, any new release should have the fix
fix: bubble sub-agent permissions to root session view