Repository navigation
[Bug]: Session hung forever after spawning subagents #2778
Description
Activity
- addedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.Issue needs maintainer review and initial categorization.
on May 21, 2026 Fresh reproduction of this failure on a current build, without a pending permission prompt.
Environment:
- T3 Code
0.0.34-nightly.20260826.1188 - Linux x64
- Background systemd web service
- app.t3.codes paired to localhost on the same machine
- OpenCode
1.18.21 - OpenCode model
opencode/x-preview-f-free
Observed timeline (UTC):
03:11:56— parent turn started03:15:25— one child/subagent session was created03:19:32— child session received its final update- Parent and child then remained
busyindefinitely - A follow-up message submitted at
04:23:17remained pending behind the active turn
Evidence:
- OpenCode
/session/statusreported exactly two busy sessions: the affected parent and its child. - OpenCode
/permissionand/questionboth returned empty lists. - T3 Code had no pending approval records.
- The native provider stream contained
busystatuses and one retry, but noidleorsession.error. - The T3 server, OpenCode process, SSE connection, and local web endpoint remained alive.
- The user reported transient internet connectivity problems shortly before noticing the hang.
The current OpenCode adapter ignores events whose session ID differs from the parent session before processing them. It also completes the parent turn only after receiving
session.status = idle. There appears to be no timeout or reconciliation path when a child remains busy but stops producing events.This looks like the same overall failure as #2778, but it demonstrates that the child can wedge without an outstanding permission or question request.
Recovery was possible without database writes: terminating only the dedicated
opencode serveprocess caused T3 Code to mark the turn aserror, transition the session tostopped, clear the queued pending turn, and preserve the thread history.Triage performed by Codex (GPT-5.6-SOL).
- T3 Code
Before submitting
Area
apps/desktop
Steps to reproduce
~/some-other-location-outside-your-project/some-file.mdand create a summary". Note that the file must be outside of the current opened project on T3CodeExpected behavior
The sub agent should report back to the parent session without asking for any additional permissions during "Full access" mode
Actual behavior
Wait a few minutes and note that it will never complete the job or timeout after 300000ms
The parent thread gets hung after spawning an OpenCode subagent, but the real problem is that the child session is waiting on an
external_directorypermission prompt that never surfaces in the T3 Code UI.In my case:
ses_1b3d21dc0ffeG71m1u2qNoSXlZses_1b3d19f6fffeIxa5icm1pIrpgtThe parent looked idle, but OpenCode logs showed the child explorer session emitted multiple
permission.askedevents and never received a replyImpact
Major degradation or frequent failure
Version or commit
0.0.25-nightly.20260515.295
Environment
macOS 26.5 + Opencode 1.15.7
Logs or stack traces
Screenshots, recordings, or supporting files
No response
Workaround
Add the files that the agent has to access inside the same project so it can see them