2.13.0-beta.20). Features may change before the next stable release.Switch to stable →ak sessions
ak sessions list
List local Claude Code and Codex sessions associated with registered AgentKit projects.
Use ak sessions list to obtain a finite, newest-first inventory before opening,
tailing, or redacting a transcript.
Usage
ak sessions listThe command accepts no positional arguments.
Options
| Flag | Default | Description |
|---|---|---|
--project <name> | [] | Include only this registered project; repeat the flag to include more projects. |
Shared output flags are described in CLI conventions.
The command never prompts; --yes and --no-interactive do not change its
local reads.
Sources and privacy
The command reads the AgentKit project registry from
~/.agentkit/projects.json, with AGENTKIT_HOME overriding the base directory.
For every selected registry entry, it inspects matching Claude Code JSONL files
under ~/.claude/projects (AGENTKIT_CLAUDE_HOME overrides this root) and
matching Codex JSONL files under CODEX_HOME/sessions or ~/.codex/sessions.
It performs no network request and writes no cache or transcript.
Without --project, only registered projects are considered. An empty registry
returns an empty list rather than discovering unregistered projects. Unsafe or
non-regular session entries are skipped by the source reader.
JSON summaries contain id, project_id, timestamps, message count, model,
duration, file size, and last_message_preview. That preview can contain private
prompt or response text; --json is not a redaction mode.
Examples
ak sessions list
ak sessions list --project myapp --project api --jsonOutput and exit status
Human stdout prints the project, session ID, message count, and start time. JSON
stdout uses kind=sessions.list with data.sessions[] and data.total.
| Exit | Meaning |
|---|---|
0 | Listing completed, including an empty result. |
1 | The registry or a selected session source could not be read. |
2 | Arguments or flags were invalid. |
The command has no preview, apply, force, backup, or recovery step.