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.
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: a container file id from a previous page (typically last_id); listing resumes strictly after that file.
Forward cursor: a container file id from a previous page (typically last_id); listing resumes strictly after that file.
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"
}