Agent SDK reference - Python changedagent-sdk/python
Upstream edited this page at 28 Sep 2026 00:41 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 28 Sep 2026 01:07 UTC.
Upstream edited
Recorded here
Lines+13added
Lines−13removed
From line
248
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits32to this page, all time
The whole hunk
from line 248, old and new numbered
/
from line 248
248248
249249#### Return type: `SDKSessionInfo`
250250
251| Property | Type | Description |
252| :-------------- | :------------ | :------------------------------------------------------------------------------ |
253| `session_id` | `str` | Unique session identifier |
254| `summary` | `str` | Display title: custom title, auto-generated summary, or first prompt |
255| `last_modified` | `int` | Last modified time in milliseconds since epoch |
256| `file_size` | `int \| None` | Session file size in bytes (`None` for remote storage backends) |
257| `custom_title` | `str \| None` | Session title: the user-set title, or the auto-generated title when none is set |
258| `first_prompt` | `str \| None` | First meaningful user prompt in the session |
259| `git_branch` | `str \| None` | Git branch at the end of the session |
260| `cwd` | `str \| None` | Working directory for the session |
261| `tag` | `str \| None` | User-set session tag (see [`tag_session()`](#tag_session)) |
262| `created_at` | `int \| None` | Session creation time in milliseconds since epoch |
251| Property | Type | Description |
252| :-------------- | :------------ | :--------------------------------------------------------------------------------------- |
253| `session_id` | `str` | Unique session identifier |
254| `summary` | `str` | Display title: custom title, most recent prompt, auto-generated summary, or first prompt |
255| `last_modified` | `int` | Last modified time in milliseconds since epoch |
256| `file_size` | `int \| None` | Session file size in bytes (`None` for remote storage backends) |
257| `custom_title` | `str \| None` | Session title: the user-set title, or the auto-generated title when none is set |
258| `first_prompt` | `str \| None` | First meaningful user prompt in the session |
259| `git_branch` | `str \| None` | Git branch at the end of the session |
260| `cwd` | `str \| None` | Working directory for the session |
261| `tag` | `str \| None` | User-set session tag (see [`tag_session()`](#tag_session)) |
262| `created_at` | `int \| None` | Session creation time in milliseconds since epoch |
263263
264264#### Example
265265
from line 3471
34713471<Warning>
34723472 Commands running with `dangerouslyDisableSandbox: True` have full system access. Ensure your `can_use_tool` handler validates these requests carefully.
34733473
3474 If `permission_mode` is set to `bypassPermissions` and `allow_unsandboxed_commands` is enabled, the model can autonomously execute commands outside the sandbox without approval prompts, apart from the [actions no mode auto-approves](/docs/en/permission-modes#actions-no-mode-auto-approves). This combination effectively allows the model to escape sandbox isolation silently.
3474 If `permission_mode` is set to `bypassPermissions` and `allowUnsandboxedCommands` is enabled, the model can autonomously execute commands outside the sandbox without approval prompts, apart from the [actions no mode auto-approves](/docs/en/permission-modes#actions-no-mode-auto-approves). This combination effectively allows the model to escape sandbox isolation silently.
34753475</Warning>
34763476
34773477## See also
No line in this hunk matches that.