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
[Bug]: t3_thread_read reports completed while background work still holds the thread #36609
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Start a thread whose agent launches a background subagent that holds completion.
Let the root turn finish while that child remains pending.
Read the parent through t3_thread_read (also used by peer agents and CLI thread show).
Compare the returned status with t3_thread_list and the sidebar.
Deterministic service repro: in the existing readThread preserves caller access case in apps/server/src/mcp/OrchestratorMcpService.activity.test.ts, complete the root run while leaving the pending subagent in the shell, then assert that readThread(...).thread.status is waiting. Run pnpm exec vp test run apps/server/src/mcp/OrchestratorMcpService.activity.test.ts -t 'preserves caller access'.
Expected behavior
The thread reads as waiting while completion-holding background work remains. An active root retains priority; unawaited commands and monitors do not hold completion, and failed roots remain visible as failed.
Actual behavior
The read reports completed even though the pending child remains visible in pendingBackgroundTasks. Listing and the sidebar correctly show waiting. This can mislead an orchestrating agent into treating unfinished work as complete; no data loss was observed.
Impact
Minor bug or occasional failure
Version or commit
Reproduced on pingdotgg/main at 35d01dc. Independently confirmed by Claude Opus 5.5 at d2bdd58.
Environment
Linux; public MCP service test with deterministic run and background-task fixtures. Provider-independent status calculation.
Logs or stack traces
Expected: "waiting"
Received: "completed"
Workaround
Inspect pendingBackgroundTasks or use t3_thread_list while background work remains.
Found by the maintainer bughunt (GPT 6.1 Sol), independently verified by Claude Opus 5.5. Related merged PR #34674 corrected listing only; thread read remained outside its scope. Live paired MCP calls against one isolated thread have not been captured.
Activity