t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: t3_thread_read says a live thread is unavailable when given its T3 link

Open Alb11747 opened this issue 2 weeks ago • 1 comments

Area

apps/server, MCP

Steps to reproduce

  1. In a T3 thread, start a delegated task. Save the returned childThreadId and link.
  2. Call t3_thread_read with the exact childThreadId. The read succeeds.
  3. Call t3_thread_read with the returned link as threadId. Repeat with just the link destination.

A delegated thread ID has the form thread:delegated-task:command%3Amcp%3A…. The corresponding link destination is t3-thread://v2/<environment-id>/thread:delegated-task:command%3Amcp%3A….

Expected behavior

A pasted T3 thread link should resolve to the same thread with the usual linked-environment checks, or the error should identify the input as a link and tell the caller to pass the exact ID, including the thread: prefix and percent escapes.

Actual behavior

Both link forms return thread_not_found and say the thread is no longer available, even though reading the exact ID succeeds. Removing the prefix or decoding the escapes also produces a miss, since those characters are part of the stored ID.

Impact

Occasional failure when an agent is given a copied link. Passing the exact thread ID works.

Version and environment

Reproduced through the MCP tool on Windows desktop, 0.1.9-nightly.20261111.4501.fork.6. I inspected upstream main at 6ab633f6d6, where the read handler also takes the supplied ID directly and the shared package already has a thread-link parser. I did not run an upstream build.

Alb11747 avatar Nov 17 '26 19:11 Alb11747

I tried one more case on main with a synthetic subagent thread. If I pass the decoded ID directly to t3_thread_read, it suggests the correct ID with the %3A escapes. If I put that same decoded ID in a t3-thread:// link, it just says the thread is unavailable. Could the link case give the same hint?

chai-in avatar Nov 27 '26 11:11 chai-in