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. 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).

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: the previous page’s last_id (or any container file id); listing resumes strictly after that path.

Example:cfile_b3V0L3JlcG9ydC5jc3Y

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.

first_idstring nullable required
has_moreboolean required

True when another page can be fetched by passing after=last_id; last_id is non-null whenever this is true.

last_idstring nullable required

Cursor for the next page (pass as after). The last entry’s id, except when the page stopped at the per-request scan bound on hidden bookkeeping objects: then it names the scan position and may not appear in data. Null only when has_more is false and data is empty.

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