lazyagent is a terminal TUI app for watching what ai agents are doing. You can inspect projects, sessions, agents, subagents, tools, prompts and outputs in one place.
The TUI is built for day to day observability. You can see which session belongs to which project, which agent or subagent is active, what tool ran, and what happened next.
It also helps you check whether each agent is doing the work that fits its role, so it is easier to spot when a run goes off track.
- Multi-runtime support -- Support Claude, Codex, and OpenCode sessions
- Subagent hierarchy -- See which agents spawned which subagents, displayed as a visual tree.
- Event stream with filtering -- Filter events by type (tool, user, session, system, code) or by agent. Full-text search across event payloads.
- Syntax and diff highlighting -- Code blocks and diffs in event payloads are syntax-highlighted for readability.
lazyagent is still early in development, some breaking changes may happen.
Install from the Homebrew tap with:
brew tap chojs23/homebrew-tap
brew install --cask lazyagentgo install github.com/chojs23/lazyagent/cmd/lazyagent@latestThese commands build the repository through its flake. The binary version comes from the repo VERSION file, while the exact source you install depends on the ref you choose.
Run directly:
nix run github:chojs23/lazyagentInstall into your profile:
nix profile install github:chojs23/lazyagentPin a specific release tag if you want that exact release through Nix:
nix run github:chojs23/lazyagent/v0.2.0
nix profile install github:chojs23/lazyagent/v0.2.0The default github:chojs23/lazyagent form follows the default branch, so use a tag ref when you want a fixed release.
Install the latest release asset into ~/.local/bin:
curl -fsSL https://raw.githubusercontent.com/chojs23/lazyagent/main/scripts/install.sh | shInstall a specific release into a custom directory:
curl -fsSL https://raw.githubusercontent.com/chojs23/lazyagent/main/scripts/install.sh | \
sh -s -- --version v0.2.0 --bin-dir /usr/local/binInstaller options:
--version <tag>orVERSION=<tag>to install a specific release--bin-dir <dir>orBIN_DIR=<dir>to choose the install directory
go build -o ./bin/lazyagent ./cmd/lazyagentlazyagent is usually used through runtime hooks and plugins.
lazyagent init claudeThis updates:
~/.claude/settings.json
It registers lazyagent ingest --runtime claude for these Claude hook events:
PreToolUsePostToolUseSessionStartSessionEndStopSubagentStopNotificationUserPromptSubmit
Existing non lazyagent hooks are preserved.
lazyagent init codexThis updates:
~/.codex/config.toml
~/.codex/hooks.json
It enables features.codex_hooks = true and registers lazyagent ingest --runtime codex --quiet for supported Codex hook events.
lazyagent init opencodeThis writes the OpenCode plugin to:
~/.config/opencode/plugins/lazyagent.ts
Set an environment variable for the plugin if you want:
LAZYAGENT_BINto point at a specificlazyagentbinary
Build the Go binary:
go build -o ./bin/lazyagent ./cmd/lazyagentRun the Go test suite:
go test ./...If you need to work on the maintained OpenCode plugin source directly:
cd plugins/opencode
npm install
npm run buildThe shipping plugin is embedded into the Go binary, so keep the maintained source and embedded copy in sync when you change it.
The interface is divided into five panes.
- Projects -- Lists all projects with their root sessions. Each session shows a runtime indicator:
[C]for Claude,[X]for Codex,[O]for OpenCode. Active sessions display an animated spinner. - Session summary -- Shows metadata for the selected session: runtime, project path, session ID, start time, last event time, and event/agent counts.
- Agents / subagents -- Displays the agent tree for the selected session. Active agents show a spinner.
- Events -- List of events for the selected session. Each row shows the event type, tool name, agent ID, and timestamp.
- Event detail -- Full inspection of the selected event. Shows status indicators, metadata fields, and the event payload.
Main keys:
tab,shift+tabmove between panes1,2,3,4,5jump to a specific panej,kmove through listsg,Gjump to top or bottomctrl+u,ctrl+dmove by half a pageenter,spaceselect the current item/opens searcht,shift+tcycles event type filtersaclears the current agent filter when the agent pane is focusedddeletes the selected project or session from the projects paneDclears events for the selected session treeFtoggles auto follow in the events panerrefreshes data?toggles helpqquits- Hold
shiftwhile dragging to select and copy text
When a non panic internal app error happens, the TUI shows a small toast in the
bottom right for about 5 seconds while also writing the error to
lazyagent.log.
Detail pane keys:
Jtoggles raw JSONeexpands long content blocks
Run the lazyagent:
lazyagentProject grouping is automatic. lazyagent first tries to match sessions by working directory such as cwd or project_dir, then falls back to transcript path information when needed. That means Claude, Codex, and OpenCode sessions from the same worktree are usually grouped under the same project in the TUI.
- Type filter -- Press
tto cycle through: All, User, Message, Code, System, Tool, Session. - Agent filter -- Select an agent in the agents pane to show only that agent's events. Press
ato clear the filter and show all agents again. - Text search -- Press
/and type a pattern to search event payloads.
lazyagent tracks the following event types depending on the runtime.
| Type | Subtypes | Description |
|---|---|---|
| User | UserPromptSubmit |
User sent a prompt |
| Message | -- | AI response output |
| Code | -- | Code-changing actions |
| System | Stop, SubagentStop, StopFailure, Notification, SessionStatus, PermissionReply, TodoUpdate, CommandExecuted, FileEdited, and others |
Agent stop, status, permission, todo, command, and other system events |
| Tool | PreToolUse, PostToolUse, PostToolUseFailure |
Tool execution start, success, or failure |
| Session | SessionStart, SessionEnd, SessionUpdated, SessionDiff |
Session lifecycle |
When a PreToolUse or PostToolUse event involves the Agent tool, lazyagent automatically creates a subagent entry and links subsequent events to it.
Install or refresh runtime hooks and plugins.
Examples:
lazyagent init claude
lazyagent init codex
lazyagent init opencodeRead runtime event payloads from stdin and store them in the database.
This command is normally called by hooks and plugins, not manually.
Examples:
lazyagent ingest --runtime claude
lazyagent ingest --runtime opencode
lazyagent ingest --runtime codex --quietCheck whether the SQLite database can be opened.
lazyagent healthShow build and release metadata.
lazyagent version
lazyagent version --json
lazyagent --versionBy default, lazyagent stores data under:
~/.lazyagent
Default database path(SQLite):
~/.lazyagent/observe.db
Default log path:
~/.lazyagent/lazyagent.log
Supported environment variables:
LAZYAGENT_DATA_DIR- overrides the base data directory
LAZYAGENT_DB_PATH- overrides the database path
- when set, its parent directory also becomes the active data directory for logs
The TUI refresh interval defaults to 1 second.
Bug reports, feature requests, and pull requests are all welcome.
Please see CONTRIBUTING.md for contribution guidance.
