The whole hunk
from line 54, old and new numbered
/
lines
from line 54
5454
5555Pass the rubric as inline text on `user.define_outcome` (see [Create a session with an outcome](https://platform.claude.com/docs/en/managed-agents/define-outcomes#create-a-session-with-an-outcome)), or upload it through the Files API for reuse across sessions.
5656
57<Note>
58 Uploading through the Files API doesn't require a beta header. The cURL example sends the `managed-agents-2026-04-01` header it uses throughout this walkthrough, which the Files API also accepts.
59</Note>
60
6157<CodeGroup>
6258 ```bash cURL
6359 rubric=$(curl -fsSL https://api.anthropic.com/v1/files \
from line 238
242238 ```
243239
244240 ```php PHP
241 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
245242 use Anthropic\Client;
246243 use Anthropic\Core\FileParam;
247244
from line 712
715712
716713## Retrieve deliverables
717714
718The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Once the session is idle, fetch them through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) scoped to the session.
715The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Once the session is idle, fetch them through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) scoped to the session. Filtering by `scope_id` requires the `managed-agents-2026-04-01` beta header on the list request, so the SDK and CLI examples make that call through the `beta` namespace and pass the header explicitly.
719716
720<Note>
721 Filtering by `scope_id` requires the `managed-agents-2026-04-01` beta header on the list request, so the SDK and CLI examples make that call through the `beta` namespace and pass the header explicitly. Downloading a file by ID needs no beta header.
722</Note>
723
724717<CodeGroup>
725718 ```bash cURL
726719 # List files produced by this session
from line 858
865858 ```
866859
867860 ```php PHP
861 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
868862 // List files produced by this session
869863 // scope_id filtering requires the managed-agents beta on the files request
870864 $files = $client->beta->files->list(scopeID: $session->id, betas: ['managed-agents-2026-04-01']);