# feat\(mcp\): expose existing queued message commands · PR \#10555 · pingdotgg/t3code

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

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

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: agents/mcp-thin/queue

Target branch: agents/mcp-thin/thread-organization

Head commit: 0a74c9341cb5342e0e5f1d5697eebc5a7dc95a7e

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

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

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

## Description

---

Part 5/16 of the [shared-core and MCP stack](https://github.com/pingdotgg/t3code/stacks/10582). Based on [#10554](https://github.com/pingdotgg/t3code/pull/10554). Next: [#10556](https://github.com/pingdotgg/t3code/pull/10556).

Expose queued message list/read/edit/cancel/reorder/promote through ThreadManagementService and the existing queue commands.

Output text is bounded by Unicode code points. Paging is a live offset. Queue ordering, dispatch and replay semantics remain in the existing services.

MCP-only rebuild of [#8699](https://github.com/pingdotgg/t3code/pull/8699), preserving attribution to Julius Marminge's original work. Original branches remain available for separate service follow-ups.

Validation: The composed stack passes 94 tests across 12 focused files, including shared core MCP and real MCP/V2 integration, attachment intake, project RPC/service contracts, and client model command selection. Server/contracts/shared/client-runtime typechecks and targeted format/lint/diff checks pass. New behavior coverage lives with the shared operation; no per-tool mock suite was added. Current-head CI is shown below.

Layer size: 6 files, +191/-6. No domain-service production implementation or documentation files change in this MCP layer.

Prepared with Codex in the OpenAI agent runtime.

<!-- Macroscope's pull request summary starts here -->
<!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. -->
<!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. -->
> [!NOTE]
> ### Expose six queued-message MCP tools in `ThreadToolkit`
> - Adds `t3_queue_list`, `t3_queue_read`, `t3_queue_edit`, `t3_queue_cancel`, `t3_queue_reorder`, and `t3_queue_promote_to_steer` MCP tools for managing queued thread runs
> - List entries cap message text at 1,000 characters; direct reads cap at 16,000 characters, both using Unicode-code-point counting via `Array.from`
> - Mutation handlers dispatch existing orchestration commands through a shared dispatch helper that maps failures to the unavailable MCP error
> - Registers `t3_queue_list` and `t3_queue_read` in `CLAUDE_READ_ONLY_T3_MCP_ALLOWED_TOOLS` and adds display names in the shared presentation registry
> - Risk: `queueEntry` helper in [handlers.ts](https://github.com/pingdotgg/t3code/pull/10555/files#diff-c86137ad202b428627265a1cfb74fbaed2f5df4c5edd2ecc9289bf94241146bf) returns `undefined` for non-queued or unmatched runs, causing `t3_queue_read` to return `invalid_request` — callers passing a run ID that is not currently queued will see this failure
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 0a74c93.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- Macroscope's pull request summary ends here -->
