[Bug]: An agent's t3_thread_send leaves a plan-mode thread in plan mode, so a Full access child asks to approve every file edit and no MCP tool can unblock it #43485
Before submitting#
- 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#
- From an orchestrating agent thread, call
t3_thread_launchwithinteractionMode: "plan"andruntimeMode: "full-access". - Let the new thread propose a plan and go idle.
- Later, from the orchestrating thread, call
t3_thread_send(modeauto) with a message such as "The plan is approved, please implement it." - Watch the child thread start working.
- From the orchestrating thread, call
t3_thread_readon the child, andt3_pending_requestwithaction: "list".
Expected behavior#
Per #33131 and the closing note on #29250, the next message on an agent-launched plan thread moves it to build mode. That should also hold when the message comes from an agent through t3_thread_send, or the caller should have some way to do it (see suggestions below). A Full access thread should then edit files without asking.
If a thread does stay in plan mode, it should be visible why a Full access thread is asking for approval, in the UI and in t3_thread_read.
Actual behavior#
- The child thread stays in plan mode.
t3_thread_readkeeps reportinginteractionMode: "plan"andpendingRequestCount: 1. - The child runs shell commands freely, but every file edit raises its own approval (activity item type
approval_request, statuswaiting, one per file), although its runtime mode is Full access. - The orchestrating agent cannot help:
t3_pending_requestdoes not list approvals and says it "cannot approve a permission request".- No MCP tool changes a thread's interaction mode:
t3_thread_configuresets provider, model and options only ("Permission modes stay"),t3_thread_updateonly renames, andt3_thread_sendhas no mode field.
- The user had to open the child thread and approve each edit by hand, one file at a time. Meanwhile the child worked around the prompts by editing files through shell commands.
From reading source on main (a95cb67), not verified by running it:
OrchestratorMcpService.sendToThreadpasses no interaction mode tothreadManagement.sendToThread, so the thread keeps its storedplan.- In
ClaudeAdapterV2.ts,permissionModeForClaudeRuntimePolicyreturns"plan"wheneverinteractionMode === "plan", before the Full access branches, which matches per-edit approvals under Full access. I did not confirm which provider the child thread used.
Suggestions#
Any of these would unblock this case. I know some of it may count as a feature request.
- Make an agent's
t3_thread_sendto an idle plan thread move it to build mode, like a user message does, or add aninteractionModefield tot3_thread_sendort3_thread_configure. Limit it to modes not broader than the caller's, as the existing mode checks already do. - Or let a caller with at least the child's runtime mode answer the child's permission requests through
t3_pending_request(related: #39166, closed as a feature request). - Show in the UI and in
t3_thread_readthat a Full access thread is asking because it is in plan mode, and list pending approvals there.
Impact#
Major degradation or frequent failure
Version or commit#
0.1.12-nightly.20261122.5085 (the server build running when this happened)
Environment#
Linux x64, T3 Code server/desktop. Seen in a private project. Provider of the child thread not recorded (unverified).
Workaround#
The user approves each file edit by hand in the child thread. The only alternative is to abandon the thread and its context and launch a new one in default mode.
Related issues#
- #29250 (closed): same plan-mode trap with per-edit approvals under Full access, reached from the app. Its fix (#33131) covers a user's next message, not
t3_thread_sendfrom an agent. - #27819: MCP
t3_thread_launchcan start plan-mode threads. - #23918: approvals in Claude Plan + Full access for MCP tool calls.
- #39166 (closed): an MCP client can't decline or approve a pending approval.
- #22925: parent not notified when a child waits on an approval.
tanstack-source added labelsbug
Sign in to join this conversation.