Repository navigation
A conversation can be told only about its own work (agents.set_scope) - #2462
Merged
Merged
Conversation
…tion context A conversation's meta.json can now store scope "conversation". Such a conversation gets no <elsewhere> block on its turns, and its tasks tool lists and addresses only its own tasks (no other conversations' landed rows, no running-in-other-windows or everywhere sections). The default, project, keeps today's behaviour. The word is written under the meta lock and read beside the turn and in the tasks tool, so a live conversation follows it from its next turn. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…pening it
agents.set_scope {id, scope} stores project or conversation in the
conversation's meta.json and answers the stored word. It never opens, warms or
interrupts the conversation. Engines that serve it announce agents.scope.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… the scope The new scope words are WorkScopeProject/WorkScopeConversation (ScopeProject already names an answer scope). agents.set_scope returns *AgentScope as typed handlers must. saveMetaLocked keeps the stored scope when a whole-Meta writer loaded before a scope change saves with none, and project is stored as its own word so a reset survives that rule too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
AbirAbbas
force-pushed
the
workstreams/l-fix9-cross
branch
from
November 6, 2026 14:30
ea56746 to
2e3f564
Compare
AbirAbbas
added a commit
that referenced
this pull request
Nov 13, 2026
…, agents.set_scope) (#2613) * Client tools: a client attaches tools to a conversation Carries #2334 from workstreams/main (e9a571c) onto dev. The workstream door that commit sat beside is left out, and the collection-held conversation half is already on dev (#2475). Co-Authored-By: Claude Mythos 5.2 <[email protected]> * Client tools: a tool call names the message its turn answers; the answer cutoff is a wait Carries #2346 (b1a02be) and #2360 (25c6faa) from workstreams/main. Co-Authored-By: Claude Mythos 5.2 <[email protected]> * Client tools cross the remote door to the connection that set them Carries #2417 (08b6e1e) from workstreams/main. Co-Authored-By: Claude Mythos 5.2 <[email protected]> * A conversation can be told only about its own work (agents.set_scope) Carries #2462 (e985a44) from workstreams/main. Co-Authored-By: Claude Mythos 5.2 <[email protected]> * changes: one entry for client tools and conversation scope (#2613) Replaces the five entries carried with the source commits. Co-Authored-By: Claude Mythos 5.2 <[email protected]> * Client tools: a call id hashes the whole call, and a call without a provider id gets a random id The `call` id was sha256(agent, provider call id), with a per-process counter when the provider gave no id. Provider ids are not unique: Kimi-family models write their own `name:idx` ids, which repeat after agents.rewind or compaction, and a faulty server can repeat any id. A reused id with another tool or other arguments therefore joined the earlier call's wait or got its saved answer, and never reached the app, while the app's 30-day table replayed the old answer for the same id. The counter restarted at every launch, so ids minted without a provider id came back after a restart. clientToolCallID now hashes the agent, provider call id, set, tool name and exact argument bytes, each length-prefixed, and keeps the `ct_` + 64 hex shape. The same call dispatched again keeps its id, joins the pending wait and gets the saved answer. Without a provider id the id is 32 random bytes. Calls from a remote holder reach the same door, so they share the identity. PROTOCOL.md and the change entry say what `call` is derived from. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Conversation scope: the page and the tasks description stop promising other windows' work Under `conversation` scope a conversation gets no <elsewhere> block and its tasks tool lists only its own work, but its system prompt still said "OTHER codeaf WINDOWS ON THIS PROJECT ARE VISIBLE TO YOU" and the tasks description still said search includes other windows' live work. The model could read an empty answer as "nothing else is running here" and tell the person so. The page's other-windows line and the tasks description now follow the stored scope. Under conversation scope the page says the conversation is told only about its own work and must not conclude nothing else is running; the tasks description says search reaches only its own work, even with scope everywhere. A project page and tasks description stay byte for byte as before. The scope is read when the agent is made and again at each turn's start. A changed scope re-renders the page and replaces the tasks tool on the belt and on a lean shelf, in fresh arrays, so the model sees the change from the next turn, as the scope already promises. Task nodes keep their page. PROTOCOL.md, the tasks manual page and the change entry say so. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Client tools: a session swap drops the old conversation's sets A holder shares one ClientToolHub across the initial, fresh and resumed openings of a remote Session. When another window ran /new or /resume, Session.swap replaced the agent but left every connection's sets in the hub, so the replacement conversation got a joined app's tools and instructions, and its calls went to that app under the old agent's id. The app then wrote into the old workstream, and its answer was refused with ErrJoinedGone, so the holder's model was told client_timeout. Session.swap now calls ClientToolHub.forget before the new agent is reachable: every connection's sets go, pending calls end with a clientToolEnded frame so the app stops waiting too, and a joined connection's snapshot that was already past the session's check is refused. A following surface may still attach to the open conversation. PROTOCOL.md, REMOTE.md, the client-tools manual page and the change entry say so. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Mythos 5.2 <[email protected]>
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.
Summary
A conversation can now be told only about its own work. Today every conversation in a folder gets an
<elsewhere>block with the other conversations' landed and running work there (with the files each wrote), and itstaskstool lists the folder's whole task index. A client that keeps a long-lived conversation in a person's shared work folder needs that conversation to see only its own work while keeping its folder, transcript and history.session.Meta.Scope:conversation, or absent forproject(today's behaviour). Written bysession.SetConversationScopeunder the existing cross-process meta lock; the session's own stamps patch only their fields, so it survives them.refreshElsewhereand in thetaskstool (both already read disk), so a live conversation follows the stored word from its next turn with no remote-protocol change. Scoped: no<elsewhere>block; the tasks tool lists and addresses only this conversation's rows; no running-in-other-windows or everywhere sections. The person's@list, task nodes and the write-safety warnings (ground shift, preflight) are unchanged.agents.set_scope {id, scope}→{id, scope}; hello featureagents.scope. It never opens, warms or interrupts the conversation (likeagents.mark_seen).bad_params,not_found,conflict(lent conversation or no local folder),unknown_methodon engines without the door.Why a stored switch rather than moving a conversation to another folder:
Config.Workspaceis captured at launch and the session folder, task index, presence, told stamp and transcript URIs are keyed on it; a move would re-key all of them. A live in-memory dial would need new remote-protocol plumbing because app conversations areremote.Agentconnections. The stored word is one field, one setter and two read sites. (The Workstreams plan, L-FIX9.)Validation contract
<elsewhere>block despite another conversation's recent landing and running taskTestConversationScopeLeavesOtherWorkOutOfTurnContextTestConversationScopeTasksReachOnlyItsOwnRows,TestConversationScopeKeepsItsLiveGraphWhileFilteringTheMergedIndex,TestConversationScopeLeavesATaskNodesChildrenVisibleprojectbehaves exactly as beforeTestProjectScopeKeepsOtherWorkVisible,TestConversationScopeDefaultsQuietlyToProjectTestConversationScopeSurvivesReloadAndLaterMetadataStampsTestConversationScopeClearsAnEarlierBlockOnTheNextReadingTestConversationScopeChangesOnlyItsStoredWord,TestConversationScopeStaysInMetaBesideSealedConversationSettingsinternal/appwire/agent_scope_test.go,cmd/codeaf/appscope_test.goTestConversationScopeRefusesUnknownWordsAndMissingConversationsLeft for later
The scope is local meta.json state: it is not carried when a conversation moves to another computer.
🤖 Generated with Claude Code