Skip to content

feat(threads): an agent lists, searches, reads and messages threads of another computer it may work on - #1327

Merged
bvsr365 merged 2 commits into
masterfrom
thread-list-search-other-computers
Nov 15, 2026
Merged

bvsr365 merged 2 commits into
masterfrom
thread-list-search-other-computers

Conversation

@bvsr365

@bvsr365 bvsr365 commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

An agent could reach a thread on another of the user's computers only if its own thread had started it there. It could not see what else runs there, and could not read or message a thread a person started on that computer.

Change

  • thread_list and thread_search take computer (a name or id from list_computers). Without it they stay on this computer. With it they read that computer's threads.list, projects.list and activity.snapshot, or its threads.search, and return its threads with qualified ids (<computer id>:<thread id>), mousse://thread/ links and the computer's name. The limits stay as they are: 100 rows by default and 500 at most for a list, 50 and 200 for a search, and feat(threads): thread_read is bounded and reads on; agent messages are capped per sender #1222's 64 KB cap (capped: true with a hint). Threads this thread launched there are always listed, as startedByYou.
  • A search keeps the window rules: that computer reads only the transcripts of its newest 100 threads. A computer that is offline, stopped sharing, is outdated or does not answer within 10 s comes back in notSearched { code, message }, not as an error. Private threads never appear: that computer does not send them, and they are filtered here too.
  • The checks on this side are read at every call, the same ones as thread_create with computer: "Let agents work on your other devices" is on and the computer is ticked (computer_not_allowed), the calling thread is not private (private_thread), and it was not started from another device (remote_from_remote, one computer deep). A name that matches none of the user's computers is refused (unknown_computer).
  • RemoteLaunchedThreads.reach() now also reaches any thread of a computer that passes those checks. thread_read and thread_wait read it as that computer shares it (scope: "computer"). thread_send, thread_steer and thread_interrupt stay the same marked calls as for a launched thread, so that computer decides them by the agent reach its person set for this device. When it refuses, the tool returns outside_agent_reach with reach (launched or none). The message says the person there limited this computer's agents and that it is changed in Settings → Devices on that computer. The refusal is never retried and never sent again unmarked. No second path: mode, device limit, hops, queue caps, the repeat check, a waiting question, sentFrom and the audit row are untouched.
  • notify on a send to a thread this device did not launch is followed the same way as for a launched one (feat(threads): an agent that asks with notify is told when a thread on another computer settles #1328's follower only reads there, and stops when agents here may no longer work on that computer). The notice names the computer from the device list, since no launch record names it.
  • A Stop on a thread this device did not launch ends only runs this device's agents started; a run a person there started is left running. The tool description says so.
  • The owner's refusal carries reach in its details: reach is added to the allowed error-detail keys (src/shared/errors.ts). For an owner without that change, the reach is read from its wording.
  • Tool descriptions, the MCP instructions, list_computers, SPEC §15.1 and the threat model ("What an agent may do on another computer", "Lists and searches") describe the new reach.

How to review

  1. src/mms/orchestrator/RemoteLaunchedThreads.ts: reach() and computerRefusal() (the one place that decides), computerFor(), the agent_reach case of remoteReachRefusal, then list() and search(). Risk: reach() now accepts ids it used to refuse. Check that every path to a thread this device did not launch passes computerRefusal, and that interrupt checks it for such a thread.
  2. src/mms/run/mcp/appTools/thread.ts: listedComputer, listOnComputer and searchOnComputer, the branches at the top of the thread_list and thread_search handlers (the central project check is skipped when computer is given), and remoteRefusal, which now passes reach and computers through.
  3. src/mms/orchestrator/OrchestratorService.ts: startedFromAnotherDevice (pulled out of thread_create with computer, which now uses it too), the three new host methods, and the settle follower's launched(), which now falls back to the device list's name.
  4. tests/net/bridge/routed/threadToolsRemote.test.ts: the new describe block, then the docs.

Verification

Tier 5 (networking and permissions). Tested commit c3eedf4398280681198d708e2216fb4556ba76c3, rebased on origin/master at 63c3dbb11 (#1328).

  • npx vitest run tests/net/bridge/routed/threadToolsRemote.test.ts: 30 passed. It runs two real daemons linked by Bridge, with the agent calling the tools through the app-tool registry:
    • a list and a search of the other computer return qualified ids, links and the computer's name, and no private thread;
    • a list over the byte cap stops at 64 KB with capped: true;
    • a thread a person started there is read;
    • with reach launched (the default), a send to it is refused with outside_agent_reach. It was asked once, marked, and nothing changed there;
    • with reach all, the message arrives as the agent's (source: mcp, origin.from names the sender). Its Stop ends that run and leaves a person's run running;
    • with reach none, neither a send nor a steer changes anything;
    • with the switch off, or the computer not ticked, all seven tools are refused and nothing is asked of that computer;
    • a private caller, and a caller started from another device, are refused;
    • an unknown name is refused; a computer that is offline or not sharing is refused for a list and named in notSearched for a search; a slow one is named computer_slow after 10 s;
    • a table covers the refusal wording, with the reach in the details or only in an older owner's words.
  • tests/net/bridge/routed/settleNoticeRemote.test.ts gains a case: with reach all, thread_send with notify to a thread a person started there (no launch record) is watched, and the end notice names that computer and carries the reply. Without the fallback in launched(), the case fails ("on another computer").
  • Also run on that commit, since they depend on the changed code or copy: threadCreateRemote, agentMark, routed/privateThreads, settleNoticeRemote, remoteSettleFollow, threadActionsTools, agentThreadReach, botThreadTools, botAppTools, mcpToolRegistry, mousseMcpServer, delegationGuidance, remoteSubagents, privateThreads, mousseToUI, appErrorContract. 17 files in all, 398 tests passed.
  • Two tests already failed on origin/master and are fixed here:
  • npm run typecheck passes.
  • Not checked: two separate machines over a real network (the test links two daemons in one process), and an owner running an older Mousse (covered only by the wording table).

Notes

Refs #1160

🤖 Generated with Claude Code

bvsr365 and others added 2 commits November 16, 2026 04:38
…d of another computer it may work on

thread_list and thread_search take computer: the routed threads.list, projects.list and
activity.snapshot (or threads.search) there, with qualified ids, links and the computer's name,
cut to the tool's limits and 64 KB; a search names a computer it could not reach in 10 s as not
searched. RemoteLaunchedThreads.reach now also reaches any thread of a computer agents here may work
on (not private, one computer deep, the switch and the ticked computer, read at every call). Reads
follow what that computer shares; a send, steer or Stop stays the marked call that computer decides
by its agent reach, and its refusal (outside_agent_reach) says where it is changed and is never
retried. The refusal's reach crosses in its details (safeErrorDetails allows `reach`).

notify on a send to a thread there this device did not launch is followed as for a launched one
(the follower only reads); its notice names the computer from the device list.

Refs #1160

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fused

#1328 made notify work for a thread started on another computer; the case that expected a refusal
is removed (settleNoticeRemote.test.ts covers the notice).

Refs #1160

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bvsr365
bvsr365 force-pushed the thread-list-search-other-computers branch from 4cd89dd to c3eedf4 Compare November 15, 2026 23:14
@bvsr365
bvsr365 merged commit 0644ac0 into master Nov 15, 2026
7 checks passed
@bvsr365
bvsr365 deleted the thread-list-search-other-computers branch November 15, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant