Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

files changedmanaged-agents/files

Nearest release: v2.1.239, published 2 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+15added
Lines−14removed
From line 24 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits18to this page, all time

The whole hunk

from line 24, old and new numbered
/
lines
from line 24
2424 ```
2525 
2626 ```bash CLI
27 FILE_ID=$(ant files upload \
28 --file data.csv \
29 --transform id --raw-output)
27 FILE_ID=$(ant files upload --file data.csv --transform id --raw-output)
3028 ```
3129 
3230 ```python Python
from line 69
7169 ```
7270 
7371 ```php PHP
74 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
75 $file = $client->beta->files->upload(
76 FileParam::fromResource(fopen($csvPath, 'r'), filename: 'data.csv', contentType: 'text/csv'),
72 $file = $client->files->upload(
73 file: FileParam::fromResource(fopen($csvPath, 'r'), filename: 'data.csv', contentType: 'text/csv'),
7774 );
7875 echo "File ID: {$file->id}\n";
7976 ```
from line 314
317314 
318315 ```php PHP
319316 $resources = [
320 ['type' => 'file', 'file_id' => 'file_abc123', 'mount_path' => '/data.csv'],
321 ['type' => 'file', 'file_id' => 'file_def456', 'mount_path' => '/config.json'],
322 ['type' => 'file', 'file_id' => 'file_ghi789', 'mount_path' => '/src/main.py'],
317 ['type' => 'file', 'fileID' => 'file_abc123', 'mountPath' => '/data.csv'],
318 ['type' => 'file', 'fileID' => 'file_def456', 'mountPath' => '/config.json'],
319 ['type' => 'file', 'fileID' => 'file_ghi789', 'mountPath' => '/src/main.py'],
323320 ];
324321 ```
325322 
from line 535
538535 
539536## Listing and downloading session files
540537 
541Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) to list files scoped to a session and download them. Filtering by `scope_id` requires the `managed-agents-2026-04-01` beta header, so the list examples use the `beta` files namespace and pass that header explicitly.
538Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) to list files scoped to a session and download them. Files the agent writes to `/mnt/session/outputs/` appear in the list shortly after the agent finishes writing them, sometimes a few seconds after the session goes idle. If an output file you expect is missing, list again after a short delay; once it appears in the list, its upload has finished.
542539 
540Filtering by `scope_id` requires the `managed-agents-2026-04-01` beta header, so the list examples use the `beta` files namespace and pass that header explicitly.
541 
543542<CodeGroup>
544543 ```bash cURL
545544 # List files associated with a session
from line 556
557556 
558557 ```bash CLI
559558 # List files associated with a session
560 ant beta:files list --scope-id sesn_abc123 \
561 --beta managed-agents-2026-04-01
559 ant beta:files list --scope-id sesn_abc123 --beta managed-agents-2026-04-01
562560 
563561 # Download a file
564562 ant files download --file-id "$FILE_ID" --output output.txt
from line 649
651649 ```
652650 
653651 ```php PHP
654 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
655652 // List files associated with a session
656653 $files = $client->beta->files->list(
657654 scopeID: 'sesn_abc123',
658655 betas: ['managed-agents-2026-04-01'],
659656 );
657 foreach ($files->getItems() as $file) {
658 echo "{$file->id} {$file->filename}\n";
659 }
660660 
661661 // Download a file
662 $content = $client->beta->files->download($files->data[0]->id);
662 $content = $client->files->download($files->getItems()[0]->id);
663663 file_put_contents('output.txt', $content);
664664 ```
665665 
from line 696
696696* If you omit `mount_path`, the file is placed at `/mnt/session/uploads/<file_id>`
697697* Parent directories are created automatically
698698* Paths should be absolute (starting with `/`)
699* Files the agent writes to `/mnt/session/outputs/` become available through the Files API, scoped to the session; see [Listing and downloading session files](https://platform.claude.com/docs/en/managed-agents/files#listing-and-downloading-session-files)
699700 
Feedback