agent-tracking

Agent Guardrails & Monitoring · Guide

How do I monitor Claude Code and AI coding agents for stuck or waiting sessions?

Traditional uptime tools monitor HTTP endpoints, and LLM observability platforms (Langfuse, LangSmith, AgentOps) trace prompts inside apps you build. Monitoring local and headless coding agents requires a different layer: zero-prompt lifecycle hooks, silence-floor stall detection, multi-harness coverage, and OpenTelemetry trace ingestion.

By · Updated 2026-11-25

Diesen Guide auf Deutsch lesen

Three-layer AI agent monitoring and local guardrail control plane
Operational agent monitoring bridges the gap between cron watchdogs and prompt-logging LLM tracers.

Why coding agents fail differently from normal software

Standard backend services crash with a stack trace and an HTTP 500. Coding agents like Claude Code, Cursor, Codex CLI, Gemini CLI, and Antigravity fail in four quieter ways:

1. Permission hangs: The agent pauses indefinitely waiting for Allow: git push? in a background terminal or tmux pane. 2. Silent network/API stalls: The process remains alive in RAM but produces zero tool calls for 45 minutes. 3. Retry spirals: Every single tool call exits 1 while the agent loops through variations all night. 4. Config drift: An agent silently gains a new MCP server or modified rule file.

Layer 1 · Local GuardrailsPreToolUse fuse against loops & destructive commands (<2 ms)Layer 2 · Lifecycle & HeartbeatsStuck, waiting, missed cron & exit codes across every harnessLayer 3 · Config & MCP Drift + OTLPZero-prompt fingerprints, first-time tools, team alerts & MCP query
The three layers of production coding-agent control without exfiltrating prompts.

Complete tool comparison: choosing the right agent monitoring stack

Different teams need different layers. Use this objective matrix to avoid forcing an LLM prompt tracer or legacy cron pinger into a job it was not built for:

Tool categoryExamplesSees prompts/code?Catches stuck & waiting?Local loop & rm-rf fuse?Best for
Zero-Prompt Agent MonitorAgent TrackingNever (zero-prompt)Yes (hooks + silence floor)Yes (<2 ms PreToolUse)Teams & devs running Claude Code, Cursor, Codex, Gemini, Agy & cron
LLM Tracing & EvalsLangfuse, LangSmith, AgentOpsYes (full prompts & spans)No (post-hoc traces)NoDebugging prompts, evals & latency inside custom AI apps you build
Cron Dead-Man's SwitchesCronitor, Healthchecks.io, LastPingNoMissed schedules onlyNoSimple shell scripts and HTTP uptime checks
Generic OTel / APMDatadog, Grafana, SentryDepends on configRequires custom rulesNoCentral infra teams willing to build & maintain custom dashboards
DIY Shell HooksCustom bash + curlLocal onlyPartial (fails open)Manual scriptingSingle-laptop tinkering before multi-machine sprawl
Use both when appropriate

If you build an AI SaaS app with LangGraph or the Anthropic SDK, keep Langfuse or LangSmith for your app's prompt evals—and use Agent Tracking for the coding agents and cron jobs operating your repositories and servers.

OpenTelemetry (OTLP) + MCP Fleet Queries

In addition to native hooks for 5 coding harnesses and wrap for cron/CI, Agent Tracking exposes an authenticated OTLP/HTTP JSON receiver (POST /api/agents/otlp) for custom workers and a read-only MCP endpoint (POST /api/mcp, tool get_fleet_status) so you can ask Claude or Cursor directly: *“Which of my overnight agents stalled or hit errors?”*

# Connect all coding-agent harnesses on this machine
curl -fsSL https://agenttracking.co/install.sh | sh -s -- connect all

# Query your monitored fleet directly from Claude or Cursor via MCP:
{
  "mcpServers": {
    "agent-tracking": {
      "url": "https://agenttracking.co/api/mcp",
      "headers": { "Authorization": "Bearer YOUR_READ_TOKEN" }
    }
  }
}

Try the fleet view before installing

Click through six live simulated agents—including a blocked loop, an MCP drift alert, a waiting permission prompt, and healthy cron runs—in the interactive fleet demo without signing up.

Frequently asked questions

How does Agent Tracking detect a stuck session when no hook fires?

The server monitors the last lifecycle event timestamp of every running session. If an active session goes silent beyond the stall threshold without ending, it is marked as suspected stuck and triggers an immediate alert.

Can I monitor agents across multiple Linux servers and macOS laptops?

Yes. Each connected machine reports under its own host label into one unified fleet dashboard, with one morning briefing in your local time zone.

Is Agent Tracking self-hostable for air-gapped or private VPC setups?

Yes. The entire application runs as a single Node.js 22 process with a single SQLite file under AGPL-3.0—no Postgres, Redis, or Kafka cluster required.

How does Agent Tracking compare to Datadog or Sentry AI Agent Monitoring?

Datadog and Sentry focus on APM instrumentation inside production web applications at enterprise seat/ingest pricing. Agent Tracking targets coding-agent fleets (Claude Code, Cursor, Codex, Gemini, Antigravity) and cron jobs with zero-code hook installation, local guardrails, and zero prompt collection.

Primary sources & documentation