DEV Community

A timeout does not tell you whether the tool ran

When an agent calls a tool and the response never arrives, you know one thing: you stopped waiting. You do not know whether the tool did the work.

That gap is where duplicate side effects come from:

  • duplicate emails
  • duplicate tickets
  • duplicate charges

The retry is reasonable. The missing information is the problem.

Uncertain delivery

In AMW (Agent Middleware, Preview), which I am building, a lost response after the send is recorded as delivery_uncertain. AMW never sends that call again on its own. It keeps the state visible so a person or the tool owner can decide.

The retry contract

A same key retry returns the original receipt instead of dispatching again. A new key is a new request. That is the whole contract, and it is narrower than exactly once on purpose.

Try it

If you run agents against MCP tools, I would like you to try to break it: github.com/agentmiddleware/agent-middleware

Chris

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.