List container files
Lists the files in a container, in lexicographic path order. The container id is the canonical id returned in bash/shell tool results; a restarted session is a separate container with its own id. Paginate with limit and after (pass the previous page’s last_id); has_more: true always means the next page is fetchable that way. last_id is the resume cursor: it is the last listed file’s id, except when a page ends at the per-request scan bound on hidden bookkeeping objects, where it names the scan position instead and may not appear in data (which can then be empty).
Path parameters
The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own -r<nonce>-suffixed id. A session-derived id is always sess_ + the sanitized session key, which is not necessarily the raw session id that was sent.
The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own -r<nonce>-suffixed id. A session-derived id is always sess_ + the sanitized session key, which is not necessarily the raw session id that was sent.
Query parameters
Maximum number of files to return (1-1000). Defaults to 100 when absent.
Maximum number of files to return (1-1000). Defaults to 100 when absent.
Forward cursor: the previous page’s last_id (or any container file id); listing resumes strictly after that path.
Forward cursor: the previous page’s last_id (or any container file id); listing resumes strictly after that path.
Response
The files in the container.
Example response
{
"data": [
{
"bytes": 123,
"container_id": "sess_abc123",
"created_at": 1755640000,
"id": "cfile_b3V0L3JlcG9ydC5jc3Y",
"object": "container.file",
"path": "out/report.csv",
"source": "assistant"
}
],
"first_id": "cfile_b3V0L3JlcG9ydC5jc3Y",
"last_id": "cfile_b3V0L3JlcG9ydC5jc3Y",
"object": "list"
}Changes
No recorded changes to this endpoint across all 303 revisions of this API.