fix(agents): send "improve instructions" to an agent that can act on it - #7028
Merged
Conversation
Follow-up to #7027, which retired the Agent Manager and moved agent CRUD into Super-Agent-only built-ins (`isDecopilot`-scoped). - The agent editor's "improve instructions" dropped its manager mention, so the message went to whoever the side panel runs as. On `/$org/agents` that is the agent being edited (`thread-route.ts` resolves `?virtualmcpid=`), which has no agent CRUD tools — the request had no way to land. It mentions the Super Agent instead, so SUBTASK runs under a decopilot id that carries the built-ins. - With both callers passing a manager again, `buildImprovePromptDoc`'s optional-manager branch is dead; reverted it and its tests. - Connecting an MCP from the catalog no longer navigates on its own — the existing success toast gains an "Open connection" action. Same target logic: the first `ui://` app tool, else the connection's own page, and no button at all when the server lists no tools. - The slug for that link comes from the created row, not the request payload — the server owns it. - `isDecopilot`'s comment claimed Decopilot aggregates all org connections; `storage/virtual.ts` findById returns none, which is the premise the built-ins rest on.
pedrofrxncx
enabled auto-merge (squash)
September 7, 2026 03:29
decocms Bot
pushed a commit
that referenced
this pull request
Sep 7, 2026
PR: #7028 fix(agents): send "improve instructions" to an agent that can act on it Bump type: patch - decocms (apps/api/package.json): 4.333.0 -> 4.333.1 - @decocms/native (apps/native/package.json): 4.333.0 -> 4.333.1 - @decocms/shared (packages/shared/package.json): 0.85.0 -> 0.85.1 Deploy-Scope: web
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.
Follow-up to #7027.
The bug
#7027 retired the Agent Manager and moved agent CRUD into Super-Agent-only built-ins (gated on
isDecopilot). The agent editor's improve instructions button dropped its manager mention along with it, so the message goes to whoever the side panel chat runs as. On/$org/agentsthat is the agent being edited —useRouteVirtualMcpIdresolves?virtualmcpid=(layouts/thread-route.ts:139,chat-context.tsx:377) — and that agent has no agent CRUD tools. The request had nowhere to land.Fixed by mentioning the Super Agent, so the SUBTASK runs under a decopilot id that carries the built-ins. With both callers passing a manager again,
buildImprovePromptDoc's optional-manager branch is dead code — reverted it and its tests.Catalog connect
Connecting an MCP from the catalog no longer navigates on its own. The existing success toast gains an Open connection action, keeping the same target logic: the first tool carrying a
ui://resource, else the connection's own page (tools tab), and no button when the server lists no tools. The slug for that link now comes from the created row rather than the request payload — the server owns it.Also
isDecopilot's comment claimed Decopilot aggregates all org connections;storage/virtual.tsfindByIdreturns none. That fact is the premise the built-ins rest on.Testing
bun run lint(0 errors),bun teston the touched files,bun run --cwd=apps/web check. Not exercised in a browser.Summary by cubic
Fixes the agent editor's "improve instructions" button so it directs the request to the Super Agent, which owns the agent CRUD tools, instead of the agent being edited (which can't act on it). Also changes catalog MCP connection success to show an "Open connection" action on the toast instead of navigating automatically.
buildImprovePromptDocsince both callers now pass a manager.ui://resource, else the connection's own tools tab; no button when the server lists no tools.isDecopilotcomment about Decopilot aggregating connections.Written for commit 2bb5f39. Summary will update on new commits.