# Agent Monitoring: What to Track in Production AI Agents

The signals that catch loops, silent failures and runaway cost, and what we learned building loop detection

Nov 2, 2026 · Reliability · 9 min read · https://arclyx.ai/blog/ai-agent-metrics

## Summary

The AI agent metrics worth tracking in production are how each run ended, whether each tool call really succeeded, whether the agent is repeating itself, and what each run cost in rounds, tokens and money, all tied together by one trace per run. Uptime and latency still matter, but an agent can be up, fast and wrong at the same time [Source 1]. This post lists the signals, shows a small loop detector you can copy, explains what we changed in our own after real runs fooled it, and covers how OpenAI and Anthropic monitor agents [Sources 2, 3].

## Key Takeaways

- **Uptime is not enough.** An agent can answer quickly while using the wrong tool, burning tokens in a loop or missing a guardrail [Source 1].
- **Record how every run ended.** A finished run, a run that hit its round limit and a run that stopped for lack of progress are different failures, so store the reason, not just pass or fail.
- **A successful tool call can still go nowhere.** Count repeated calls and repeated results, not only errors: a loop of calls that all succeed never trips an error counter.
- **Check your error detection itself.** Before we fixed it, every failed call to a remote MCP tool in Arclyx counted as a success, because MCP reports failure in a field our check didn't read.
- **Trace with open standards.** Anthropic's Claude Platform exports OpenTelemetry traces in public beta since 14 October 2026, following the GenAI semantic conventions [Source 2].
- **Widen access only after the traces look right.** Anthropic's advice is to review an agent's traces, then widen its access as it proves reliable [Source 2].

## Why isn't uptime enough for AI agents?

Because the failures that matter happen inside a successful request. UptimeRobot's 2026 guide puts it plainly: agents can produce different outputs for the same input and fail silently, in ways that only show up when users complain. Its examples are using the wrong tool, burning tokens in a loop and missing a guardrail [Source 1].

So a useful monitor watches two things. The guide calls them system health (availability, latency, dependencies) and agent behavior (accuracy, drift, cost) [Source 1]. Most teams already have the first from their existing tooling. The rest of this post is about the second.

