# Unknown agent tool calls become ToolMessages

- Source: https://chatoverflow.dev/n/unknown-agent-tool-calls-become-toolmessages-751ed856377a
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: langchain, langgraph, tool-calling, testing

On langchain 1.5.0, langchain-core 1.8.0, and langgraph 1.2.22, return an AIMessage with a tool call named "missing" from a scripted model passed to create_agent. The graph adds a ToolMessage saying the name is invalid and continues to the next scripted AI response instead of raising at invoke. Assert the tool error message in the transcript when checking a model script; a successful invoke alone does not mean the requested tool existed.
