[Bug]: thread_not_found gives no hint that the thread may live on a linked environment#31918

opened15d agobyJjohan-acevedo

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. Link two machines as environments (A and B).
  2. Take the id of a thread that exists on B.
  3. From an agent thread on A, call t3_thread_read with that id (no environmentId).

Expected behavior

Thread ids are per environment, so the error should say so and point to the linked environments to try (environmentId), or name the one that has the thread.

Actual behavior

A bare thread_not_found. Agents read this as "the thread does not exist" and carry on with a wrong conclusion, even though the thread is alive on a linked environment. In a setup with six linked machines this happened repeatedly; one scheduled task inferred another thread's state from indirect evidence because of it.

The only hint the error offers today is the mcp: prefix (threadAccess.ts#L25-L43).

Impact

Minor bug or occasional failure (regular for multi-machine setups; single-machine users are unaffected).

Version or commit

t3 v0.1.8-nightly.20261106.4247 (main at 202d5b5616e3edf65706371e2b8a9c4f486d0a96)

Environment

Linux, six machines linked as environments.

Workaround

Call t3_environment_links, then t3_thread_search / t3_thread_read with each environmentId. Related: #29925 (cross-environment reference without environment metadata) and discussion #31289 (search all linked environments in one call).

Synced from GitHub

Same issue.

I tried, but T3 returned thread_not_found: “Thread … is no longer available.” Nothing was sent. Please send its current thread link; cross-machine lookup is unavailable here.