recent_commands
Retrieve past shell commands, newest first, optionally scoped to a directory or executor to see what just happened.
Instructions
The most recently recorded commands, newest first, optionally scoped to a directory or executor. Good for 'what just happened here'. For 'what is this session doing' call resolve_current_agent_session first — recent_commands has no notion of which session is yours and will happily return another project's work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Only 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: 20) | |
| 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 executor (e.g. claude-code, cursor) | |
| directory | No | Filter to commands run in this directory |