claude-esp
Stream Claude Code's thinking, tool calls and subagent activity into a second-terminal TUI, without disturbing the main session.
- Source repo
- phiat/claude-esp
- Stars
- ★ 159
- Last updated
- 12d ago v0.15.0
- FARS reviewed
- Sep 10, 2026 +3 new
- License
- MIT
- Primary language
- Go
- FA score
- 56/100 · Major gaps
At a glance
- How it runs
- Works with
- Platform-specificClaude Code
- Cost
- Free, no paid service needed
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- Run claude in one tmux pane and claude-esp in the other to follow the model's reasoning and tool output while coding, instead of repeatedly pressing Ctrl+O.
- Not a fit if
- Developers who do not use Claude Code — it only reads Claude Code's local transcript files.
- Teams needing remote or multi-host session monitoring; it only reads the local ~/.claude directory.
- Anyone wanting programmatic access to transcript data — it is a TUI viewer, not a library or API.
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-19latest release v0.15.0 (2026-11-19)
- Source review
- 56/100 · Major gaps
What does this agent do, and when should you use it?
claude-esp is a Go terminal UI that mirrors Claude Code's collapsed output — thinking blocks, tool calls, tool results and subagent activity — into a second terminal in real time. Instead of hooking into Claude Code, it reads the JSONL transcripts Claude Code already writes under ~/.claude/projects/<project-path>/<session-id>.jsonl, along with the subagents/ and tool-results/ subdirectories, so the main session is never touched. A watcher built on fsnotify reacts to file changes as they happen, falls back to configurable polling on filesystems without notifications, and debounces bursts within a 50ms window; a parser extracts thinking/tool_use/tool_result records and correlates background tasks with the agents that spawned them. The Bubbletea/Lipgloss interface pairs a session-and-agent tree with a stacked output stream, showing per-agent context as a percentage of the model's max window, cumulative token counters, and inline session events such as compaction boundaries, hook errors and cost summaries. It ships as a single CLI binary (go install or pre-built Linux/macOS/Windows releases) under the MIT license.
claude-esp runs as a standalone CLI (main.go) that never modifies or drives Claude Code. On start it discovers sessions by scanning ~/.claude/projects for <session-id>.jsonl files modified in the last 5 minutes (the window is adjustable with -w), and can also list recent sessions (-l), list active ones (-a), or pin a single session with -s <ID>. internal/watcher watches transcript files with fsnotify (inotify on Linux, kqueue/FSEvents on macOS), debounces writes over a 50ms window, and switches to polling (-p <ms>, default 500) on filesystems such as NFS or some WSL2 cross-FS setups. internal/parser parses each JSONL line, extracts thinking, tool_use and tool_result records, discovers subagent transcripts at subagents/agent-<id>.jsonl and subagents/workflows/<run>/agent-<id>.jsonl, reads agent type labels from .meta.json, and correlates background task output in tool-results/toolu_*.txt with the agent that spawned it. internal/tui renders everything through a Bubbletea model with a tree (tree.go) and a stacked stream (stream.go) styled by Lipgloss, showing per-agent context as a percentage of the model's max window, cumulative input/output tokens, tool durations, and inline session events. Keys t/i/o/x toggle thinking, tool input, tool output and text; space collapses sessions or toggles agents; s solos a selection; -c <dur> auto-collapses idle sessions; -D surfaces the raw type:subtype of any line the parser would otherwise drop.
- Run claude in one tmux pane and claude-esp in the other to follow the model's reasoning and tool output while coding, instead of repeatedly pressing Ctrl+O.
- Debug a complex subagent or Workflow run and see exactly what each Explore or code-reviewer agent did, how long it took, and how much context it used.
- Watch cost during long sessions: the header token counters and session-cost summaries help decide when to compact or switch to a smaller model.
- Investigate hook and permission problems, since hook output and errors, blocked stops, injected context and permission-mode changes are all surfaced inline.
- Keep several Claude Code sessions open and use the tree plus -c 2m so idle sessions collapse and the active one stays in view.
- Review work outside the IDE: list recent sessions with -l, then replay one with -s to read the hidden output it produced.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
go install github.com/phiat/claude-esp@latest
- Config files
~/.claude- Runtime
- Go 1.23
- Install notes cover
- Windows · macOS · Linux
How do you install or deploy this agent?
Install directly with go install (Go 1.23 or later required):
go install github.com/phiat/claude-esp@latestOr clone and build from source:
git clone https://github.com/phiat/claude-esp.git
cd claude-esp
go build -o claude-esp .Optionally copy the binary onto your PATH:
cp claude-esp ~/.local/bin/Pre-built binaries are also published on the Releases page for Linux (amd64, arm64), macOS (amd64, arm64) and Windows (amd64). By default it reads ~/.claude; set the CLAUDE_HOME environment variable to point at a different Claude config directory.
How do you use this agent?
Start Claude Code and the watcher in two terminals (or tmux panes):
# Terminal 1: use Claude Code as usual
claude
# Terminal 2: start the watcher
claude-espCommon command-line options:
claude-esp -a # list active sessions
claude-esp -l # list recent sessions
claude-esp -s 0b773376 # watch one specific session
claude-esp -n # skip history, show new output only
claude-esp -c 2m # auto-collapse sessions idle for 2 minutes
claude-esp -p 200 # poll every 200ms in fallback modeUseful in-TUI keys: t toggles thinking, i tool input, o tool output, x text, a auto-scroll, h hides/shows the tree, tab switches focus between tree and stream, space collapses a session or toggles an agent, s solos, enter loads background task output, q quits.
A recommended tmux layout can be bound to a key:
# Create a two-pane tmux session
tmux new-session -s claude \; \
split-window -h \; \
send-keys 'claude-esp' C-m \; \
select-pane -L \; \
send-keys 'claude' C-mOr add it to .tmux.conf:
bind-key C-c new-window -n claude \; \
send-keys 'claude' C-m \; \
split-window -h \; \
send-keys 'claude-esp' C-m \; \
select-pane -LSafety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
What are this agent's strengths and limitations?
- Real-time fsnotify-based watching (inotify on Linux, kqueue/FSEvents on macOS) with a 50ms debounce and a polling fallback, so it still works on NFS and some WSL2 cross-FS setups — no more Ctrl+O in the main session.
- Automatically discovers subagent transcripts under subagents/ and workflows/ and labels them with agent types (Explore, code-reviewer, …) read from .meta.json, including agents of Workflow runs.
- Unusually deep inline session-event coverage: compaction boundaries, hook output and errors, blocked stops, injected context, LSP diagnostics, cost summaries, prompt-cache misses with reason and extra tokens, and permission-mode changes.
- Per-agent context is shown as a percentage of the model's max window (not the auto-compact threshold), alongside cumulative input/output tokens and tool execution durations.
- A single static Go binary with pre-built Linux/macOS/Windows releases under MIT, plus a multi-session tree with filtering, solo mode and -c auto-collapse.
- Tightly coupled to Claude Code: it parses an undocumented JSONL layout under ~/.claude/projects, so upstream transcript changes can silently drop records (the -D flag exists precisely to surface unparsed line types).
- Terminal-only and local-only: no web UI, daemon, or remote/multi-host monitoring; it sees only the ~/.claude directory on the machine it runs on.
- Requires a second terminal or tmux pane and a manual launch each time; no IDE extension or documented auto-start path.
- Building from source needs Go 1.23+, and the tool is a viewer only — no library or API for programmatic access to the parsed data.
How does this agent compare with similar options?
The README names claude-esp-rs, a Rust port of the same tool, for users who prefer that ecosystem; the built-in alternative is Claude Code's own Ctrl+O toggle, which expands collapsed output inside the main session rather than mirroring it to a second terminal.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| claude-esp This agent | 56 · Major gaps | CLIFree | ★ 159 | 12d ago | Go | Claude Code |
| octo-agent | 73 · Some gaps | CLIFree + model costs | ★ 159 | 2d ago | Go | OpenAI API · Claude API |
| FuXi Terminal AI Coding Agent | 64 · Some gaps | CLIFreemium | ★ 3.2k | 7d ago | Python | OpenAI API · Claude API |
| zot Coding Agent | 58 · Major gaps | CLIFree + model costs | ★ 374 | today | Go | OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
The tool is a read-only observer: it reads JSONL transcripts and tool-result files under ~/.claude and shows no write, delete, or network-egress code, so least_privilege scores 2. However, the README does not warn that transcripts contain full conversation and thinking content or that sensitive data may be displayed in a second terminal, so sensitive_data_handling is only 1. There is no user-confirmation or permission-prompt mechanism, so user_confirmation is 1. The data flow is described in How It Works (file paths, fsnotify, polling), giving data_flow_transparency 2. Dependencies are well-known Go libraries and CI includes govulncheck, so dependency_security is 2. External effects are limited to terminal display, so external_effects is 2. No rollback or recovery notes exist (e.g., impact of the d key removing a session from the tree), so rollback is only 1. Source attribution is limited to README and LICENSE naming phiat, with an unverified publisher, so source_attribution is 1.
README feature claims are broadly consistent with go.mod dependencies and the CI workflow, so self_consistency is 2. Dependencies are publicly available Go modules, so dependency_availability is 2. Source files are not included in the evidence, so error handling and failure messages cannot be verified; failure_messages is only 1.
The README clearly targets interactive Claude Code users and provides tmux layouts and multi-platform binaries, so audience_and_scenarios is 2. Capability boundaries (read-only observation, no interference with the main session) are stated, so capability_boundaries is 2. Invocation is explicit via commands and CLI flags, so trigger_precision is 2. Linux/macOS/Windows plus NFS/WSL2 polling fallback are supported, so environment_fit is 2.
The README is well structured with installation, usage, keybindings, and project layout, so information_architecture is 2. Install notes cover go install, source build, and pre-built binaries, so install_notes is 2. CLI flags and keybindings are stably named, so naming_stability is 2. Examples are plentiful but there is no FAQ, so examples_and_faq is 2. Known limitations are only mentioned in passing (NFS fallback), so known_limitations is only 1. LICENSE is a full MIT text, so license is 3. There is no CHANGELOG and version is only injected via ldflags, so versioning_changelog is only 1. Maintenance responsibility is not stated, so maintenance_responsibility is only 1.
The TUI output includes a tree view, filtering, and auto-scroll, so output_usability is 2. It addresses the real pain of collapsed Claude Code output, so marginal_value is 2. The cost is a single Go binary plus light polling, so cost_benefit is 2.
README claims are traceable to source in principle, but the evidence contains no source files, so claim_traceability is only 1. CI configuration partially corroborates README claims, so cross_source_corroboration is only 1. The README does not separate fact from inference, so fact_inference_separation is only 1.
- The tool reads full conversation transcripts and thinking content under ~/.claude, which may contain sensitive data; use caution in shared terminals or screen recordings.
- Publisher identity is unverified; verify provenance and checksums before installing pre-built binaries.
- Source files are absent from the evidence, so error handling, failure messages, and actual dependency usage cannot be verified.
- There is no CHANGELOG and no stated maintenance responsibility, leaving long-term maintenance and version compatibility uncertain.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
Catches up with Claude Code up to 2.1.327. Fixed - Agents started by the Workflow tool now appear in the tree. Their transcripts live in subagents/workflows/<run>/, one level below where the watcher looked, so they were never found. The run's journal.jsonl is skipped. - Workflow tool calls show the script's meta name, the saved workflow name, or the script path. They were rendered as the whole script (7–10 KB) in raw JSON. …View on GitHub ↗ -
Release notes excerpt
Catches up with Claude Code up to 2.1.308. Fixed - Haiku 5.5 (claude-haiku-5-5) now resolves to its 1M context window. It was falling through to the 200k default, so its per-agent context % read about 5x too high. New stream marker - attachment.auto_mode_exit → session event auto mode exit, pairing with the existing auto mode marker …View on GitHub ↗ -
Release notes excerpt
Catches up with Claude Code 2.1.264–2.1.280. New stream markers - attachment.hook_blocking_error → hook output blocked: <message> when a hook stops Claude from finishing - attachment.hook_non_blocking_error → hook output error (exit N): <stderr> when a hook crashes - attachment.hook_additional_context → hook output with the context a hook injected - system.model_refusal_no_fallback → ── refused: cyber (opus-5[1m]) ── - system.scheduled_task_fire → ── scheduled task: */5 * * * *: <prompt> ── when a cron / /loop job fires …View on GitHub ↗
FAQ
Does it modify my Claude Code session or send extra requests to Claude?
Do I need an extra API key or paid service beyond Claude Code itself?
What happens if a Claude Code update changes the transcript format?
Nothing shows up after launching — where should I look first?
Can it monitor Claude Code sessions on a remote server?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.