AI agent instructions
AI agent instructions
only_active is sent as false unless the caller says otherwise, and that
is deliberate rather than redundant. GET /functions/{function_id}/runs
now defaults it to false server-side as well, but it used to default to
true: the request model was a bare subclass of the session one, where
“only active” reads sensibly as “list my running sessions” and, for “list
this function’s runs”, was a trap. Hitting the endpoint with no query
parameters returned only the runs executing right now - an empty list for
any function that had finished. That cost us a bug in the anything-api
console, where a function with 15 recorded runs displayed “Nothing has run
this endpoint yet”.
Sending it explicitly pins this method to the documented behaviour against
whichever API version it is talking to, including deployments that predate
the server-side change. Callers who want only in-flight runs pass
only_active: true.
Parameters
FunctionRunListOptions
Default: