Repository navigation
perf(workspaces): List Workspaces in the turn context - #2613
Merged
Merged
Conversation
The agent could not see which Workspace covers a repository, so repo work ran searchTools, a rejected github_cloneRepository, then switchWorkspace. List each Workspace and its repositories in the bootstrap turn context so the agent can switch first, before it does sandbox work that the switch throws away. Co-Authored-By: Thomas Jiang <20501235+thomasjiangcy@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
thomasjiangcy
marked this pull request as ready for review
November 3, 2026 14:56
thomasjiangcy
approved these changes
Nov 3, 2026
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.
Repo work in traces keeps taking the same detour:
searchTools("clone repository")→executeTool(github_cloneRepository)→ Workspace-match rejection →switchWorkspace. That is two wasted model steps on a full context, and any sandbox work done before the switch (loadAttachment,bash,readFile) runs in a default Sandbox that the switch throws away.Root cause: the agent cannot see which Workspace covers a repository. #2315 removed the prompt line about Workspaces because the clone rejection already steers to
switchWorkspace. That made the rejected clone the main way the agent finds a Workspace. Even before that, the agent needed alistWorkspacescall to map a repo to a Workspace name.Fix:
loadPromptTurnContextloads the install's Workspace recipes (listWorkspaces(getDb())). The bootstrap turn context renders them as a<workspaces>block, next to<available-skills>:With no Workspaces, the block is omitted. The block lists facts only. The clone rejection stays in place as the runtime gate.
<context-trust>andpolicies/system-prompt.mdlist the new tag as a runtime fact.Remaining risk:
listWorkspaces.via @thomasjiangcy.
--
View Session [Sentry]