Repository navigation
feat(spaces): Let a Space's Lead move Conversations when a person asks - #4411
Merged
Merged
Conversation
The Lead now lists moveConversationToSpace, the same tool and move path as the dashboard's Move to Space. With no Space named, the tool moves the Conversation into the Space of the calling Conversation, so a Lead moves work into its own Space without copying an ID. A Lead Turn that no person sent, such as a Watch Event, now has no settings tools, so it cannot move work or change configuration. Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
1 screenshot change — 1 changed · 0 added · 0 removed Review screenshots in Frameshift
|
dcramer
marked this pull request as ready for review
November 26, 2026 03:10
dcramer
approved these changes
Nov 26, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 317ecd2. Configure here.
dcramer
added a commit
that referenced
this pull request
Nov 26, 2026
…n see (#4414) Stacked on #4411. Review only the top commit, `feat(spaces): Add a listSpaces tool…`. It targets `main` because CI runs only on PRs to `main`. Once #4411 merges, the diff shrinks to this commit. Agents had no tool to find a Space. To move work, the person had to paste a Space link. `listSpaces` is a new deferred, read-only tool in the `spaces` source, next to `moveConversationToSpace`. It uses the access rules that `listSpaces` in `chat/spaces/store.ts` already has. It returns each Space's id, name, description, visibility, whether the person is a member, and a dashboard link. It leaves out archived Spaces, and `membership: "member"` keeps only the person's own Spaces. Following `policies/conversation-access.md`, a private Space's data stays with its members. So the tool lists every public Space, but a private Space only from a Conversation in it. From anywhere else, a person who wants to move work into a private Space still passes its link. Every Turn lists the tool, and the Lead gets it in `LEAD_TOOLS`. ## Lead tools - **Today on `main`:** `startConversation`, `messageAgent`, `searchConversations`, `searchConversationEvents`, `readConversationEvent`, `searchInboxItems`, `searchEventTypes`, `watchEvents`, `watchTimer`, `listWatches`, `stopWatchingResources`, `systemTime`, `updateUserCustomization`, `setConfiguration`, `noReply`. - **These two PRs add:** `moveConversationToSpace` (#4411) and `listSpaces` (this PR). - **Lead-children (`agents/lead-children`) adds:** `startAgent`, `listAgents`, `stopAgent`, and `archiveAgent`, in place of `startConversation`. Space Conversations become the Lead's children, so archive and stop for them come from that PR, not from new code here. - **Still left out:** sandbox, skills, MCP and provider tools (such as GitHub PR state), automations, `updateTodos`, `addInboxItem`, and `updateInboxItem`. This is on hold until the Lead-prompt overhaul recommends the Lead's tool set. <!-- junior-request-attribution:start --> via @dcramer. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:local%3Aweb%3A4946035b4db5727d7b5a1fcd --> -- [View Session](https://junior-prod.sentry.dev/conversations/local%3Aweb%3A4946035b4db5727d7b5a1fcd) [[Sentry]](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A4946035b4db5727d7b5a1fcd/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: David Cramer <[email protected]>
dcramer
added a commit
that referenced
this pull request
Nov 26, 2026
…se (#4422) The Lead eval case "moves the Conversation" from #4411 failed even when the Lead moved the work. The Lead ran `moveConversationToSpace` inside a `codemode` script, and a script call records no tool output, so the case read `undefined`. The case now reads the moved Conversation's Space from its dashboard page, as the person sees it, instead of the tool output. The eval fixture gets a `readConversationSpace` helper for this, which calls `GET /api/conversations/:id` as the web person. <!-- junior-request-attribution:start --> via @dcramer. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:local%3Aweb%3A4946035b4db5727d7b5a1fcd --> -- [View Session](https://junior-prod.sentry.dev/conversations/local%3Aweb%3A4946035b4db5727d7b5a1fcd) [[Sentry]](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A4946035b4db5727d7b5a1fcd/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: David Cramer <[email protected]>
2 of 12 tasks
dcramer
added a commit
that referenced
this pull request
Nov 26, 2026
…ead design (#4428) States where Spaces and the Lead are heading. A Space uses the core Conversation tree (parents, roots, Participants, access, stops, archives, Watches, updates), and only a few Space-specific layers sit on top of it. - `design/spaces.md` is rewritten. The Lead is the root of the Space's tree. Every Space Conversation, whether the Lead starts it, a person starts it in the Space, or a person moves it in, is a child of the Lead and has the Lead as its root. Children inherit the Lead's Participants. Archive and snooze act per child. The file lists the Space layers explicitly: metadata, membership, configuration, the Lead's prompt and tools, moves, and rendering (the sidebar, the Threads panel, and top-level lists). - `design/lead.md` is new. It covers the Lead's role, its curated manager tool set (it runs Threads, reads, plans, and asks people, and it never writes or runs code), and the Turn gates: explicit reply on child and Event Turns, quiet `done` updates, and child results as claims. Gaps record what is not on main yet. - `design/agent-teams.md`: a Lead's team is its Space, and the Lead gaps move to `lead.md`. - `design/child-agents.md`: removes contradictions with Spaces. A move changes a child's parent, a moved Conversation delivers to its own Location, and the 8-child limit does not apply to a Lead's children. - `TERMINOLOGY.md`: updates Lead, Space, Thread, Team, Delivery, and Participant, and adds Top-level Conversation (derived, not stored). Related: #4377 (`thread` kind), #4411 and #4414 (moves), #4416 (Threads panel). #4413 edits some of the same lines. After this merges, it should drop those doc changes and delete only the gaps it closes. <!-- junior-request-attribution:start --> via @dcramer. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:local%3Aweb%3A56172fc7761dc3a4c09f6bc7 --> -- [View Session](https://junior-prod.sentry.dev/conversations/local%3Aweb%3A56172fc7761dc3a4c09f6bc7) [[Sentry]](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A56172fc7761dc3a4c09f6bc7/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: David Cramer <[email protected]>
This branch was successfully deployed
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.

A Space's Lead had no way to move a Conversation. When a member asked it to move related work into the Space, it started a separate Conversation to do the move.
The Lead now lists
moveConversationToSpace. It's the same tool that root Conversations already have from #4282, and it calls the samesetConversationSpaceForViewer→setConversationSpacepath as the dashboard's Move to Space. So the existing rules still apply:Other changes:
spaceis omitted, the tool uses the Space of the calling Conversation, which it reads from the runtime. A Lead moves work into its own Space without copying an ID.nullstill takes a Conversation out of its Space.settings: false. The Lead's tool list stays the same, so the prompt cache holds, butmoveConversationToSpaceandsetConfigurationare disabled on those Turns. Before this change,setConfigurationwas usable on them.Coordination with Lead-children (
agents/lead-children): this PR is based onmain, not stacked on that branch. The Lead calls the sharedsetConversationSpaceForViewer, which that branch changes so a move setsparent_idandroot_conversation_idto the Lead. So the Lead's moves pick up those semantics with no rework. The only overlap is one line inLEAD_TOOLS.The eval fixture gets
createOtherSpace(name), which makes a Space as a second dashboard person throughPOST /api/spaces. The Lead evals use it to ask the Lead to move work into a Space the person is not in.via @dcramer.
--
View Session [Sentry]