Skip to content

illegalstudio/lazyagent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lazyagent

GitHub Downloads License: MIT

A terminal UI for monitoring all running Claude Code instances on your machine — inspired by lazygit, lazyworktree and pixel-agents.

lazyagent

How it works

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

Install

Homebrew

brew tap illegalstudio/tap
brew install lazyagent

Go

go install github.com/nahime0/lazyagent@latest

Build from source

git clone https://github.com/nahime0/lazyagent
cd lazyagent
go build -o lazyagent .

macOS note

On first launch, macOS may block the binary. Go to System Settings → Privacy & Security, scroll down and click Allow Anyway, then run it again.

Usage

lazyagent

Keybindings

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

Roadmap

v0.1 — Core TUI

  • 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

v0.2 — Richer session info (current)

  • 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

v0.3 — HTTP API

  • Embedded HTTP server (--api flag)
  • 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

v0.4 — Hooks & Webhooks

  • 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)

v0.5 — Notifications & integrations

  • 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 notify CLI mode (run headless, only notify)

Future ideas

  • Multi-machine support via shared config / remote API
  • TUI actions: open project in editor, kill session, attach terminal
  • Session history browser (browse past conversations)

About

A lazy TUI for monitoring Claude Code agent sessions

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages