Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Persist sessions to external storage changedagent-sdk/session-storage

Upstream edited this page at 10 Oct 2026 17:34 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 22 Oct 2026 18:07 UTC.

Upstream edited
Recorded here
Lines+4added
Lines−4removed
From line 310 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits10to this page, all time

The whole hunk

from line 310, old and new numbered
/
lines
from line 310
310310 
311311The SDK never deletes from your store on its own. Retention is the adapter's responsibility: use your backend's expiry or lifecycle mechanism, or run scheduled cleanup, according to your compliance requirements.
312312 
313Local transcripts under `CLAUDE_CONFIG_DIR` are swept independently by the `cleanupPeriodDays` setting, following the [retention sweep rules](/docs/en/claude-directory#cleaned-up-automatically). A run [resumed from the store](#resume-from-the-store) leaves no local transcript, so for those runs your store's retention is the only retention there is.
313Local transcripts under `CLAUDE_CONFIG_DIR` are swept independently by the `cleanupPeriodDays` setting, following the [retention sweep rules](/docs/en/claude-directory.md#cleaned-up-automatically). A run [resumed from the store](#resume-from-the-store) leaves no local transcript, so for those runs your store's retention is the only retention there is.
314314 
315315## Supported on
316316 
from line 328
328328* [`listSubagents()`](/docs/en/agent-sdk/typescript)
329329* [`getSubagentMessages()`](/docs/en/agent-sdk/typescript)
330330 
331In the Python SDK, set `session_store` in [`ClaudeAgentOptions`](/docs/en/agent-sdk/python#claudeagentoptions) to run `query()` against a store. The remaining operations each have a store-backed Python function that takes the store as an argument: `list_sessions_from_store()`, `get_session_info_from_store()`, `get_session_messages_from_store()`, `list_subagents_from_store()`, `get_subagent_messages_from_store()`, `rename_session_via_store()`, `tag_session_via_store()`, `delete_session_via_store()`, and `fork_session_via_store()`. `startup()` has no Python equivalent. The standalone functions documented in the [Python SDK reference](/docs/en/agent-sdk/python#functions), such as `list_sessions()`, read local session files.
331In the Python SDK, set `session_store` in [`ClaudeAgentOptions`](/docs/en/agent-sdk/python#claudeagentoptions) to run `query()` against a store. The remaining operations each have a store-backed Python function that takes the store as an argument: `list_sessions_from_store()`, `get_session_info_from_store()`, `get_session_messages_from_store()`, `list_subagents_from_store()`, `get_subagent_messages_from_store()`, `rename_session_via_store()`, `tag_session_via_store()`, `delete_session_via_store()`, and `fork_session_via_store()`. `startup()` has no Python equivalent. The standalone functions documented in the [Python SDK reference](/docs/en/agent-sdk/python.md#functions), such as `list_sessions()`, read local session files.
332332 
333333## Related resources
334334 
335* [Work with sessions](/docs/en/agent-sdk/sessions): Continue, resume, and fork without a custom store
336* [Host the SDK](/docs/en/agent-sdk/hosting): Deployment patterns for multi-host environments
335* [Work with sessions](/docs/en/agent-sdk/sessions.md): Continue, resume, and fork without a custom store
336* [Host the SDK](/docs/en/agent-sdk/hosting.md): Deployment patterns for multi-host environments
337337* [TypeScript `Options`](/docs/en/agent-sdk/typescript#options): Full option reference
338338* [Reference implementations](#reference-implementations): Runnable example adapters for an object store, a key-value store, and a database, in both SDK repositories
339339 
Feedback