Concepts

Supported agents

Every agent lazyagent can monitor, where it reads session data from, and the per-agent quirks you should know about.

lazyagent supports ten agent sources out of the box. Each has a dedicated provider that knows the agent’s on-disk layout.

AgentPathFormatPrefix
Claude Code CLI~/.claude/projects/*/JSONL
Claude Code Desktop~/.claude/projects/*/ + ~/Library/Application Support/Claude/claude-code-sessions/JSONL + JSON sidecarD
Cursor~/Library/Application Support/Cursor/User/globalStorage/state.vscdbSQLiteC
Codex CLI~/.codex/sessions/YYYY/MM/DD/*.jsonl + ~/.codex/session_index.jsonlJSONLX
Amp CLI~/.local/share/amp/threads/*.jsonPer-thread JSONA
pi coding agent~/.pi/agent/sessions/*/JSONLπ
OpenCode~/.local/share/opencode/opencode.dbSQLiteO
Kilo~/.local/share/kilo/kilo.dbSQLiteL
Grok CLI~/.grok/sessions/<encoded-cwd>/<uuid>/Directory per session (JSONL + JSON)G
Kimi Code CLI~/.kimi-code/sessions/wd_<name>_<hash>/<session-id>/ + ~/.kimi-code/session_index.jsonlDirectory per session (JSONL + JSON)K

The prefix appears next to each session in the TUI list, the GUI panel, and the API response so you can tell at a glance which agent produced a session.

Selecting a subset

Use --agent to scope the scan:

lazyagent --agent claude    # Claude Code CLI + Desktop
lazyagent --agent cursor
lazyagent --agent codex
lazyagent --agent amp
lazyagent --agent pi
lazyagent --agent opencode
lazyagent --agent kilo
lazyagent --agent grok
lazyagent --agent kimi
lazyagent --agent all       # default

You can also enable/disable agents permanently via the agents block in config.json. A disabled agent is skipped even when --agent all is active.

Per-agent notes

Claude Code (CLI and Desktop)

Both modes share the same ~/.claude/projects/<encoded-cwd>/*.jsonl files. Desktop adds a metadata sidecar (title, permission mode, creation time) under ~/Library/Application Support/Claude/claude-code-sessions/local_*.json. lazyagent reads both and merges them: Desktop sessions get the D prefix and their custom title.

Extra Claude base directories (e.g. when CLAUDE_CONFIG_DIR points elsewhere) can be added via claude_dirs.

Cursor

Cursor stores everything in a single SQLite database (state.vscdb) as key-value entries: composerData:<id> for session metadata and bubbleId:<id>:<bubble> for message blocks. lazyagent polls this file every 3 seconds (no file watcher — WAL-mode writes don’t trigger fsevents cleanly) and invalidates its cache based on journal position.

CWD is inferred from the Cursor workspace URI if available, otherwise from the first file path mentioned in the session.

Usage limits. The separate lazyagent limits command also reports Cursor’s monthly usage-based (API) spend against the plan’s included credit. It reuses the same state.vscdb — reading the cursorAuth/accessToken session token and cursorAuth/stripeMembershipType plan — and queries the Cursor dashboard’s usage endpoint. Only the metered API pool is reported, not the unlimited Auto/Composer pool. See Show rate-limit usage.

Codex CLI

Codex writes one JSONL per session under ~/.codex/sessions/YYYY/MM/DD/. A separate ~/.codex/session_index.jsonl carries the user-chosen thread names, which lazyagent joins into the session list.

Amp CLI

Amp keeps a JSON blob per thread under ~/.local/share/amp/threads/*.json. Newer Amp versions no longer write this locally — they sync from the server on demand. lazyagent works around this by running amp threads export every 15 seconds, diffing the result, and refreshing the local cache so you still see live threads.

pi coding agent

Pi writes JSONL into ~/.pi/agent/sessions/--<encoded-cwd>--/. The encoding is pi’s own (path separators → -, surrounding --). lazyagent reverses it to surface the original CWD in the UI.

OpenCode

OpenCode uses SQLite with relational tables (session, message, part). lazyagent polls every 3 seconds and detects sub-agents via parent_id. Tool names are normalized to the same activity taxonomy as the other agents.

Kilo

Kilo’s CLI stores sessions in an OpenCode-compatible SQLite database at ~/.local/share/kilo/kilo.db. lazyagent reuses the OpenCode SQLite parser, polls every 3 seconds, detects sub-agents via parent_id, and normalizes tool names into the shared activity taxonomy. The KILO_DATA_DIR environment variable can override the data directory.

Grok CLI

Grok writes one directory per session, two levels deep under ~/.grok/sessions/<url-encoded-cwd>/<session-uuid>/. Each session directory holds a summary.json (metadata), a chat_history.jsonl (transcript), an updates.jsonl stream, and several smaller files. lazyagent reads summary.json plus chat_history.jsonl and decodes the cwd from the standard URL percent-encoding of the parent directory name.

No per-session cost. Grok’s on-disk data does not expose an input/output/cache token split, so Grok sessions show no per-session token or cost figures in any interface — those fields are left at zero. (The separate lazyagent limits command still reports Grok’s monthly billing window; that uses Grok’s billing API, not on-disk session data.)

Subagent sessions (session_kind: "subagent" in summary.json) are treated as sidechains and hidden from the default list, the same as Claude’s sub-agent sessions.

Kimi Code CLI

Kimi writes one directory per session under ~/.kimi-code/sessions/wd_<name>_<hash>/<session-id>/. lazyagent resolves each session’s working directory through ~/.kimi-code/session_index.jsonl, which maps every session directory to its absolute CWD.

Each session directory carries its main agent’s event stream at agents/main/wire.jsonl (subagents live under agents/<id>/wire.jsonl) plus state.json (title and session metadata). lazyagent reads wire.jsonl for activity state, tool calls, recent messages, timestamps, and token counters, and also uses it to power lazyagent search.

Two on-disk encodings coexist: sessions imported from the legacy kimi-cli materialize the whole conversation as context.append_message events, while native kimi-code sessions stream assistant content, tool calls and token usage through context.append_loop_event / usage.record events. lazyagent parses both.

Kimi’s local token counters include input, cache-read, cache-creation, and output tokens, so lazyagent shows token totals. Cost is only estimated when the model name matches a known pricing entry.

What’s not supported (yet)

  • Roo Code, Continue, Cline, Aider, and other agents with their own storage layouts — send an issue or PR with the on-disk format and we’ll add a provider.
  • The destructive maintenance commands intentionally omit Cursor, OpenCode, and Kilo (third-party SQLite databases) and Amp (remote-resynced local files). Kimi is covered by both prune and compact; compaction rewrites its session JSONL files and nested subagent outputs while leaving metadata and prompts intact. See Prune and Compact for the reasoning.