Repository navigation
Description
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 a Claude parent thread, run a
delegate_taskand let the child finish. - Call
t3_thread_sendon the child's thread id withmode: "steer"ormode: "restart". - Call
t3_thread_sendwithmode: "auto"and the child id written with literal colons,thread:delegated-task:command:mcp:..., where the stored id has the command id percent-encoded,thread:delegated-task:command%3Amcp%3A....
Expected behavior
The errors should tell the agent how to continue a finished child. The t3_thread_send description says a send to a finished child starts a fresh task, so the agent was one correct call away each time.
Actual behavior
- Step 2 returns
thread_not_sendable:Thread ... has no running turn that can be steered.(orrestarted). It doesn't say the child finished, and it doesn't mention thatmode: "auto"or"queue"would start a new task there. - Step 3 returns
thread_not_foundwith no hint.threadNotFoundinapps/server/src/mcp/threadAccess.tsalready suggests themcp:-prefixed id when an agent pastes a bare uuid. It doesn't try the encoded form of a delegated id.IdAllocatorbuilds that id withjoinId("thread", "delegated-task", commandId), whichencodeURIComponents the command id.
I audited ~170 Claude Code sessions in T3 Code on one project (Oct 18 to Nov 6, 2026) and found 13 of these failures in 4 sessions:
restarton a finished child. The agent wanted to move the child to another provider and continue it.steeron a finished child. The agent wanted to give the child a new base commit after it had finished.autowith the unencoded id, which gotthread_not_found.
The injected orchestration instructions say "Every new delegate review or re-check is a new delegate_task ..., never a t3_thread_send." Agents still reach for t3_thread_send when they want to keep a child's context. The tool description invites that by documenting sends to finished children. #28734 covers a related gap in that rule for interrupted children.
Suggested fix
- When a steer or restart targets a thread with no active run, return a message that says the thread finished and that
mode: "auto"starts a new task in it. Point todelegate_taskinstead if continuing a finished delegate isn't meant to be supported. Then the tool description should stop advertising it. - Accept the unencoded form of
thread:delegated-task:<commandId>ids, or at least add a "Did you mean" hint inthreadNotFound, the same way the bare-uuid case works. [Bug]: Subagent thread IDs are very long and nested, wastes tokens and increases mistakes #28101 tracks the length of these ids.
Impact
Minor bug or occasional failure
Version or commit
Code read at main @ 2756da4. The audited sessions' builds weren't recorded.
Environment
Linux, Claude Code provider for parent and children.
Activity