Dead-letter queues for AI database agents: make failed questions visible instead of expensive
An AI database agent should not turn one confusing question into an infinite retry loop.
When a query fails, a schema changed, a policy blocks access, or a model cannot resolve ambiguity, the safe answer is not “try again forever.”
The safe answer is: stop, preserve the evidence, and put the item somewhere a human or workflow can inspect it.
Retries need a ceiling
Retries are useful for transient failures. They are dangerous when the failure is semantic: missing tenant scope, ambiguous metric definition, blocked permission, stale schema context, or a write operation that needs approval.
Every MCP database workflow should define retry limits and a clear dead-letter path.
Related: MCP tool errors for AI database agents.
Dead-letter records should be structured
A useful dead-letter record is more than “failed.” It should capture the user request, tool name, parameters, policy decision, query ID if one exists, error type, retry count, and the next human-readable action.
That turns a mysterious agent failure into an operations queue.
Related: Tool result contracts for AI database agents.
Separate transient failures from policy failures
A network timeout and a tenant-scope refusal should not follow the same retry path.
Transient failures can retry with backoff. Policy failures should usually stop immediately and ask for missing scope, approval, or clarification.
Related: Approval gates for AI database writes.
Checkpoint before expensive work
Long-running agent workflows need commit points. If an agent processes a batch of database questions, each item should be marked complete, blocked, or dead-lettered independently.
That prevents restarts from duplicating work, losing evidence, or rerunning expensive queries.
Related: Query provenance for AI database agents.
Where Conexor fits
Conexor is MCP infrastructure for teams connecting AI clients to databases and APIs. Reliable AI database workflows need bounded retries, structured failures, provenance, and audit trails — not just a prompt wrapped around SQL.