Skip to content

[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

Backlog

Description

@maxim-kich

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

  1. From an orchestrating agent thread, call t3_thread_launch with interactionMode: "plan" and runtimeMode: "full-access".
  2. Let the new thread propose a plan and go idle.
  3. Later, from the orchestrating thread, call t3_thread_send (mode auto) with a message such as "The plan is approved, please implement it."
  4. Watch the child thread start working.
  5. From the orchestrating thread, call t3_thread_read on the child, and t3_pending_request with action: "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_read keeps reporting interactionMode: "plan" and pendingRequestCount: 1.
  • The child runs shell commands freely, but every file edit raises its own approval (activity item type approval_request, status waiting, one per file), although its runtime mode is Full access.
  • The orchestrating agent cannot help:
    • t3_pending_request does not list approvals and says it "cannot approve a permission request".
    • No MCP tool changes a thread's interaction mode: t3_thread_configure sets provider, model and options only ("Permission modes stay"), t3_thread_update only renames, and t3_thread_send has 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.sendToThread passes no interaction mode to threadManagement.sendToThread, so the thread keeps its stored plan.
  • In ClaudeAdapterV2.ts, permissionModeForClaudeRuntimePolicy returns "plan" whenever interactionMode === "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.

  1. Make an agent's t3_thread_send to an idle plan thread move it to build mode, like a user message does, or add an interactionMode field to t3_thread_send or t3_thread_configure. Limit it to modes not broader than the caller's, as the existing mode checks already do.
  2. Or let a caller with at least the child's runtime mode answer the child's permission requests through t3_pending_request (related: [Bug]: An MCP client can't decline a pending approval on a thread it launched, so unattended runs hang #39166, closed as a feature request).
  3. Show in the UI and in t3_thread_read that 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions