AgentKit
ReferenceCLI commands
BetaYou are reading docs for the beta channel (2.4.1-beta.1) — updated automatically on every beta release.Switch to stable →

CLI commands

ak sessions list

List Claude Code sessions for registered projects

Returns a finite snapshot of Claude Code session JSONL files for registered AgentKit projects.

Who it's for: Reviewers, scripts, and AI agents that need desktop Sessions evidence without opening the UI.

When to use it: Use before sharing, redacting, or inspecting local Claude Code session transcripts.

What changes on disk: Read-only. Reads ~/.agentkit/projects.json and ~/.claude/projects//.jsonl; AGENTKIT_HOME and AGENTKIT_CLAUDE_HOME override those roots.

Usage

ak sessions list [flags]

Examples

ak sessions list --json
ak sessions list --project myapp --json

Flags

FlagDescription
-h, --helphelp for list
--jsonEmit machine-readable JSON (implies --no-interactive)
--no-interactiveDisable interactive prompts (CI-safe)
--project stringArrayProject name to list; repeatable
-q, --quietSuppress non-error output on stderr
-V, --verboseExtra diagnostic output on stderr (loses to --quiet)
-y, --yesAssume yes for all prompts

Output modes

ModeBehavior
prettydefault on TTY (colors, ASCII markers)
plainauto when stdout piped or --no-interactive
json--json (single-object envelope, NDJSON-safe)

Exit codes

CodeMeaning
0success
1runtime error
2invalid flags
3user-cancel (SIGINT, prompt-cancel)
  • ak sessions — Inspect and maintain local coding-agent sessions

On this page