2.13.0-beta.20). Features may change before the next stable release.Switch to stable →ak sessions
ak sessions
Choose a local session inspection, analytics, streaming, or credential-redaction workflow.
Use ak sessions to discover the commands that inspect and maintain local
coding-agent session data.
Usage
ak sessionsThe parent command has no positional arguments or command-specific flags. It shows subcommand help and does not read, rewrite, or send session data itself. Shared flags are described in CLI conventions.
Choose a subcommand
| Goal | Command | Important effect |
|---|---|---|
| Inventory registered projects' sessions | ak sessions list | Reads local project and transcript files. |
| Read one transcript page | ak sessions show <project> <session-id> | Can expose prompts, thinking, tool inputs, and tool output. |
| Aggregate bounded local metrics | ak sessions stats | May write a disposable analytics cache. |
| Follow newly appended messages | ak sessions tail <project> <session-id> | Streams until cancelled; no historical backfill. |
| Find or replace known credential patterns | ak sessions redact | Dry-run by default; apply requires --apply --yes and creates backups. |
These workflows are local except for effects triggered independently by tools that consume their output. The parent command never prompts and has no preview, apply, force, backup, or recovery behavior of its own.
Privacy boundary
Session transcripts can contain source code, prompts, model reasoning, command
output, file paths, email addresses, and credentials. list includes a short
message preview in JSON, while show and tail expose message content. Keep
structured output local unless you have reviewed and redacted it.
Credential redaction is best-effort pattern matching, not proof that a transcript is safe to publish. Review the resulting files before sharing them.
Output and exit status
Running the parent prints help. Subcommands define their own human, JSON, and
stream contracts. Their runtime failures normally exit 1; argument and flag
errors exit 2. Flag-parse errors can remain plain text even with --json.