# fix\(server\): expose and resume held MCP thread queues · PR \#23897 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/23897)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: open

Source repository: pingdotgg/t3code

Source branch: fix/mcp-queue-hold

Target branch: main

Head commit: 4068bcd4386d030b3661b11953f7fd0bb1a6b994

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/23897)

[Commits](https://git.cafe/pingdotgg/t3code/pull/23897/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/23897/diffs?format=markdown)

## Description

---

When a run fails and a queued run targets the same provider instance, the V2 orchestrator holds the thread's queue (`queueHeld`) until a user message from a web/mobile client or the UI's `queue.resume` command releases it. An MCP orchestrator could neither see that hold (`t3_queue_list` returned only `queuedRunId`/`text`/`truncated`) nor clear it (no resume tool), so a dispatcher thread driven only by scheduled tasks, webhooks and `t3_thread_send` sat with 24 queued runs stuck for 8 hours. `t3_queue_list` now returns a thread-level `held` flag plus `held` per item, with a description that says a held queue will not start on its own, and the new `t3_queue_resume` tool dispatches the existing `queue.resume` command through the same `writesThread` mode/permission checks as `t3_queue_cancel`, returning `{ released }` and surfacing the orchestrator's "Continue the limited thread before resuming its queue." rejection as a tool error. The tool is registered in `t3McpToolPresentation` (new `queue-resume` summary action) so clients label it like the other queue tools. Tested with a new `apps/server/src/mcp/toolkits/thread/handlers.test.ts` against a real orchestrator: the list shows `held: true` after a hold, resume clears it and the next queued run moves to `starting`, and resume on a usage-limited thread returns the rejection; `vp test run` on that file plus `core.test.ts` and `t3McpToolPresentation.test.ts` passes (19 tests), and `tsc --noEmit` passes for `apps/server`, `packages/shared` and `packages/client-runtime`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

