watch

A live terminal dashboard for monitoring AI coding-agent sessions. It shows context usage, turns, recent tool activity, token counts, and estimated costs as the agent works.

In plain words
What is it for?
Run it in a terminal pane or tmux to follow the current session, automatically switch to newly detected sessions, and monitor activity and usage.
Why use it?
It helps you notice when a conversation is nearing its context limit and see what the agent is doing without repeatedly checking session logs.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/lanegrid/agtrace/watch
Clone the repo
git clone --depth 1 https://github.com/lanegrid/agtrace
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 295 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00295
Opus 5 $0.00000 $0.00148
Sonnet 5 $0.00000 $0.00059
Haiku 4.5 $0.00000 $0.00030

Measured 2d ago against content hash d473785f0207, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

watch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/watch.md · 47 lines

What it actually says

agtrace watch

Live "top"-style dashboard for AI coding agent sessions.

Overview

agtrace watch provides a real-time TUI (Terminal User Interface) that shows session vitals as your AI coding agent runs:

  • Context window usage and pressure
  • Current turn and recent activity
  • Tool usage signals
  • Token counts and cost telemetry

Usage

agtrace watch [OPTIONS]

Behavior

Auto-detection

watch can be started before or after your AI coding agent:

  • No active session: Stays in waiting mode (or opens the latest session if available)
  • New session detected: Automatically switches to the new session
  • No restart needed: Keep watch running across multiple agent sessions

Key Features

Live Session Vitals

The dashboard displays:

  • Context Usage: Percentage of context window used, with warnings as you approach compaction
  • Current Turn: The active conversation turn number
  • Recent Activity: Latest tool calls and agent actions
  • Token Telemetry: Input/output tokens and estimated costs

Always-On Monitoring

Keep watch running in a terminal pane or tmux session. It will automatically pick up new sessions without requiring a restart.

See Also

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 47 lines · 0 tokens per session scan A d473785f0207

Subscribe to this mod's changes

watch is a command published in the GitHub repository lanegrid/agtrace (59 stars, last pushed 1mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 295 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.