Containers

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.

get/containers/{container_id}/files

Path parameters

container_idstring required

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.

Example:sess_abc123

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

limitinteger

Maximum number of files to return (1-1000). Defaults to 100 when absent.

Example:100

Maximum number of files to return (1-1000). Defaults to 100 when absent.

afterstring

Forward cursor: a container file id from a previous page (typically last_id); listing resumes strictly after that file.

Example:cfile_b3V0L3JlcG9ydC5jc3Y

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.

first_idstring nullable required
has_moreboolean required

True when another page can be fetched by passing after=last_id.

last_idstring nullable required
object'list' required

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