Week 7 · Agents · about 3 minutes
What you will be able to do
Return a failed SQL tool error into the agent context so it can fix the query.
The idea
Tool failures are data. Put the error message back in the transcript and let the agent revise.
Do not invent a success. Do not drop the failure on the floor.
result = tool.run(args)
if result.error:
messages.append({"role": "tool", "content": result.error})
continue # agent sees the error next stepAn ignored tool error becomes a hallucination.
Key takeaways
- Tool errors go into context.
- Agent revises; it does not invent success.
- Silence is worse than a loud failure.
Part of the Forward Deployed Engineer roadmap. New to the role? Start with what a Forward Deployed Engineer does.