Concepts

Session info

Everything lazyagent surfaces per session and where each field comes from.

lazyagent computes a single Session record per conversation, regardless of which agent produced it. The record is shown in the detail panel (TUI and GUI), returned by /api/sessions/{id}, and used as the input to both maintenance subcommands.

The fields

FieldSource
Session IDJSONL / SQLite (per agent)
Working directoryJSONL / SQLite
Git branchJSONL / SQLite
Agent versionJSONL
Model usedJSONL
Is git worktreegit rev-parse at discovery time
Main repo path (if worktree)git worktree
Message count (user / assistant)JSONL / SQLite
Token usage & estimated costJSONL + per-model pricing, when the agent records token counters
Activity sparkline (last N minutes)JSONL entry timestamps
Last file writtenTool call inspection
Recent conversation (last 5 messages)JSONL / SQLite
Last 20 tools usedJSONL / SQLite
Last activity timestampJSONL / SQLite
Custom session name~/.config/lazyagent/session-names.json
Session source (CLI / Desktop)Claude Desktop metadata
Desktop session titleClaude Desktop metadata
Permission mode (Desktop)Claude Desktop metadata
Remote control URLJSONL (Claude bridge_status entries)
Resume commandComputed per agent when available

Custom names

Every session can be renamed (r in TUI or GUI, PUT /api/sessions/{id}/name in the API). Names persist to ~/.config/lazyagent/session-names.json and survive restarts. An empty name resets to the default (agent-assigned) label.

Resume command

For agents that expose a resumable CLI, lazyagent builds the exact shell command that would resume the selected session:

  • Claude Code: claude --resume <session-id>
  • Codex CLI: codex resume <session-id>
  • Amp: amp threads continue <thread-id>
  • pi: pi --session <session-id>
  • OpenCode: opencode -s <id>
  • Kilo: kilo --session=<id>
  • Cursor: cursor-agent --resume="<id>"
  • Kimi Code: kimi --resume <session-id>

Grok CLI does not currently expose a direct resume command that lazyagent can invoke, so Grok sessions omit this field. In the TUI, c copies the command to the clipboard when one exists. The GUI has a copy button next to the command. The API exposes it as resume_command on the session detail response.

Cost estimation

Cost is derived from the token counters already present in the transcript, multiplied by the per-model price list baked into lazyagent. Supported model families include Claude (Opus, Sonnet, Haiku), GPT (4o, 4.1, o1, o3), and Gemini. Unknown models show tokens but no cost. Grok sessions show no per-session token or cost figures because Grok’s local transcript data does not expose an input/output/cache token split.

Costs are estimates — the authoritative number is always your provider’s billing console.