Get Session Resource
Read the details of one resource attached to a session.
Call Create session first and replace the example session ID with its returned ID. Call Add session resource first and replace sesrsc_123 with its returned ID.
/agent/v1/sessions/{session_id}/resources/{resource_id}◐ PartialRequest parameters
session_idstring必填path: Session id (sesn_...), as returned by sessions.create or sessions.list. The same id is also accepted as the session_id query parameter on resource and thread calls, where it must equal the path value.
resource_idstring必填path: Id of a resource attached to the session, as returned by sessions.resources.add or sessions.resources.list.
session_idstring必填query: Session id (sesn_...), as returned by sessions.create or sessions.list. The same id is also accepted as the session_id query parameter on resource and thread calls, where it must equal the path value.
Returns
200
Supports persistence, retrieval and removal of file resource references, up to 500 per session. Files must be live and owned by the current tenant. Paths default to /mnt/session/uploads/<file_id>; custom paths are rooted there and parent traversal is rejected. File content is immutable through this API. Sandbox synchronization is not implemented in this batch.
Errors follow the Anthropic error format (type / message / request_id) — see error codes
Response
HTTP 200
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Resource id, the resource_id of sessions.resources calls. |
| created_at | string | A timestamp in RFC 3339 format |
| mount_path | string | null | string | Path inside the machine where the file is mounted; defaults to /mnt/session/uploads/<file_id>, and custom paths are rooted there. / Filesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only. |
| type | string | Always `github_repository`. A GitHub repository resource; not supported on this platform. / Always `file`. A file resource: an uploaded file mounted into the session's machine. / Always `memory_store`. A memory store resource; not supported on this platform. |
| updated_at | string | A timestamp in RFC 3339 format |
| url | string | Repository URL. |
| checkout | null | object | Branch or commit to check out. |
| checkout.name | string | Branch name to check out. |
| checkout.type | string | Always `branch`. Check out the named branch. / Always `commit`. Check out the commit with the given SHA. |
| checkout.sha | string | Full commit SHA to check out. |
| file_id | string | Id of the uploaded file; it must exist and belong to your tenant. |
| memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
| access | null | string | Access mode for an attached memory store. |
| description | string | Description of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description. |
| instructions | null | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
| name | null | string | Display name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource. |