Skip to main content
command CX Codex

tail-events — Claude Code command: what it does, how to install

tail-events fetches recent events from a local Agent Monitor dashboard and displays them in a compact table. Useful for tracking agent tool calls and session state.

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-devtools@claude-code-agent-monitor-plugins
Open on GitHub

What tail-events does

The command queries http://localhost:4820/api/events via curl and parses JSON output with jq. It requests 20 events by default, but accepts an optional count parameter N.

Output renders as a compact aligned table with timestamp, event type, and tool name. Monitored events cover PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, Notification, Compaction, APIError, and TurnDuration. Toolless events show a dash in place of the tool name.

The command is strictly read-only. Without an active Agent Monitor server on port 4820, execution fails: if the API returns a non-200 status or an empty body, start the dashboard by running npm start from its repository root.

What it helps with

  • inspect recent agent tool calls directly in terminal
  • detect session issues like APIError and context Compaction
  • check event timestamps and active tools without opening a browser

Example prompts for the agent

  • /tail-events
  • /tail-events 50
  • Show the last 10 agent events using /tail-events 10

How to install tail-events

1Plugin marketplace

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

2Manually: put the files in place

.claude/commands/tail-events.md

Call it with /tail-events. For all projects use ~/.claude/commands/

Questions about tail-events

How to install tail-events in Claude Code?

Run /plugin marketplace add hoangsonww/Claude-Code-Agent-Monitor, then /plugin install ccam-devtools@claude-code-agent-monitor-plugins. You can also place the command file directly at .claude/commands/tail-events.md.

What does tail-events do?

It fetches the latest events from the local Agent Monitor API and prints an aligned table containing timestamps, event types, and tool names.

What is required to run tail-events?

It requires the Agent Monitor service running locally on port 4820. If the API call fails or returns empty data, run npm start in the dashboard repository root.

Source text

tail-events.md · MIT
---
description: Show the latest N ingested events with timestamp, event_type, and tool_name.
argument-hint: "[N]"
---

Show the most recent events from the Agent Monitor dashboard. Argument:
**$ARGUMENTS** — `N`, the number of events to show (default 20).

Fetch recent events and take the newest N:

```bash
N="${1:-20}"
curl -s "http://localhost:4820/api/events?limit=${N}" | jq -r '.[] | "\(.timestamp)\t\(.event_type)\t\(.tool_name // "-")"'
```

The `/api/events` list is returned newest-first; show the most recent `N`.
Render a compact, aligned table — one row per event:

```
TIME                  EVENT_TYPE     TOOL_NAME
2026-06-25T14:03:11Z  PostToolUse    Bash
2026-06-25T14:03:09Z  PreToolUse     Bash
2026-06-25T14:02:58Z  Stop           -
```

Include `event_type` (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart,
SessionEnd, Notification, Compaction, APIError, TurnDuration) and `tool_name`
when present (use `-` for events without a tool). End with a one-line count:
`Showing latest <N> events.`

If the request returns a non-200 or empty body, say so and tell the user to start
the dashboard with `npm start` from the repo root. Read-only — never POST or
modify events.

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

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →
setup-agent-tail qdhenry setup-agent-tail is a Claude Code skill that deploys agent-tail in a project, detects its framework, installs the CLI and plugins, and routes server and browser logs to files for an agent. CX Codex +1 ★ 1,357repo stars Keyword Research — Google Suggest, Intent & Long-Tail axel-belfort Keyword Research — Google Suggest, Intent & Long-Tail is an MCP server for Google Suggest keyword research, intent classification, and long-tail variants for content, PPC, and competitor analysis. CX Codex +1 6,583installs instrument-events amplitude instrument-events takes event_candidates YAML and produces an instrumentation plan: where to place each tracking call and which properties to send. CX Codex +1 65,900installs gws-events-subscribe official googleworkspace A skill for Claude Code, Cursor, and other IDEs that lets you subscribe to Google Workspace events (Chat messages, document changes) and stream them as NDJSON. Use the gws events +subscribe command to pick event types and target resources. CX Codex +1 31,800installs gws-events-renew official googleworkspace gws-events-renew — a skill that renews Google Workspace Events subscriptions automatically. Prevents subscription expiry or reactivates subscriptions on schedule through a cron job. CX Codex +1 31,800installs events-system phaserjs events-system guides Phaser 4 event work, from listeners and custom signals to communication between scenes. Use it when editing code with on, emit, or EventEmitter. CX Codex +1 969installs

From the same set155

The whole set →
runs Pulls recent Workflow-tool fleet runs from the local Agent Monitor and prints a status summary plus a compact table of the latest ones. CX Codex +1 ★ 1,198repo stars recent recent fetches the latest Claude Code sessions from Agent Monitor with costs and run statuses. Useful when you need a quick summary of agent activity and spending. CX Codex +1 ★ 1,198repo stars ship-feature ship-feature — a workflow for taking medium or large feature changes from module inspection through implementation, verification, and documentation updates. Covers backend, frontend, and MCP work. CX Codex +1 ★ 1,198repo stars budget Puts your Claude spend next to a monthly budget you name, then tells you whether you are under it, on pace or already over. CX Codex +1 ★ 1,198repo stars mcp-operations The mcp-operations skill guides local MCP server checks, host configuration, and safety settings. Use it when tool connectivity fails or MCP behavior changes. CX Codex +1 ★ 1,198repo stars errors errors pulls recent APIError events from the local Agent Monitor dashboard and prints one line per failure: time, session, short summary. CX Codex +1 ★ 1,198repo stars cost-today cost-today fetches total token spending and single-line per-model expenses from Agent Monitor. CX Codex +1 ★ 1,198repo stars inventory The inventory command reports counts for skills, agents, commands, MCP servers, and hooks in a compact block. Use it to inspect the user and project split in a Claude Code setup. CX Codex +1 ★ 1,198repo stars

Project sponsors

Companies that keep this analytics open