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
HomeDocsSearch
Search the documentation

169 pages for /session.

Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.

tools Claude Developer Platform · in the page managed-agents/tools …within a [session](https://platform.claude.com/docs/en/managed-agents/sessions). You control which tools are available by specifying them in the agent configuration. Claude Managed Agents also suppo… tools-web-restrictions Claude Developer Platform · in the page managed-agents/tools-web-restrictions …he session's tools](https://platform.claude.com/docs/en/managed-agents/session-operations#updating-the-agent-configuration). 2. Update the agent as well, so that new sessions start with the corrected… vaults Claude Developer Platform · in the page managed-agents/vaults …```bash cURL curl --fail-with-body -sS https://api.anthropic.com/v1/sessions \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: managed-agen… webhooks Claude Developer Platform · in the page managed-agents/webhooks …[multiagent thread](https://platform.claude.com/docs/en/managed-agents/session-threads) opened: an additional agent called by the agent that the session runs is starting work, or the session's [adviso… workflow-runs Claude Developer Platform · in the page managed-agents/workflow-runs …n [session threads](https://platform.claude.com/docs/en/managed-agents/session-threads) that the server creates as the workflow needs them. You follow runs on the session's [event stream](https://plat… overview Claude Developer Platform · in the page release-notes/overview …r terminal](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/sessions-connect). ### September 9, 2026 * For [cache diagnostics](https://platform.claude.com/docs/en/build-with-claude/cache-… How the agent loop works Claude Code CLI · in the page agent-sdk/agent-loop …t modifying the original. See [Session management](/docs/en/agent-sdk/sessions.md) for the full guide on resume, continue, and fork patterns. To resume sessions across stateless containers or serverl… Configure your agent Claude Code CLI · in the page agent-sdk/configuration …rage**: which project a [stored session belongs to](/docs/en/agent-sdk/session-storage.md) To let tools reach files outside the working directory, add paths with `additionalDirectories` (TypeScript)… Track cost and usage Claude Code CLI · in the page agent-sdk/cost-tracking …*: Claude Code saves the session's totals to its [transcript](/docs/en/sessions.md#where-transcripts-are-stored) when the process exits normally and restores them when a later call resumes or forks th… Rewind file changes with checkpointing Claude Code CLI · in the page agent-sdk/file-checkpointing …mment marked Step 3. ## Next steps * **[Sessions](/docs/en/agent-sdk/sessions.md)**: learn how to resume sessions, which is required for rewinding after the stream completes. Covers session IDs, res… Hosting the Agent SDK Claude Code CLI · in the page agent-sdk/hosting …mpt: "Summarize the files in this directory", options: { cwd: "/work/session-a" }, })) { console.log(message); } ``` ```python Python theme={null} import asyncio from claude_agent_sdk import Cla… Observability with OpenTelemetry Claude Code CLI · in the page agent-sdk/observability …several `query()` calls against the same [session](/docs/en/agent-sdk/sessions.md), filter on `session.id` in your backend to see them as one timeline. Claude Code omits the attribute if you set `OTE… Agent SDK overview Claude Code CLI · in the page agent-sdk/overview …across exchanges, resume or fork later | [Sessions](/docs/en/agent-sdk/sessions.md) | | Skills, commands, and memory | Load automatically from your project's `.claude/` and from `~/.claude/`, same as… Agent SDK reference - Python Claude Code CLI · in the page agent-sdk/python …AgentOptions`](#claudeagentoptions). See [Sessions](/docs/en/agent-sdk/sessions.md). ```python theme={null} async def query( *, prompt: str | AsyncIterable[dict[str, Any]], options: Claud… Quickstart Claude Code CLI · in the page agent-sdk/quickstart …stom code before or after tool calls * **[Sessions](/docs/en/agent-sdk/sessions.md)**: build multi-turn agents that maintain context * **[MCP servers](/docs/en/agent-sdk/mcp.md)**: connect to database… Extend agents with skills Claude Code CLI · in the page agent-sdk/skills …by passing its session ID to the [`resume` option](/docs/en/agent-sdk/sessions#resume-by-id). `/clear` is useful in [streaming input mode](/docs/en/agent-sdk/streaming-vs-single-mode.md), where you… Agent SDK reference - TypeScript Claude Code CLI · in the page agent-sdk/typescript …enerating one | | `sessionStore` | [`SessionStore`](/docs/en/agent-sdk/session-storage#the-sessionstore-interface) | `undefined` | Mirror session transcripts to an external backend so another host can… TypeScript SDK V2 session API (removed) Claude Code CLI · in the page agent-sdk/typescript-v2-preview …/en/agent-sdk/typescript) and the [session options](/docs/en/agent-sdk/sessions.md) it accepts. Pass an `AsyncIterable<SDKUserMessage>` for multi-turn conversations, or `options.resume` to continue a… Manage multiple agents with agent view Claude Code CLI · in the page agent-view …ater also appears on its row, including the [generated title](/docs/en/sessions.md#name-your-sessions) the session gets when you [accept a plan](/docs/en/permission-modes.md#review-and-approve-a-plan)… Best practices for Claude Code Claude Code CLI · in the page best-practices …n't have to re-explain the context. Run [`claude --continue`](/docs/en/sessions#resume-a-session) to pick up where you left off, or `claude --resume` to choose from a list. Give sessions descriptive n… Checkpointing Claude Code CLI · in the page checkpointing …while preserving the original session intact, use [`/branch`](/docs/en/sessions#branch-a-session) or `claude --continue --fork-session` instead. ## Common use cases Checkpoints are particularly usef… Use Claude Code with Chrome Claude Code CLI · in the page chrome …e bug tracker at bugs.example.com, create a new issue, and attach logs/session.log to it ``` If Claude refuses to attach a file or an upload fails, check for these causes: * **Permissions**: Claude… Use Claude Code in the cloud Claude Code CLI · in the page claude-code-on-the-web …sion ID: session_01DiUkqY2kzbUbDmW1w96rfi View: https://claude.ai/code/session_01DiUkqY2kzbUbDmW1w96rfi?from=cli&m=0 ``` Pass `--output-format json` for a machine-readable result: `{ok, session_id, u… Explore the .claude directory Claude Code CLI · in the page claude-directory …reads them back | | `~/.claude/debug/`, `~/.claude/plans/`, `~/.claude/session-env/`, `~/.claude/shell-snapshots/`, `~/.claude/backups/` | Nothing user-facing | | `~/.claude/todos/`, `~/.claude/statsi… CLI reference Claude Code CLI · in the page cli-reference …directory, including a [background session that has finished](/docs/en/sessions#resume-a-session); opening finished background sessions requires Claude Code v2.1.257 or later. Skips sessions created w… Configure cloud environments Claude Code CLI · in the page cloud-environments …ll} echo "https://claude.ai/code/${CLAUDE_CODE_REMOTE_SESSION_ID/#cse_/session_}" ``` ### Run tests, start services, and add packages You don't get a shell into the session VM. Claude runs every com… Code Review Claude Code CLI · in the page code-review …Severity | File:Line | Issue | | - | - | - | | 🔴 Important | `src/auth/session.ts:142` | Token refresh races with logout, leaving stale sessions active | | 🟡 Nit | `src/auth/session.ts:88` | `parseExp… Read and request reviews on a pull request Claude Code CLI · in the page code-review-pull-requests …Severity | File:Line | Issue | | - | - | - | | 🔴 Important | `src/auth/session.ts:142` | Token refresh races with logout, leaving stale sessions active | | 🟡 Nit | `src/auth/session.ts:88` | `parseExp… Commands Claude Code CLI · in the page commands …y uses a name you pass, Claude Code applies [a variant of it](/docs/en/sessions#name-your-sessions) instead… Common workflows Claude Code CLI · in the page common-workflows …d to that PR, or paste the PR URL into the [`/resume` picker](/docs/en/sessions#use-the-session-picker) search. Claude Code links the session to the PR when Claude creates it with `gh pr create` or `g… Message your other Claude Code sessions Claude Code CLI · in the page cross-session-messaging …ove a whole conversation or its context, [resume the session](/docs/en/sessions.md#resume-a-session) instead. ## When to use cross-session messaging Use messaging when one of your sessions has somet… Desktop application Claude Code CLI · in the page desktop …Manager](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started-enable-ssh-connections.html): ```text ~/.ssh/config theme={null} Host i-* ProxyCommand sh -c "… Environment variables Claude Code CLI · in the page env-vars …und small/fast-model request that [generates a session title](/docs/en/sessions#name-your-sessions)… Fullscreen rendering Claude Code CLI · in the page fullscreen …text-window.md#what-survives-compaction) session and [resume](/docs/en/sessions.md#what-a-resumed-session-restores) it, scrolling up stops at the `Conversation compacted` row, and your earlier message… Glossary Claude Code CLI · in the page glossary …anscript-viewer). Learn more: [Where transcripts are stored](/docs/en/sessions.md#where-transcripts-are-stored) ### Turn One complete response from Claude within a [session](#session). A turn begin… Keep Claude working toward a goal Claude Code CLI · in the page goal …`--resume` with a session ID, name, or [transcript file path](/docs/en/sessions.md#resume-a-session), and the [session picker](/docs/en/sessions.md#use-the-session-picker). Before v2.1.239, Claude Cod… Run Claude Code programmatically Claude Code CLI · in the page headless …u pass `--continue`, Claude Code opens a [background session](/docs/en/sessions.md#where-the-session-picker-looks) that has finished, but not one that is still running. This example runs a review, the… Hooks reference Claude Code CLI · in the page hooks …session you haven't named can still have a [generated title](/docs/en/sessions.md#name-your-sessions). That title isn't a custom title and doesn't appear in `session_title`. When `source` is `"resum… How Claude Code works Claude Code CLI · in the page how-claude-code-works …he list to other worktrees or projects. See [Manage sessions](/docs/en/sessions.md#use-the-session-picker) for the full list of picker shortcuts and how name resolution works. Claude sees your curren… How Claude remembers your project Claude Code CLI · in the page memory …is used instead. If you set [`CLAUDE_CODE_PROJECT_DIR_NAME`](/docs/en/sessions#name-the-project-directory-yourself) beside `CLAUDE_CONFIG_DIR`, Claude Code uses that name as the `<project>` directory… Monitoring Claude Code CLI · in the page monitoring-usage …ipt. The transcript entry format is [internal to Claude Code](/docs/en/sessions.md#where-transcripts-are-stored) and changes between versions, so a pipeline that joins on these fields can break on any… Choose a permission mode Claude Code CLI · in the page permission-modes …starts a resumed session in, see [permission mode on resume](/docs/en/sessions.md#permission-mode-on-resume). The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and… Configure permissions Claude Code CLI · in the page permissions …n it before. Afterward, Claude Code [finds the moved session](/docs/en/sessions.md#where-the-session-picker-looks) when you run `--resume` from the new directory. As soon as you move, Claude Code app… How Claude Code uses prompt caching Claude Code CLI · in the page prompt-caching …hy `/compact` costs the most when you [resume an old session](/docs/en/sessions.md#resume-a-session). In both the warm and cold cases, the turn after compaction rebuilds the conversation cache for onl… Prompt library Claude Code CLI · in the page prompt-library …arize how it evolved and why', slots: { path: 'internal/auth/session.go' }, src: 'best-practices' }, { id: 'scope-a-change-before', sdlc: 'discover', cat: 'Understand',… Continue local sessions from any device with Remote Control Claude Code CLI · in the page remote-control …sumed conversation starts in, see [permission mode on resume](/docs/en/sessions.md#permission-mode-on-resume). If Remote Control doesn't reconnect, see [Couldn't reconnect to your Remote Control sessi… Automate work with scheduled tasks Claude Code CLI · in the page routines …LMNOPQRSTUVWXYZ", "claude_code_session_url": "https://claude.ai/code/session_01HJKLMNOPQRSTUVWXYZ" } ``` Open the session URL in a browser to watch the run in real time, review changes, or continue… Customize sessions in self-hosted environments Claude Code CLI · in the page self-hosted-environments-configuration …ent-secret-file /etc/claude/environment-secret --exec-path /etc/claude/session-wrapper.sh ``` The runner sets the following in the wrapper's environment: | Variable | Description | | :- | :- | | `CL… Deploy self-hosted environments to production Claude Code CLI · in the page self-hosted-environments-deploy ….anthropic.com/v2/ccr-sessions/*` * `https://api.anthropic.com/v1/code/sessions/*` * `https://api.anthropic.com/v1/code/mcp/*` If tool traffic must stay inside your network, run the equivalent tools… Test self-hosted environments end to end Claude Code CLI · in the page self-hosted-environments-testing …sid=$(printf '%s' "${CLAUDE_CODE_REMOTE_SESSION_ID:-}" | sed 's/^cse_/session_/') [ -n "$sid" ] || exit 0 # last_assistant_message is absent when the final assistant turn had no # text, such as a to…
Feedback