Testing AI agents often relies on flawed metrics that report success while business processes fail. A common issue is evaluating only the final text output rather than the actual state change in the database. If an agent claims a task is done but the database remains unchanged, the test incorrectly marks it as successful.

Most test suites focus exclusively on happy path scenarios, ignoring failure modes like timeouts, schema drift, or prompt injections. Relying on positive test cases leaves systems vulnerable to silent errors where tools return formally valid but semantically incorrect data. Developers should maintain a matrix of failure modes for each workflow.

Another critical oversight is failing to validate the agent's internal trace. Agents may achieve the desired outcome through incorrect tool calls or by skipping authorization checks. Instead of enforcing rigid sequences, developers should define trajectory invariants, such as mandatory, forbidden, and allowed tool calls.

Metrics can be easily gamed if they are not aligned with business outcomes. For instance, an agent might achieve high success rates by offloading complex tasks to human operators. The τ-bench benchmark highlights this by showing that even degenerate agents can score points if the evaluation criteria are poorly designed.