[Bug] Disabled tools are still described to the model
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 43/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python, typescript
Direzione di ricerca
Start by tracing how MCP server policies reach ACP harnesses in services/runner/src/engines/sandbox_agent/mcp.ts, then compare with services/runner/src/extensions/pi-mcp.ts. Read advertisedToolSpecs and registerTools for custom tool permissions, and compose_platform_instructions for trigger tool names. Done when filtered or denied tools are neither advertised nor named in instructions across the described harnesses; the issue does not name tests to run.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
When a tool is turned off for an agent, its description still reaches the model. A "disabled" tool is not actually hidden, in three different places.
1. User MCP tools on the Claude / Codex (ACP) harnesses. Hide a tool with the server policy's include filter, or deny it per tool, then run the agent on an ACP harness. The harness dials the MCP server's tools/list itself, so the hidden tool is still listed and its description is sent to the model. On the Pi harness the same policy is applied and the tool is correctly hidden — so the same configuration behaves differently per harness.
2. Custom tools with permission: "deny". A code / client / reference / platform tool configured permission: "deny" is still advertised (name, description, input schema) on every harness. On Pi it also contributes its promptSnippet / promptGuidelines to the system prompt.
3. Prompt text names disabled tools. The composed platform instructions name the trigger tools (create_schedule, discover_triggers, create_subscription) whenever the run carries commit_revision, even when the agent has those tools off.
Setup
Self-hosted OSS via Docker Compose (hosting/docker-compose/oss), runner image ghcr.io/agenta-ai/agenta-runner:latest, agent runtime with both pi_core and claude harnesses available.
To Reproduce
- Create an agent with a user HTTP MCP server that advertises several tools.
- Set the server policy to
{ "tools": { "mode": "include", "names": ["<one tool>"] } }, or deny one tool viatool_permissions. - Run the agent on the Claude harness.
- Inspect the MCP
tools/listthe harness performs (or the tools the model receives). The hidden/denied tool is still present, with its description. - Repeat with a custom
code/clienttool set topermission: "deny"— it is still offered on every harness. - Turn the trigger tools off and check the system prompt: it still names
create_schedule/discover_triggers/create_subscription.
Expected behavior
A tool that is turned off — hidden by the include filter, denied per tool, or permission: "deny" — is not advertised to the model and is not named in the instructions.
Important Context
Repository paths where it reproduces:
- MCP on the ACP path:
services/runner/src/engines/sandbox_agent/mcp.ts—toAcpMcpServersdelivers a server asurl+headersonly, so the agent'spolicy.tools/ per-tooltool_permissionsnever reach the harness. The Pi extension applies the same policy (services/runner/src/extensions/pi-mcp.ts:678,683), and the API MCP gateway filter (api/oss/src/core/gateways/mcps/service.py) filters by the connection's tools, not the agent policy. - Custom
denytools:services/runner/src/tools/public-spec.ts(advertisedToolSpecsmaps every spec) andservices/runner/src/extensions/agenta.ts(registerToolsregisters every spec). - Prompt text:
sdks/python/agenta/sdk/agents/platform_instructions.py(AGENTA_CONFIG_SECTIONSandcompose_platform_instructionsgate oncommit_revisiononly).
Agenta Image Tag
0.121.x
- Lingua principale
- TypeScript
- Stelle
- 4.8k
- Fork
- 690
- Merge medio
- 19h 50m
- PR unite (30g)
- 419
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Agenta-AI/agenta
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Agenta-AI/agenta#7468 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
(bug) The Stop button disappears for a moment before an approval card showsForse già presa @rishu685 l’ha presa 5 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Agenta-AI/agenta#7446 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
Agenta-AI/agenta#7441 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Agenta-AI/agenta#7426 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
No CI job runs the mobile app's unit testsForse già presa @Mahaboob-Ashraf l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Agenta-AI/agenta#7326 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Agenta-AI/agenta
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
db-ux-design-system/core-web#8461 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Cannot run an integration on windows when power shell is selected as the default profile terminalApertaPriority/Blocker Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
wso2/product-integrator#2767 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
severity:low
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno