Persist sessions to external storage changedagent-sdk/session-storage
Nearest release: v2.1.335, published 8 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 3 Dec 2026 06:14 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 3 Dec 2026 06:37 UTC.
Upstream edited
Recorded here
Lines+1added
Lines−1removed
From line
270
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits15to this page, all time
The whole hunk
from line 270, old and new numbered
/
from line 270
270270
271271If you set `CLAUDE_CONFIG_DIR` to a temp directory and sign in with a [claude.ai login](https://code.claude.com/docs/en/authentication.md#credential-management) or an [`apiKeyHelper`](https://code.claude.com/docs/en/settings-reference#apikeyhelper) in your user `settings.json`, the run fails with `Not logged in`. To authenticate the run, set a long-lived token, set an API key, or copy your config files:
272272
273* **Long-lived token**: if you run the agent yourself under your own Claude subscription, set `CLAUDE_CODE_OAUTH_TOKEN` in `env` to a token from [`claude setup-token`](https://code.claude.com/docs/en/authentication#generate-a-long-lived-token). You can only make model requests with that token, so your [claude.ai connectors](https://code.claude.com/docs/en/mcp.md#use-mcp-servers-from-claude-ai) aren't available in that run.
273* **Long-lived token**: if you run the agent yourself under your own Claude subscription, set `CLAUDE_CODE_OAUTH_TOKEN` in `env` to a token from [`claude setup-token`](https://code.claude.com/docs/en/authentication#generate-a-long-lived-token).
274274* **API key**: set `ANTHROPIC_API_KEY` in `env`.
275275* **Config files**: if you sign in through files in your usual config directory, such as OAuth credentials or an `apiKeyHelper` in your user `settings.json`, copy them into the temp directory.
276276
No line in this hunk matches that.