list_recent_sessions
Retrieve recent coding-agent sessions with details like repo, git branch, timestamps, message count, and token cost. Filter by repo substring to narrow results.
Instructions
List recent coding-agent sessions, newest first.
Discovers session logs under the configured log root (default
~/.claude/projects/) and returns up to limit sessions
(default 20, max 200), most-recently-active first. Each entry
includes the session id, repo/cwd, git branch, start/end
timestamps, message count, schema-verification status, and a
token/cost usage rollup (total tokens, estimated cost, cost
status, and the main-vs-sidechain split). Pass repo to filter
to sessions whose cwd/repo directory name contains that substring.
Read-only; never writes to or modifies the underlying log files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |