Repository navigation
Replies: 2 comments
|
Draft implementation: #20112. It stays a draft until the direction here is approved. |
0 replies
|
Up! This can be very useful with little technical debt imo |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
I run T3 Code remotely most of the time. The desktop app on one laptop connects to a server on another laptop, and sometimes I use the phone or a browser instead. The agent only knows the machine it runs on. It has no idea which device I'm typing from.
That gets expensive whenever the agent does something that needs the person physically present:
gh auth login, cloud CLIs) opens it on the host, not in front of me.pbcopy, andsayall act on the wrong machine.localhostandfile://links in replies only work when the device is the host.What the server already knows
Every client connection is an authenticated session with device metadata (
AuthClientMetadata: label, device type, OS, IP). The WebSocket handler knows which session eachmessage.dispatcharrives on. The user message only recordscreatedBy: "user", so that information never reaches the turn.Proposal
sender: the label, device type, OS, and surface of the session it came from, plussameMachine(loopback connection) and a best-efforthostName(reverse DNS of the client IP, which yields the machine name on Tailscale and most LANs). Clients can't set it. Server, MCP, scheduled, and agent-originated messages never carry it.<user_device>The user sent this message from "T3 Code Desktop" (macOS desktop, desktop) on another machine (m3.tailnet.ts.net).</user_device>. It is per turn, so it stays correct when the user switches devices mid-thread. The UI is unchanged.That is enough for agents, skills, and AGENTS.md rules to choose correctly ("only run computer use when the user is on this machine", "link the tailnet URL instead of localhost when the user is remote").
Out of scope: the desktop client presents a fixed label (
T3 Code Desktop), so remote desktops are told apart by host name rather than label. Letting the desktop present the OS host name would be a small follow-up if you want it.I have a working implementation and will link it as a draft PR here. Happy to reshape or drop it if you want a different direction.
All reactions