Repository navigation
feat(threads): an agent lists, searches, reads and messages threads of another computer it may work on - #1327
Merged
Merged
Conversation
…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>
bvsr365
force-pushed
the
thread-list-search-other-computers
branch
from
November 15, 2026 23:14
4cd89dd to
c3eedf4
Compare
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_listandthread_searchtakecomputer(a name or id fromlist_computers). Without it they stay on this computer. With it they read that computer'sthreads.list,projects.listandactivity.snapshot, or itsthreads.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: truewith a hint). Threads this thread launched there are always listed, asstartedByYou.notSearched { code, message }, not as an error. Private threads never appear: that computer does not send them, and they are filtered here too.thread_createwithcomputer: "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_readandthread_waitread it as that computer shares it (scope: "computer").thread_send,thread_steerandthread_interruptstay 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 returnsoutside_agent_reachwithreach(launchedornone). 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,sentFromand the audit row are untouched.notifyon 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.reachin its details:reachis added to the allowed error-detail keys (src/shared/errors.ts). For an owner without that change, the reach is read from its wording.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
src/mms/orchestrator/RemoteLaunchedThreads.ts:reach()andcomputerRefusal()(the one place that decides),computerFor(), theagent_reachcase ofremoteReachRefusal, thenlist()andsearch(). Risk:reach()now accepts ids it used to refuse. Check that every path to a thread this device did not launch passescomputerRefusal, and thatinterruptchecks it for such a thread.src/mms/run/mcp/appTools/thread.ts:listedComputer,listOnComputerandsearchOnComputer, the branches at the top of thethread_listandthread_searchhandlers (the central project check is skipped whencomputeris given), andremoteRefusal, which now passesreachandcomputersthrough.src/mms/orchestrator/OrchestratorService.ts:startedFromAnotherDevice(pulled out ofthread_createwithcomputer, which now uses it too), the three new host methods, and the settle follower'slaunched(), which now falls back to the device list's name.tests/net/bridge/routed/threadToolsRemote.test.ts: the new describe block, then the docs.Verification
Tier 5 (networking and permissions). Tested commit
c3eedf4398280681198d708e2216fb4556ba76c3, rebased onorigin/masterat63c3dbb11(#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:capped: true;launched(the default), a send to it is refused withoutside_agent_reach. It was asked once, marked, and nothing changed there;all, the message arrives as the agent's (source: mcp,origin.fromnames the sender). Its Stop ends that run and leaves a person's run running;none, neither a send nor a steer changes anything;notSearchedfor a search; a slow one is namedcomputer_slowafter 10 s;tests/net/bridge/routed/settleNoticeRemote.test.tsgains a case: with reachall,thread_sendwithnotifyto 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 inlaunched(), the case fails ("on another computer").threadCreateRemote,agentMark,routed/privateThreads,settleNoticeRemote,remoteSettleFollow,threadActionsTools,agentThreadReach,botThreadTools,botAppTools,mcpToolRegistry,mousseMcpServer,delegationGuidance,remoteSubagents,privateThreads,mousseToUI,appErrorContract. 17 files in all, 398 tests passed.origin/masterand are fixed here:delegationGuidance.test.ts: its inline snapshots were regenerated. The diff is only this PR's wording; feat(threads): an agent that asks with notify is told when a thread on another computer settles #1328's was already in them.threadCreateRemote.test.tsexpectedthread_createwithcomputerandnotifyto be refused, which feat(threads): an agent that asks with notify is told when a thread on another computer settles #1328 made work. That case is removed;settleNoticeRemote.test.tscovers the notice.npm run typecheckpasses.Notes
notifyacross computers); conflicts inthread.ts,instructions.ts, SPEC and the snapshot were resolved keeping both. fix(bots): personal bots have no fixed counts on wakes, watches, messages and threads; loops are refused instead #1311 also touchesthread.ts, in the personal-bot paths only.threads.listhas no limit on the owner, so a list reads that computer's whole list there and cuts it here. A limit on that row would need a new row version, so it was left out of this PR.Refs #1160
🤖 Generated with Claude Code