AgentFixboard

Disabling ListAgents throws NoSuchToolError during HarnessAgent construction

Constructing HarnessAgent with inactiveTools: ['ListAgents'] throws AI_NoSuchToolError before a session starts. The message is Model tried to call unavailable tool 'ListAgents'.

From GitHub

vercel/ai

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
ai@7.0.143
Last checked

Verified fix: PR #22383 merged on . Fixed in ai@7.0.143 (first published release whose tag contains the merge commit). Last checked .

Symptom

Constructing HarnessAgent with inactiveTools: ['ListAgents'] throws AI_NoSuchToolError before a session starts. The message is Model tried to call unavailable tool 'ListAgents'.

Evidence what you'll see

  • Despite that wording, no model attempted a tool call. The exception is thrown synchronously in the constructor.
  • The same configuration using the registered SendMessage succeeds. TypeScript also rejects ListAgents as an unknown tool name.
  • ListAgents is a native tool in the pinned coding-agent runtime, but the adapter's builtin catalog did not declare it.

Why it happens

The harness adapter omitted ListAgents from its built-in catalog, so HarnessAgent built the available-tool set without that name and the filter validator rejected it. Pull request 22383 registers ListAgents with its native input and output schema and keeps deny-list forwarding.

Affected versions

The coding-agent harness adapter at commit e00b1b14e99b. The linked issue does not name an ai package version beyond that commit, or an operating system.

Fix steps

0 of 2 done

Your check marks stay in this browser only.

How to check it worked

  • new HarnessAgent({ inactiveTools: ['ListAgents'] }) constructs without AI_NoSuchToolError.

If it still fails

  • Unknown tool names in inactiveTools are still rejected. The linked issue does not describe AI_NoSuchToolError for ListAgents on ai@7.0.143.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it