pingdotgg / pingdotgg/t3code

[Bug]: Session hung forever after spawning subagents

Open
#2,778 1 comment 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/desktop

Steps to reproduce
  1. Open a new T3Code session with Opencode provider and "Full access" mode
  2. Trigger a prompt like "Spawn a subagent to read the file ~/some-other-location-outside-your-project/some-file.md and create a summary". Note that the file must be outside of the current opened project on T3Code
Expected 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_directory permission prompt that never surfaces in the T3 Code UI.
In my case:

  • parent session: ses_1b3d21dc0ffeG71m1u2qNoSXlZ
  • child session: ses_1b3d19f6fffeIxa5icm1pIrpgt
    The parent looked idle, but OpenCode logs showed the child explorer session emitted multiple permission.asked events and never received a reply
Impact

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
OpenCode log evidence:
File:
~/.local/share/opencode/log/2026-05-21T214152.log

Relevant lines:

539: permission=external_directory ... action={"permission":"external_directory","pattern":"*","action":"ask"} evaluated
540: id=per_e4c7d26b30014G4qEQzoAFEVfa ... asking
541: bus type=permission.asked publishing


and later again:

853: permission=external_directory ... action={"permission":"external_directory","pattern":"*","action":"ask"} evaluated
854: id=per_e4c81d383001nBa06Q0YSUvuij ... asking
855: bus type=permission.asked publishing


No corresponding permission.replied event was surfaced in the UI.
Eventually the session was canceled:

860-861: session.prompt ... cancel
862: error=Aborted process
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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/desktop by tracing how OpenCode permission.asked events from a child session reach the UI and how replies are sent. Compare this flow with the events in ~/.local/share/opencode/log/2026-05-21T214152.log, especially the external_directory entries. Done means the permission prompt appears during Full access mode and the child reports back without leaving the parent session hung.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, typescript
Domain
authorization, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.