find_agent_session
Search past agent sessions reconstructed from recorded shell commands by prompt, directory, executor, or date to identify which session did the work, then replay its timeline.
Instructions
Search past agent sessions reconstructed from recorded shell commands, by prompt text, directory, executor or date. Use this to discover which session did the work you care about, then replay_agent_session for its timeline. Pick this over list_agent_sessions when the agent's transcript was never captured but its commands were; pick search_commands instead when you want individual commands regardless of session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Only sessions' commands at or after this time: today, yesterday, N minutes ago, N hours ago, N days ago, N weeks ago, YYYY-MM-DD, or an ISO 8601 date-time such as 2026-10-18T10:00:00Z or 2026-10-18T10:00:00+05:30 (no offset means local time) | |
| limit | No | Max rows in this page (default: 10) | |
| before | No | Only sessions' commands at or before this time; a bare date includes that whole day: today, yesterday, N minutes ago, N hours ago, N days ago, N weeks ago, YYYY-MM-DD, or an ISO 8601 date-time such as 2026-10-18T10:00:00Z or 2026-10-18T10:00:00+05:30 (no offset means local time) | |
| detail | No | Add directory, duration, executor and session to each row (default: false) | |
| offset | No | Rows to skip; pass the response's next_offset to page forward | |
| executor | No | Filter by agent name (e.g. claude-code, cursor) | |
| directory | No | Filter to sessions that ran commands in this directory or its subtree | |
| prompt_text | No | Search across the first prompt of each session (substring match) |