Skip to main content
command CX Codex

errors — Claude Code command: list recent API errors from the monitor

errors pulls recent APIError events from the local Agent Monitor dashboard and prints one line per failure: time, session, short summary.

MIT ★ 1,198 updated 2026-10-23

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor
/plugin install ccam-quality@claude-code-agent-monitor-plugins
Open on GitHub

What errors does

errors talks to the Agent Monitor dashboard on http://localhost:4820 and keeps only records typed APIError. Pass [N] to choose how many lines come back; with no argument you get 10.

It is a curl call to /api/events?limit=300 with a filter on event_type == "APIError". When the list comes up empty, it checks event_types.APIError in /api/analytics for the all-time count. Each line carries timestamp, session_id and summary, with long summaries cut near 100 characters. The last line tallies what was shown and names the session hit hardest.

The dashboard has to be running. If curl cannot reach port 4820, start it with npm start from the repo root and run the command again.

What it helps with

  • pull recent API failures without switching to the browser
  • check the all-time total of APIError events
  • spot the session with the most failures
  • get a short digest of errors for a morning triage
  • see time and description of a failure on one line

Example prompts for the agent

  • Run errors with 5 and show me the latest API failures.
  • Any API errors lately? Give me the last 20 from the monitor.
  • Summarise recent APIError events and tell me which session took the most hits.

How to install errors

1Plugin marketplace

/plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor
/plugin install ccam-quality@claude-code-agent-monitor-plugins

2Manually: put the files in place

.claude/commands/errors.md

Call it with /errors. For all projects use ~/.claude/commands/

Questions about errors

How do I install errors in Claude Code?

Through the plugin marketplace: run /plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor, then /plugin install ccam-quality@claude-code-agent-monitor-plugins.

What does the errors command do?

It reads events from the local Agent Monitor dashboard, keeps the APIError ones and prints a line per error with time, session_id and a short summary. A closing line reports the count and the worst-affected session.

What does errors need in order to work?

A running dashboard at http://localhost:4820, otherwise curl has nothing to query. Start it with npm start from the repo root.

Source text

errors.md · MIT
---
description: List the most recent APIError events with their session and a summary
argument-hint: "[N]"
---

List the most recent Claude Code errors from the Agent Monitor dashboard at
`http://localhost:4820`. `$ARGUMENTS` is the number of errors to show (default 10).

1. Pull recent events and keep only API errors:
   ```bash
   curl -s http://localhost:4820/api/events?limit=300
   ```
   Filter the array to `event_type == "APIError"`. (If `$ARGUMENTS` is a number,
   show that many; otherwise show 10.) If none are found, also check
   `curl -s http://localhost:4820/api/analytics` `event_types.APIError` to confirm
   the true total and say "no recent APIError events (N total all-time)".

2. For each error, newest first, print one line:
   `timestamp · session_id · summary` — using the `timestamp`, `session_id`, and
   `summary` fields exactly as returned (trim long summaries to ~100 chars).

3. End with a one-line tally: total APIErrors shown and the most-affected
   `session_id`.

Output rules: cite only fields the API returned — never fabricate an error or a
cause. Keep it to the list plus the tally; no extra prose. If `curl` cannot reach
`http://localhost:4820`, tell the user to start the dashboard with `npm start`
from the repo root.

© Son Nguyen · MIT · hoangsonww/Claude-Code-Agent-Monitor

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

From the same set155

The whole set →

Project sponsors

Companies that keep this analytics open