fix(server): stop inviting agents to hide the subagents they create (#10887)
The create_agent `background` description told agents to use it for helpers the user does not need to watch, so they passed `background: true` on their own and the subagents disappeared from the UI. Both tool descriptions and the bundled skill now state what the flag does and that it is omitted unless the user asks, with no reasoning to latch onto.
This commit is contained in:
1 parent
90c8446fb8
commit
5238bfb641
3 files changed
+32
-3
No files matched your search
@@ -996,6 +996,35 @@ describe("bundled Paseo skill", () => {
|
||||
await server.close();
|
||||
}
|
||||
});
|
||||
|
||||
it.each([
|
||||
[
|
||||
"create_agent",
|
||||
"Hide the agent from the UI. Inherits your visibility when omitted. Omit unless the user asks for a specific value.",
|
||||
],
|
||||
[
|
||||
"create_workspace",
|
||||
"Hide the workspace from the UI. Inherits your visibility when omitted. Omit unless the user asks for a specific value.",
|
||||
],
|
||||
])("describes %s background without suggesting when to set it", async (name, description) => {
|
||||
const server = await createAgentMcpServer({
|
||||
agentManager: new BoundaryAgentManagerFake() as AgentManager,
|
||||
agentStorage: new BoundaryAgentStorageFake() as AgentStorage,
|
||||
providerSnapshotManager:
|
||||
new BoundaryProviderSnapshotManagerFake() as unknown as ProviderSnapshotManager,
|
||||
logger: createTestLogger(),
|
||||
});
|
||||
const client = await connectInMemoryMcpClient(server);
|
||||
|
||||
try {
|
||||
const { tools } = await client.listTools();
|
||||
const tool = tools.find((entry) => entry.name === name)!;
|
||||
expect(tool.inputSchema.properties!.background).toMatchObject({ description });
|
||||
} finally {
|
||||
await client.close();
|
||||
await server.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe("Paseo tool timeline presentation", () => {
|
||||
|
||||
@@ -1224,7 +1224,7 @@ function createToolCatalog(
|
||||
.boolean()
|
||||
.optional()
|
||||
.describe(
|
||||
"True creates a background agent: hidden from tabs, default lists, your subagent track and notifications. You still get its finish notification and can address it by id. Omit to inherit your own value (false without a caller); use it for helpers the user does not need to watch.",
|
||||
"Hide the agent from the UI. Inherits your visibility when omitted. Omit unless the user asks for a specific value.",
|
||||
),
|
||||
};
|
||||
const legacyCreateAgentPlacementFields = {
|
||||
@@ -1435,7 +1435,7 @@ function createToolCatalog(
|
||||
.boolean()
|
||||
.optional()
|
||||
.describe(
|
||||
"True hides the workspace from default lists and the sidebar while its contents remain durable and accessible; omit background to inherit your own visibility (true when you or your current workspace are background, false without a caller), and override it only when the user explicitly asks.",
|
||||
"Hide the workspace from the UI. Inherits your visibility when omitted. Omit unless the user asks for a specific value.",
|
||||
),
|
||||
mode: z
|
||||
.enum(["branch-off", "checkout-branch", "checkout-pr"])
|
||||
|
||||
@@ -44,7 +44,7 @@ For a local daemon, `project create` defaults to the current directory and resol
|
||||
|
||||
**`create_workspace`** — create a workspace independently of any agent. Required: `isolation` (`local` or `worktree`). Worktree isolation supports `mode: "branch-off" | "checkout-branch" | "checkout-pr"`: use `branchName`/`baseBranch` for a new branch, `branch` for an existing branch, or `prNumber` plus optional `forge` for a change request. Use `path` for a local directory or source checkout and `projectId` for the owning project; when no path is supplied, a worktree may resolve its source from `projectId`. `worktreeSlug` controls the managed path. Returns the workspace descriptor centered on `workspaceId`.
|
||||
|
||||
`background: true` hides a workspace from default lists and the sidebar while its contents remain durable and accessible; omit `background` to inherit your current workspace’s value (false without a caller), and override it only when the user explicitly asks.
|
||||
`background` hides the workspace from the UI. It inherits your visibility when omitted. Omit it unless the user asks for a specific value.
|
||||
|
||||
Choose `baseBranch` explicitly: `origin/main` selects the remote-tracking branch; `refs/heads/main` selects local main. Bare `main` prefers local main when it exists, otherwise origin/main. Paseo retains the resolved ref for workspace comparisons, even after rebasing the branch or changing its PR target.
|
||||
|
||||
|
||||
Reference in new issue
Block a user