deepseek-ai/deepseek-harness · error · ToolNotFoundError
UNKNOWN_TOOL
UNKNOWN_TOOL
Error message
unknown tool "${toolName}" What it means
Lookup failure in tool dispatch: the model (or caller) invoked a tool name that is not registered in the visible toolset. The name may be misspelled, shadowed by a scope restriction (tools.restrict), never registered, or the call was routed to the wrong agent scope.
Solutions
- Check the registered/visible tool list for the correct name
- Register the tool globally or in the calling agent's scope
- Lift any tools.restrict() mask that denies the tool
- Fix client-side tool name typos
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at packages/core/tools/src/index.ts:1547 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/6780bdbc6b87a041.
Report an issue: GitHub.
Appendix: source
Thrown at packages/core/tools/src/index.ts:1547
* into any around-wrapper replacement. Cancellation never abandons the body:
* a started promise reaches quiescence before its outcome becomes `ABORTED`.
*/
private async dispatchToolBody(exec: MutableToolRunContext): Promise<ToolExecutionResult> {
const state = this.cancellationStates.get(exec)
/* v8 ignore next -- only registry-minted executions reach the staged scheduler methods */
if (state === undefined) throw new Error('tool registry scheduler invariant violated: missing cancellation state')
const wrapperSignal = exec.signal
const fused = fuseToolSignals(state.callerSignal, wrapperSignal)
const signal = fused.signal
if (isAborted(signal)) {
fused.dispose()
return toolAbortedBeforeDispatchResult()
}
exec.signal = signal
try {
const tool = this.resolveExecution(exec.name, exec.agent, exec.parent !== undefined)
if (!tool) throw new ToolNotFoundError(exec.name)
state.bodyInvoked = true
const returned = await tool.execute(exec.arguments, exec)
const result = this.createSuccessResult(exec, tool, returned)
return isAborted(signal)
? toolAbortedResult(result)
: result
} catch (error: unknown) {
return toolErrorResult(error)
} finally {
fused.dispose()
exec.signal = wrapperSignal
}
}
/**
* Run around-dispatch and the tool body. Tool and unknown-tool failures still
* receive post-execute; pipeline failures are already final.
* @param exec - the prepared execution.View on GitHub (pinned to b150a551b8)