A terminal UI for monitoring all running Claude Code instances on your machine — inspired by lazygit, lazyworktree and pixel-agents.
lazyagent watches Claude Code's JSONL transcript files (~/.claude/projects/*/) to determine what each session is doing. No modifications to Claude Code are needed — it's purely observational.
From the JSONL stream it detects activity states with color-coded labels:
- idle — Session file exists but no recent activity
- waiting — Claude responded, waiting for your input (with 10s grace period to avoid false positives)
- thinking — Claude is generating a response
- compacting — Context compaction in progress
- reading / writing / running / searching / browsing / spawning — Tool-specific activities
It also surfaces:
| Info | Source |
|---|---|
| Working directory | JSONL |
| Git branch | JSONL |
| Claude version | JSONL |
| Model used | JSONL |
| Is git worktree | git rev-parse |
| Main repo path (if worktree) | git worktree |
| Message count (user/assistant) | JSONL |
| Last file written | JSONL |
| Recent conversation (last 5 messages) | JSONL |
| Last 20 tools used | JSONL |
| Last activity timestamp | JSONL |
brew tap illegalstudio/tap
brew install lazyagentgo install github.com/nahime0/lazyagent@latestgit clone https://github.com/nahime0/lazyagent
cd lazyagent
go build -o lazyagent .On first launch, macOS may block the binary. Go to System Settings → Privacy & Security, scroll down and click Allow Anyway, then run it again.
lazyagent
| Key | Action |
|---|---|
↑ / k |
Move up / scroll up (detail) |
↓ / j |
Move down / scroll down (detail) |
tab |
Switch focus between panels |
+ / - |
Adjust time window (±10 minutes) |
f |
Cycle activity filter |
/ |
Search sessions by project path |
r |
Force refresh |
q / ctrl+c |
Quit |
- Discover all Claude Code sessions from
~/.claude/projects/ - Parse JSONL to determine session status
- Detect worktrees
- Show tool history
- FSEvents-based file watcher with debouncing
- Fallback 30s polling
- Conversation preview in detail panel (last 5 messages, User/AI labels)
- Last file written with age
- Filter sessions by activity type
- Search sessions by project path
- Time window control (show last N minutes)
- Color-coded activity states with grace periods
- Memory-efficient single-pass JSONL parsing
- Display file diff for last written file
- Embedded HTTP server (
--apiflag) -
GET /sessions— JSON list of all sessions -
GET /sessions/:id— Full session detail -
GET /sessions/:id/events— SSE stream of status changes - Authentication token support
- Claude Code hook integration (read hook output files)
- Outbound webhooks on status changes (e.g. waiting → send Slack notification)
- Configurable via
~/.config/lazyagent/config.yaml - Webhook payload format (session ID, status, project, timestamp)
- macOS native notifications when session needs input
- Linear issue linking (detect issue refs in conversation)
- Desktop menu bar icon (systray) showing active session count
-
lazyagent notifyCLI mode (run headless, only notify)
- Multi-machine support via shared config / remote API
- TUI actions: open project in editor, kill session, attach terminal
- Session history browser (browse past conversations)
