Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug] Disabled tools are still described to the model

Aperta
#7,541 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

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
Ambito
ai, backend

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
  1. Create an agent with a user HTTP MCP server that advertises several tools.
  2. Set the server policy to { "tools": { "mode": "include", "names": ["<one tool>"] } }, or deny one tool via tool_permissions.
  3. Run the agent on the Claude harness.
  4. Inspect the MCP tools/list the harness performs (or the tools the model receives). The hidden/denied tool is still present, with its description.
  5. Repeat with a custom code / client tool set to permission: "deny" — it is still offered on every harness.
  6. 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 — toAcpMcpServers delivers a server as url + headers only, so the agent's policy.tools / per-tool tool_permissions never 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 deny tools: services/runner/src/tools/public-spec.ts (advertisedToolSpecs maps every spec) and services/runner/src/extensions/agenta.ts (registerTools registers every spec).
  • Prompt text: sdks/python/agenta/sdk/agents/platform_instructions.py (AGENTA_CONFIG_SECTIONS and compose_platform_instructions gate on commit_revision only).
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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Agenta-AI/agenta

Tutte le issue di Agenta-AI/agenta

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.