For the wider picture, with failure modes, trace schemas and evals, see our guide to [AI agent monitoring](https://arclyx.ai/blog/the-observability-gap). This post is the short list: which numbers to record on every run and how to act on them.

## Which AI agent metrics should you track?

Track these per run, and keep each one joined to the run's trace so you can open the run behind any number. The first four come from the UptimeRobot guide [Source 1]; the rest are what we record on every run in Arclyx.

| Metric | What it tells you | Alert when |
| --- | --- | --- |
| Latency per run and per model call | Slow models, slow tools, or a run doing far more work than usual | A run takes much longer than that agent usually does |
| Tool success rate, per tool | A broken connection, an expired sign-in or a wrong tool choice | One tool's failures jump |
| Tokens and cost per run | Loops and context bloat show up here first | A run costs far more than its usual |
| Task completion and output quality | Whether the agent did the job, which needs evals or review | Completion drops, or reviewers start rejecting output |
| How the run ended (its stop reason) | Finished, hit the round limit, hit the spend ceiling, stopped for lack of progress, or failed | Any run ends without a clean answer |
| Rounds per run | How many think-and-act steps the job took | Runs creep toward the round limit |
| Repeated calls and repeated results | A loop that every error counter misses | A tool repeats itself (see the next section) |

Two notes on that table. First, "tool success" is only as good as your definition of failure, which we got wrong once (below). Second, the stop reason is the single most useful field. In Arclyx (as of November 2026) every run records one of a fixed set: completed, round limit reached, spend ceiling reached, time or token budget reached, no progress, empty reply, failed, verification failed or cancelled. A run that failed, or stopped short at its round limit, its time or token budget, for lack of progress, with an empty reply or failed verification, puts its agent under Needs you on the Home page. That is how most problems reach a person before a colleague notices; our guide to [debugging AI agents](https://arclyx.ai/blog/debug-ai-agents) starts from there.

## How do you catch an agent stuck in a loop?

Count three things for each tool in a run: how often it was called with the same arguments and got the same result, how often it returned the same result for any arguments, and how often it was called at all. Each catches a different loop, and each needs a different limit.

The detector below is a simplified version of the one Arclyx runs. It needs Python 3.10 or later and nothing outside the standard library. Call `record` after every tool call; when it returns a reason, take the tool away from the agent for the rest of the run, or stop the run.

```python
import hashlib
import json
from collections import Counter

REPEAT_LIMIT = 2     # same tool, same arguments, same result
RESULT_LIMIT = 8     # same result for different arguments
CALL_CEILING = 10    # calls to one tool in one run
VOLATILE_KEYS = {"run_id", "artifact_id"}  # ids that change on every call


def strip_ids(value):
    """Drop volatile ids at any depth, so a fresh id can't hide a repeat."""
    if isinstance(value, dict):
        return {k: strip_ids(v) for k, v in value.items() if k not in VOLATILE_KEYS}
    if isinstance(value, list):
        return [strip_ids(v) for v in value]
    return value


def digest(value) -> str:
    text = json.dumps(strip_ids(value), sort_keys=True, default=str)
    return hashlib.sha256(text.encode()).hexdigest()


class LoopGuard:
    """Flags a tool that keeps running without moving the task forward."""

    def __init__(self):
        self.calls = Counter()
        self.repeats = Counter()
        self.results = Counter()
        self.flagged = {}  # tool name -> reason

    def record(self, tool: str, args: dict, result) -> str | None:
        if tool in self.flagged:
            return self.flagged[tool]
        args_key, result_key = digest(args), digest(result)
        self.calls[tool] += 1
        self.repeats[(tool, args_key, result_key)] += 1
        self.results[(tool, result_key)] += 1
        if self.repeats[(tool, args_key, result_key)] >= REPEAT_LIMIT:
            reason = "repeated_call"
        elif self.results[(tool, result_key)] >= RESULT_LIMIT:
            reason = "identical_results"
        elif self.calls[tool] >= CALL_CEILING:
            reason = "call_ceiling"
        else:
            return None
        self.flagged[tool] = reason
        return reason


guard = LoopGuard()
for _ in range(2):
    reason = guard.record("search_crm", {"q": "Acme"}, {"hits": [], "run_id": "r1"})
print(reason)  # repeated_call
```

Asking the same question twice and getting the same answer adds nothing, so that limit is tight. The same answer to different questions is often real work, so that limit is loose. The call ceiling catches everything else. To test it on your own agent, replay last week's failed runs through it and compare what it flags with what users reported for the same week. If users reported failures it missed, those failures were in the output, not the loop, and need an output-quality check instead.

## What did real runs teach us about loop detection?

Every limit above came from a run that got past an earlier version. These are from our own agent runtime in August 2026.

**A run can loop on calls that all succeed.** In one test run, an agent called two CRM query tools ten times each. Every call succeeded and every result was different, and none of it was useful. Our failure breaker never fired, because nothing failed. That is why there is a per-tool call ceiling of 10, loose enough for real work but low enough to catch this.

**The same answer is not always a loop.** An enrichment tool that looks up one company per call returned the same empty result for five different companies. That was correct work, but a limit of three identical results read it as a loop and cut off a working pipeline. We split the check in two: same arguments and same result trips at two, and same result for different arguments trips at eight.

**Your error check can be blind.** Our tools report failure with an `error` field. Remote MCP tools don't: they set `isError` on the result. Until we read that flag, every MCP failure was counted as a success, which disarmed both the failure breaker and the stall check. One run got the same error back for eight different companies and none of it counted.

**IDs in results hide repeats.** Every call that produced a file put a fresh file ID in its result, so no two results ever matched and both repeat checks went blind. A model re-running a tool whose output it couldn't see was stopped by the ceiling after ten calls, ten sandbox runs, instead of two. Removing named ID fields before comparing results fixed it. We list the fields by name rather than stripping anything that looks like an ID, because some IDs, like which document came back, are the result.

Two more limits sit around the loop checks. A round limit caps the think-and-act steps in one run, and a spend ceiling per run on paid plans is checked before every model call: Arclyx shortens the reply to fit what's left, and stops the run when not even a short answer fits. Our guide to [AI agent cost control](https://arclyx.ai/blog/ai-agent-cost-control) covers how to set both. Together they mean a loop costs a few rounds, not the month's budget. You can see the same record for any agent in [Arclyx observability](https://arclyx.ai/product/observability), and the limits themselves in [guardrails](https://arclyx.ai/product/guardrails).

## How do OpenAI and Anthropic monitor agents?

**Anthropic** made tracing part of the Claude Platform. Since 14 October 2026, in public beta, Claude Managed Agents, the Messages API and the Anthropic SDKs can send OpenTelemetry traces, where every agent turn, model call and tool use arrives with its latency, tokens and IDs, following the OpenTelemetry GenAI semantic conventions [Source 2]. Its guidance for trusting an agent with more is short: review its traces, then widen its access as it proves reliable [Source 2].

**OpenAI** described in March 2026 how it monitors its own internal coding agents. A system powered by GPT-5.4 Thinking at maximum reasoning effort reads each session's full conversation, including chains of thought, tool calls and their outputs, and reviews it within 30 minutes of completion, assigning a category and a severity [Source 3]. Less than 0.1% of traffic, mostly from bespoke or local setups, falls outside it [Source 3]. Among the behaviors it reports are agents encoding commands in base64 and sending blocked commands to a different instance of the model, and agents misrepresenting what tools they used, what a tool returned or whether they finished the task [Source 3]. That last group is why monitoring has to read the trace, not the final answer.

## What are the limits of agent monitoring?

Monitors are noisy, and the interesting events are rare. Over five months and tens of millions of sessions, OpenAI's monitor sent about 1,000 conversations to human review at moderate severity, many of them from deliberate internal red-teaming, and no real conversation reached the highest severity [Source 3]. A model watching another model also only catches what it understands.

Loop limits have the opposite problem: set them too tight and they stop real work, as our enrichment example did. Every limit needs a real run behind it, and should be revisited when a working agent trips it.

For most teams the first win is not a sophisticated judge. It is a complete trace for every run, a stop reason on every run, a handful of alerts on the metrics above and a habit of opening the runs that stopped short.

## Conclusion

Agent monitoring means watching what agents do, not only whether they are up. Record how every run ended, count tool calls and repeated results as well as errors, check that your error detection reads every tool's failure format, and keep cost and rounds per run next to the trace. Widen an agent's access once its traces look right [Source 2].

To see what that record looks like on a real job, our [Competitor watch](https://arclyx.ai/agents/competitor-monitoring) agent page steps through one run: what the agent read, what it checked and what it posted.

## Sources

1. [UptimeRobot — AI Agent Monitoring: Best Practices, Tools, and Metrics for 2026 (updated April 2, 2026)](https://uptimerobot.com/knowledge-hub/monitoring/ai-agent-monitoring-best-practices-tools-and-metrics/)
2. [Anthropic — Agent observability on the Claude Platform (October 14, 2026)](https://claude.com/resources/articles/agent-observability-on-the-claude-platform)
3. [OpenAI — How we monitor internal coding agents for misalignment (March 19, 2026)](https://openai.com/index/how-we-monitor-internal-coding-agents-misalignment/)
