[Bug]: OpenCode provider background delegations leave the thread looking Settled while they are still running
Nobody has claimed this yet.
- 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/web
Steps to reproduce
- T3 Code desktop 0.0.31 (Alpha) on macOS, thread using the OpenCode provider (model
opencode-go/deepseek-v4.1-flash), Max Build, Full access, in a git worktree. - Ask the agent to run several investigations in parallel as background delegations (the harness delegation tool), and to reply as soon as they are dispatched. Example prompt: "Compare how Codex requests are handled in Synara, T3 Code and the official Codex CLI. Launch the three investigations in parallel in the background and tell me when they are dispatched."
- The foreground turn ends with an assistant message that explicitly says the three investigations are running and that it will follow up when results are ready, and the transcript folds to
Worked for 42s. - While the delegated work is still running, look at the sidebar: the thread is classified Settled (it appears under the "Settled (3)" group), the composer is idle, and there is no in-flight indicator or work row anywhere in the thread.
- When a delegation finishes, the thread wakes on its own with the result.
Expected behavior
- While any background delegation/task belonging to the thread is live, the thread remains visibly Working (sidebar pill and transcript), and settle logic does not classify it as finished.
- A durable indicator such as "Background task working" or "1 delegate active" should be visible, and should clear only when the outstanding work completes, fails, or is cancelled.
- The later continuation should be presented as an expected follow-up, not as a spontaneous wake on a thread that looked done.
Actual behavior
The thread is settled while the assistant has literally just said work continues in the background. The sidebar shows the thread under Settled, the transcript folds to Worked for 42s, and there is no signal anywhere that the three investigations are in flight. The only signal is the later spontaneous wake when a delegation completes.
This is the same class of problem reported for the desktop/web Claude-provider path in #5043 and for mobile in #4962, but on the OpenCode provider path. Per the review notes on #5219, task.* child events are currently emitted for Codex and Claude only, and OpenCode does not map collabAgent child task events. backgroundLiveness (the signal that keeps the sidebar pill on Working) is fed from that task lifecycle ingestion, so OpenCode background delegations have nothing to raise it and the thread settles until the next provider turn.
Impact
Major degradation or frequent failure — with background delegation you cannot tell working threads from finished ones, and the thread state flips by itself later.
Version or commit
0.0.31 (desktop, Alpha)
Environment
macOS 26.6.2 arm64; T3 Code desktop 0.0.31 (Alpha); OpenCode provider, model opencode-go/deepseek-v4.1-flash; Max Build; Full access; thread in a git worktree (t3code/compare-codex-request-handling).
Screenshots, recordings, or supporting files
Screenshot shows the assistant message listing the three parallel investigations and saying it will report back, with the transcript already folded to Worked for 42s and the sidebar showing the thread under "Settled (3)". I will attach the image right after opening this issue.
Workaround
None known in-app; the thread recovers on its own when the delegated work finishes.
Related
- #5043 (closed as not planned): same desktop/web symptom for the Claude provider delegating to a CLI child process.
- #4962 (mobile): "looks idle while background subagents are still working".
- #5479: Agents panel does not show CLI-delegated child agents.
- #5219: native subagent & workflow observability; review notes state that
task.*child events ship for Codex and Claude only and that OpenCode intentionally does not emit collabAgent child task events. If that omission is what keepsbackgroundLivenessempty on OpenCode threads, it is likely the causal path for this report.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/web by tracing backgroundLiveness and task.* child-event ingestion for OpenCode and collabAgent, comparing the OpenCode path with Codex and Claude as described in #5219. Reproduce the parallel delegation scenario and verify that the thread stays Working with a durable indicator until each background task completes, fails, or is cancelled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 54/100