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

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 every supported agent, lazyagent builds the exact shell command that would resume the selected session:

  • Claude Code: claude --resume <session-id> --cwd <cwd>
  • Codex CLI: codex resume <session-id>
  • Amp: amp thread continue <thread-id>
  • pi: pi agent resume <session-id>
  • OpenCode: opencode --session <id>
  • Cursor: opens in Cursor IDE via the cursor CLI (if installed)

In the TUI, c copies the command to the clipboard. 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.

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