history
const url = 'https://example.com/v1/history?outcome=approved&type=text&has=attachments&kind=command';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/history?outcome=approved&type=text&has=attachments&kind=command'Resolved requests, newest resolution first, with cursor pagination. history.keep_days/max_requests and best-effort history.max_bytes bound retained requests; history.files_keep_days can expire files while keeping history.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Next_cursor of the previous page
Page size, default 50, maximum 500
How a resolved request ended, as history shows it. auto is a rule or
YOLO-mode decision; expired includes timeouts that auto-approved (on_timeout: approve).
Approved, denied, expired, cancelled, or auto (rule or YOLO decision)
Only requests with a preview of this type
Grouped history preview filter.
Attachments: any file, files, image, pdf, audio, or video preview
Request kind: command, edit, review, question, or custom
Case-insensitive search in title, summary, and cwd
Responses
Section titled “Responses”Retention for resolved requests (decision history). The daemon prunes at start and hourly; 0 disables a cap. Pending requests are never pruned.
object
Delete resolved requests older than this many days (0 = no age cap).
Keep at most this many resolved requests (0 = no count cap).
Best-effort live database/WAL/blob byte cap, excluding free database pages (0 = unlimited).
Remove files belonging only to resolutions older than N days (0 = request lifetime).
Example
{ "keep_days": 90, "max_requests": 2000, "max_bytes": 0, "files_keep_days": 0}Invalid filter or cursor