Agent MCP tools can only see the environment the thread runs on, not the other environments the app is connected to#25468

opened2d agobyTtynty-agents

What happens

The desktop app connects to several environments at once (here: a MacBook plus VPS servers), and the sidebar shows threads from all of them. An agent in a thread can only reach its own environment through the t3-code MCP tools:

  • t3_environment_read returns only the local server (environmentId, label).
  • t3_project_list, t3_thread_list, t3_thread_read, t3_thread_send, t3_thread_organize and the rest have no environmentId parameter, and only return or change the local server's state.

So when a user asks "which of the threads in my sidebar can be settled?", the agent can answer for one environment out of several, and has no supported way to reach the rest.

Why it matters

The app already holds authenticated connections to every environment (the connection catalog). The agent's MCP server runs inside one environment's server process and doesn't know about those connections. To work around this, we built our own SSH-forwarded Unix-socket relay to a VPS service that re-implements a single message.dispatch call (send a message to a thread on another environment), plus pinned targets and sender policy. It only covers sending a message; it can't list, read, or settle threads, and it breaks whenever the tunnel drops. Users shouldn't need any of that just to work with environments the app is already connected to.

Current workaround

SSH to each remote host, issue a short-lived session with that environment's own t3 auth session issue, and call its orchestration HTTP API directly. It works, but every agent has to reimplement it, and it sits outside T3's permission model.

Request

Let agents reach the user's other connected environments through the same tools, with the same permissions they already have:

  1. A tool listing the environments the user has connected (id, label, reachable or not).
  2. An optional environmentId on the project, thread, queue and organize tools, routed over the existing environment connection.
  3. A clear error when an environment isn't reachable, rather than a silently local-only answer.

Permission rule: a remote action should be allowed no more broadly than the calling thread's runtime mode and the remote environment's own policy.

Environment

T3 Code server 0.1.2 (also checked against nightly v0.1.3-nightly.20261026.3717: the MCP toolkits still take no environmentId, and the environment handler rejects any environment other than the caller's), macOS (arm64) desktop with VPS environments paired.

This conversation has been locked.