{"parentUuid":null,"isSidechain":true,"promptId":"32314f2e-62a5-43e9-b469-ea1a64ebd693","agentId":"aa19a86d514b7f8bd","type":"user","message":{"role":"user","content":"Frage zu Claude Code CLI: Wie ist der Scope des Session-Pickers bei `claude --resume` bzw. dem `/resume`-Befehl?\n\nKonkret: Zeigt der Resume-Picker nur die Sessions des aktuellen Arbeitsverzeichnisses (cwd), oder alle Sessions im gesamten Config-Dir (CLAUDE_CONFIG_DIR) über alle Projekte hinweg?\n\nSessions werden gespeichert unter `<config-dir>/projects/<encoded-cwd>/*.jsonl`. Ich muss wissen:\n1. Filtert `--resume` / `/resume` die Auswahl nach dem aktuellen cwd-Bucket, oder listet es projekt-/config-dir-weit alle Buckets?\n2. Gibt es eine CLI-Flag oder Config-Option, um den Resume-Picker auf das aktuelle Projektverzeichnis (cwd) zu beschränken?\n3. Falls es config-dir-weit ist: Ist das dokumentiertes/erwartetes Verhalten oder versionsabhängig?\n\nBitte präzise und mit Quellenangabe (Doku-URL) antworten. Nur die Fakten, keine Einleitung."},"uuid":"2c6b38ee-ca8c-4375-ae28-0546884a85b0","timestamp":"2026-07-09T06:44:31.019Z","userType":"external","entrypoint":"cli","cwd":"/home/marcuh/claude-projects/ai-control","sessionId":"8fdc96f6-e540-4d59-bd12-3ce8764bcf18","version":"2.1.205","gitBranch":"main"}
{"parentUuid":"2c6b38ee-ca8c-4375-ae28-0546884a85b0","isSidechain":true,"agentId":"aa19a86d514b7f8bd","message":{"model":"claude-haiku-4-5-20251001","id":"msg_011Ccr2nMwbZrWxYwPZRsqpu","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"","signature":"EvIFCpMBCA8YAipAILHdTeeCxx9uJyB4nsD5hLkKKVOgVLYl0ohB7nJri2UG5F18QWNNCZz+gOlzCL2RsmPgtxhl3i+O7ATCf2JVwzIZY2xhdWRlLWhhaWt1LTQtNS0yMDI1MTAwMTgAQgh0aGlua2luZ1okNGJkZDE1Y2MtNDcxZS00ZTU2LWJhMWEtM2QzZDViNGYwMTdjEgwxLb1w62I4Mv7+9Z4aDGGRH+gZWkM7ctSuliIwgwyFWRCgiYcRbpdgufmerxr7zLdUkytjfv3b/68dx6USD88511tG7IUdLjE+xpi4KosEtnDabV8DiILP09la/qh22KlolIM3NiOw5sXshxyUU/RvccIz7LvbQxohlJE42oKy6KDPe3KA6OveDYtcGOl0NJAKM4RUhjttFUb8LhPNYiIHI/QgF4nSzF3mlFG3zX5PcG3NooLSagf4s04XxlQ9touFS2E1mr+p3StoiM50NUguSJKnxvVM8Jyg3TrmlH0X5sI6/6dyJL9PbgHyEFpcc/VYDkKtBE90q5W+2RNZpgk/jrknQOAAidG9LwjcuuG8PtIgMFKFL+bsN3yPqxqOHko+zogu6jr/dx0ZeGGgUb0eEkAAf5QUbcLO8r56rwSM3epLOqJQW7sExA86J9pGg7aB7JYYfm4tA64fek03XB/upCGkMoZcW0EIig2wtlg2xp3bV6L+S3fxcaEp2C/VMCN1wfAZcKmXw4GH/OcVg2FkfXyr4A35qCpzs4tgOYBsG1yeLaIZbCaXsFlpB31BFBDvuTfSUZuU5kPknGnWYNtkWrIqG6JhUohcTZMMWYhuovjRX7H4bZrH8auZyrIUDtrOno3DRj5fISx7fI9TOsBFwz3HxrXUpXKkBYH4y19G69lO1+J3mUYCxxt2lR6Vv3RyhFCRrsxHfaHP4kUv5WF7M5OGw/wMpS1+WtOzLf3G9k7qj3UBy9tLqUJFzMzpoSa7jqFJSf3yU8py/gkJ+c14QfQCLxtDYPTRfhgB"}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":10,"cache_creation_input_tokens":13323,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":13323,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011Ccr2nMChPpZoa1qV6Q65e","attributionAgent":"claude-code-guide","type":"assistant","uuid":"e386e8af-4047-4edb-b887-1167e54e1998","timestamp":"2026-07-09T06:44:34.256Z","userType":"external","entrypoint":"cli","cwd":"/home/marcuh/claude-projects/ai-control","sessionId":"8fdc96f6-e540-4d59-bd12-3ce8764bcf18","version":"2.1.205","gitBranch":"main"}
{"parentUuid":"e386e8af-4047-4edb-b887-1167e54e1998","isSidechain":true,"agentId":"aa19a86d514b7f8bd","message":{"model":"claude-haiku-4-5-20251001","id":"msg_011Ccr2nMwbZrWxYwPZRsqpu","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01Hzt8TqdgbCcwHA1sxE3XQi","name":"WebFetch","input":{"url":"https://code.claude.com/docs/en/claude_code_docs_map.md","prompt":"Session picker resume --resume /resume scope cwd working directory config directory"},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":10,"cache_creation_input_tokens":13323,"cache_read_input_tokens":0,"output_tokens":269,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":13323},"inference_geo":"not_available","iterations":[{"input_tokens":10,"output_tokens":269,"cache_read_input_tokens":0,"cache_creation_input_tokens":13323,"cache_creation":{"ephemeral_5m_input_tokens":13323,"ephemeral_1h_input_tokens":0},"type":"message"}],"speed":"standard"},"diagnostics":null},"requestId":"req_011Ccr2nMChPpZoa1qV6Q65e","attributionAgent":"claude-code-guide","type":"assistant","uuid":"5c8e3305-5669-4f6f-877b-f1dc576a366d","timestamp":"2026-07-09T06:44:34.936Z","userType":"external","entrypoint":"cli","cwd":"/home/marcuh/claude-projects/ai-control","sessionId":"8fdc96f6-e540-4d59-bd12-3ce8764bcf18","version":"2.1.205","gitBranch":"main"}
{"parentUuid":"5c8e3305-5669-4f6f-877b-f1dc576a366d","isSidechain":true,"promptId":"32314f2e-62a5-43e9-b469-ea1a64ebd693","agentId":"aa19a86d514b7f8bd","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01Hzt8TqdgbCcwHA1sxE3XQi","type":"tool_result","content":"<persisted-output>\nOutput too large (96.2KB). Full output saved to: /home/marcuh/.config/ai-control/pools/private/projects/-Users-marcus-hinz-claude-projects-ai-control/8fdc96f6-e540-4d59-bd12-3ce8764bcf18/tool-results/toolu_01Hzt8TqdgbCcwHA1sxE3XQi.txt\n\nPreview (first 2KB):\n> ## Documentation Index\n> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt\n> Use this file to discover all available pages before exploring further.\n\n# Claude code docs map\n\n# Claude Code Documentation Map\n\nThis is a comprehensive map of all Claude Code documentation pages with their headings, designed for easy navigation by LLMs.\n\n> **Note:** This file is auto-generated by GitHub Actions. Do not edit manually.\n> Last updated: 2026-07-08 15:13:51 UTC\n\n## Document Structure\n\nThis map uses a hierarchical structure:\n\n* **##** marks documentation groups (e.g., 'Getting started')\n* **###** marks individual documentation pages\n* **Nested bullets** show the heading structure within each page\n* Each page title links to the full documentation\n\n## Getting started\n\n### [overview](https://code.claude.com/docs/en/overview.md)\n\n* Get started\n* What you can do\n* Use Claude Code everywhere\n* Next steps\n\n### [quickstart](https://code.claude.com/docs/en/quickstart.md)\n\n* Before you begin\n* Step 1: Install Claude Code\n* Step 2: Log in to your account\n* Step 3: Start your first session\n* Step 4: Ask your first question\n* Step 5: Make your first code change\n* Step 6: Use Git with Claude Code\n* Step 7: Fix a bug or add a feature\n* Step 8: Test out other common workflows\n* Essential commands\n* Pro tips for beginners\n* What's next?\n* Getting help\n\n### [changelog](https://code.claude.com/docs/en/changelog.md)\n\n* (No headings found)\n\n## Core concepts\n\n### [how-claude-code-works](https://code.claude.com/docs/en/how-claude-code-works.md)\n\n* The agentic loop\n  * Models\n  * Tools\n* What Claude can access\n* Environments and interfaces\n  * Execution environments\n  * Interfaces\n* Work with sessions\n  * Work across branches\n  * Resume or fork sessions\n  * The context window\n    * When context fills up\n    * Manage context with skills and subagents\n* Stay safe with checkpoints and permissions\n  * Undo changes with checkpoints\n  * Control what Claude can do\n...\n</persisted-output>"}]},"uuid":"b2129525-c991-4080-af06-a2bd4c496142","timestamp":"2026-07-09T06:44:35.649Z","toolUseResult":{"bytes":98545,"code":200,"codeText":"OK","result":"> ## Documentation Index\n> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt\n> Use this file to discover all available pages before exploring further.\n\n# Claude code docs map\n\n# Claude Code Documentation Map\n\nThis is a comprehensive map of all Claude Code documentation pages with their headings, designed for easy navigation by LLMs.\n\n> **Note:** This file is auto-generated by GitHub Actions. Do not edit manually.\n> Last updated: 2026-07-08 15:13:51 UTC\n\n## Document Structure\n\nThis map uses a hierarchical structure:\n\n* **##** marks documentation groups (e.g., 'Getting started')\n* **###** marks individual documentation pages\n* **Nested bullets** show the heading structure within each page\n* Each page title links to the full documentation\n\n## Getting started\n\n### [overview](https://code.claude.com/docs/en/overview.md)\n\n* Get started\n* What you can do\n* Use Claude Code everywhere\n* Next steps\n\n### [quickstart](https://code.claude.com/docs/en/quickstart.md)\n\n* Before you begin\n* Step 1: Install Claude Code\n* Step 2: Log in to your account\n* Step 3: Start your first session\n* Step 4: Ask your first question\n* Step 5: Make your first code change\n* Step 6: Use Git with Claude Code\n* Step 7: Fix a bug or add a feature\n* Step 8: Test out other common workflows\n* Essential commands\n* Pro tips for beginners\n* What's next?\n* Getting help\n\n### [changelog](https://code.claude.com/docs/en/changelog.md)\n\n* (No headings found)\n\n## Core concepts\n\n### [how-claude-code-works](https://code.claude.com/docs/en/how-claude-code-works.md)\n\n* The agentic loop\n  * Models\n  * Tools\n* What Claude can access\n* Environments and interfaces\n  * Execution environments\n  * Interfaces\n* Work with sessions\n  * Work across branches\n  * Resume or fork sessions\n  * The context window\n    * When context fills up\n    * Manage context with skills and subagents\n* Stay safe with checkpoints and permissions\n  * Undo changes with checkpoints\n  * Control what Claude can do\n* Work effectively with Claude Code\n  * Ask Claude Code for help\n  * It's a conversation\n    * Interrupt and steer\n  * Be specific upfront\n  * Give Claude something to verify against\n  * Explore before implementing\n  * Delegate, don't dictate\n* What's next\n\n### [features-overview](https://code.claude.com/docs/en/features-overview.md)\n\n* Overview\n* Match features to your goal\n  * Build your setup over time\n  * Compare similar features\n  * Understand how features layer\n  * Combine features\n* Understand context costs\n  * Context cost by feature\n  * Understand how features load\n* Learn more\n\n### [claude-directory](https://code.claude.com/docs/en/claude-directory.md)\n\n* Explore the directory\n* What's not shown\n* Choose the right file\n* File reference\n* Troubleshoot configuration\n* Application data\n  * Cleaned up automatically\n  * Kept until you delete them\n  * Plaintext storage\n  * Clear local data\n* Related resources\n\n### [context-window](https://code.claude.com/docs/en/context-window.md)\n\n* What the timeline shows\n* What survives compaction\n* When your context fills up\n* Check your own session\n* Related resources\n\n### [prompt-caching](https://code.claude.com/docs/en/prompt-caching.md)\n\n* How the cache is organized\n  * Where the cache lives\n* Actions that invalidate the cache\n  * Switching models\n  * Changing effort level\n  * Turning on fast mode\n  * Connecting or disconnecting an MCP server\n  * Enabling or disabling a plugin\n  * Denying an entire tool\n  * Compacting the conversation\n  * Upgrading Claude Code\n* Actions that keep the cache\n  * Editing files in your repository\n  * Editing CLAUDE.md mid-session\n  * Changing output style\n  * Changing permission mode\n  * Invoking skills and commands\n  * Running `/recap`\n  * Rewinding the conversation\n* Cache lifetime\n  * On a Claude subscription\n  * On an API key or third-party provider\n  * Override the TTL\n* Cache scope\n* Check cache performance\n* Subagents and the cache\n* Disable prompt caching\n* Related resources\n\n## Use Claude Code\n\n### [memory](https://code.claude.com/docs/en/memory.md)\n\n* CLAUDE.md vs auto memory\n* CLAUDE.md files\n  * When to add to CLAUDE.md\n  * Choose where to put CLAUDE.md files\n  * Set up a project CLAUDE.md\n  * Write effective instructions\n  * Import additional files\n  * AGENTS.md\n  * How CLAUDE.md files load\n    * Load from additional directories\n  * Organize rules with `.claude/rules/`\n    * Set up rules\n    * Path-specific rules\n    * Share rules across projects with symlinks\n    * User-level rules\n  * Manage CLAUDE.md for large teams\n    * Deploy organization-wide CLAUDE.md\n    * Exclude specific CLAUDE.md files\n* Auto memory\n  * Enable or disable auto memory\n  * Storage location\n  * How it works\n  * Audit and edit your memory\n* View and edit with `/memory`\n* Troubleshoot memory issues\n  * Claude isn't following my CLAUDE.md\n  * I don't know what auto memory saved\n  * My CLAUDE.md is too large\n  * Instructions seem lost after `/compact`\n* Related resources\n\n### [permission-modes](https://code.claude.com/docs/en/permission-modes.md)\n\n* Available modes\n* Switch permission modes\n* Auto-approve file edits with acceptEdits mode\n* Analyze before you edit with plan mode\n  * Review and approve a plan\n  * Set plan mode as the default\n* Eliminate permission prompts with auto mode\n  * Enable auto mode on Bedrock, Agent Platform, or Foundry\n  * What the classifier blocks by default\n  * Boundaries you state in conversation\n  * When auto mode falls back\n* Allow only pre-approved tools with dontAsk mode\n* Skip all checks with bypassPermissions mode\n* Protected paths\n* See also\n\n### [sessions](https://code.claude.com/docs/en/sessions.md)\n\n* Resume a session\n  * Where the session picker looks\n* Name your sessions\n* Use the session picker\n* Branch a session\n* Manage context within a session\n* Export and locate session data\n  * Access conversations from scripts\n  * Where transcripts are stored\n* See also\n\n### [common-workflows](https://code.claude.com/docs/en/common-workflows.md)\n\n* Prompt recipes\n  * Understand new codebases\n    * Get a quick codebase overview\n    * Find relevant code\n  * Fix bugs efficiently\n  * Refactor code\n  * Work with tests\n  * Create pull requests\n  * Handle documentation\n  * Work in notes and non-code folders\n  * Work with images\n  * Reference files and directories\n  * Run Claude on a schedule\n  * Ask Claude about its capabilities\n    * Example questions\n* Resume previous conversations\n* Run parallel sessions with worktrees\n* Plan before editing\n* Delegate research to subagents\n* Pipe Claude into scripts\n* Next steps\n\n### [prompt-library](https://code.claude.com/docs/en/prompt-library.md)\n\n* What makes these prompts work\n* Where these come from\n* Related resources\n\n### [best-practices](https://code.claude.com/docs/en/best-practices.md)\n\n* Give Claude a way to verify its work\n* Explore first, then plan, then code\n* Provide specific context in your prompts\n  * Provide rich content\n* Configure your environment\n  * Write an effective CLAUDE.md\n  * Configure permissions\n  * Use CLI tools\n  * Connect MCP servers\n  * Set up hooks\n  * Create skills\n  * Create custom subagents\n  * Install plugins\n* Communicate effectively\n  * Ask codebase questions\n  * Let Claude interview you\n* Manage your session\n  * Course-correct early and often\n  * Manage context aggressively\n  * Use subagents for investigation\n  * Rewind with checkpoints\n  * Resume conversations\n* Automate and scale\n  * Run non-interactive mode\n  * Run multiple Claude sessions\n  * Fan out across files\n  * Run autonomously with auto mode\n  * Add an adversarial review step\n* Avoid common failure patterns\n* Develop your intuition\n* Related resources\n\n### Platforms and integrations > Claude Code on the web\n\n#### [web-quickstart](https://code.claude.com/docs/en/web-quickstart.md)\n\n* How sessions run\n* Compare ways to run Claude Code\n* Connect GitHub and create an environment\n  * Connect from your terminal\n* Start a task\n* Pre-fill sessions\n* Review and iterate\n* Troubleshoot setup\n  * No repositories appear after connecting GitHub\n  * The page only shows a GitHub login button\n  * \"Not available for the selected organization\"\n  * `/web-setup` shows \"No commands match\" or \"Unknown command\"\n  * \"Could not create a cloud environment\" or \"No cloud environment available\" when using `--cloud` or ultraplan\n  * Setup script failed\n  * New sessions hang or time out during setup\n  * Session keeps running after closing the tab\n* Next steps\n\n#### [claude-code-on-the-web](https://code.claude.com/docs/en/claude-code-on-the-web.md)\n\n* GitHub authentication options\n* The cloud environment\n  * What's available in cloud sessions\n  * Installed tools\n  * Work with GitHub issues and pull requests\n  * Link output back to the session\n  * Run tests, start services, and add packages\n  * Resource limits\n  * Configure your environment\n* Setup scripts\n  * Environment caching\n  * Setup scripts vs. SessionStart hooks\n  * Install dependencies with a SessionStart hook\n* Network access\n  * Access levels\n  * Allow specific domains\n  * GitHub proxy\n  * Security proxy\n  * Default allowed domains\n* Move tasks between web and terminal\n  * From terminal to web\n    * Tips for cloud tasks\n    * Send local repositories without GitHub\n  * From web to terminal\n    * Teleport requirements\n    * `--teleport` is unavailable\n* Work with sessions\n  * Manage context\n  * Review changes\n  * Share sessions\n    * Share from an Enterprise or Team account\n    * Share from a Max or Pro account\n  * Archive sessions\n  * Delete sessions\n* Auto-fix pull requests\n  * How Claude responds to PR activity\n* Security and isolation\n* Troubleshooting\n  * Session creation failed\n  * Remote Control session expired or access denied\n  * Environment expired\n* Limitations\n* Related resources\n\n#### [routines](https://code.claude.com/docs/en/routines.md)\n\n* Example use cases\n* Create a routine\n  * Create from the web\n  * Create from the CLI\n* Configure triggers\n  * Add a schedule trigger\n    * Schedule a one-off run\n  * Add an API trigger\n    * Trigger a routine\n    * API reference\n  * Add a GitHub trigger\n    * Supported events\n    * Filter pull requests\n    * How sessions map to events\n* Manage routines\n  * View and interact with runs\n  * Edit and control routines\n  * Repositories and branch permissions\n  * Connectors\n  * Environments and network access\n* Usage and limits\n* Troubleshooting\n  * `/schedule` shows \"No commands match\" or \"Unknown command\"\n  * \"Routines are disabled by your organization's policy\"\n* Related resources\n\n#### [ultraplan](https://code.claude.com/docs/en/ultraplan.md)\n\n* Launch ultraplan from the CLI\n* Review and revise the plan in your browser\n* Choose where to execute\n  * Execute on the web\n  * Send the plan back to your terminal\n* Related resources\n\n#### [ultrareview](https://code.claude.com/docs/en/ultrareview.md)\n\n* Run ultrareview from the CLI\n* Pricing and free runs\n* Track a running review\n* Run ultrareview non-interactively\n* How ultrareview compares to /code-review and /review\n* Related resources\n\n### Platforms and integrations > Claude Code on desktop\n\n#### [desktop-quickstart](https://code.claude.com/docs/en/desktop-quickstart.md)\n\n* Install\n* Start your first session\n* Now what?\n* Coming from the CLI?\n* What's next\n\n#### [desktop](https://code.claude.com/docs/en/desktop.md)\n\n* Start a session\n* Work with code\n  * Use the prompt box\n  * Add files and context to prompts\n  * Choose a permission mode\n  * Preview your app\n  * Review changes with diff view\n  * Review your code\n  * Monitor pull request status\n* Arrange your workspace\n  * Run commands in the terminal\n  * Open and edit files\n  * Open files in other apps\n  * Switch view modes\n  * Keyboard shortcuts\n  * Check usage\n* Let Claude use your computer\n  * When computer use applies\n  * Enable computer use\n  * App permissions\n* Manage sessions\n  * Work in parallel with sessions\n  * Ask a side question without derailing the session\n  * Watch background tasks\n  * Run long-running tasks remotely\n  * Continue in another surface\n  * Sessions from Dispatch\n* Extend Claude Code\n  * Connect external tools\n  * Use skills\n  * Install plugins\n  * Configure preview servers\n    * Auto-verify changes\n    * Configuration fields\n      * When to use `program` vs `runtimeExecutable`\n    * Port conflicts\n    * Examples\n* Environment configuration\n  * Local sessions\n  * Cloud sessions\n  * SSH sessions\n    * Pre-configure SSH connections for your team\n    * Restrict which SSH hosts users can connect to\n* Enterprise configuration\n  * Admin console controls\n  * Managed settings\n  * Device management policies\n  * Authentication and SSO\n  * Data handling\n  * Deployment\n* Coming from the CLI?\n  * CLI flag equivalents\n  * Shared configuration\n  * Feature comparison\n  * What's not available in Desktop\n* Troubleshooting\n  * Check your version\n  * 403 or authentication errors in the Code tab\n  * Blank or stuck screen on launch\n  * \"Failed to load session\"\n  * Session not finding installed tools\n  * Git and Git LFS errors\n  * MCP servers not working on Windows\n  * App won't quit\n  * Windows-specific issues\n  * \"Branch doesn't exist yet\" when opening in CLI\n  * Still stuck?\n\n#### [desktop-linux](https://code.claude.com/docs/en/desktop-linux.md)\n\n* Requirements\n* Install\n  * Install from a downloaded file\n* Update\n* Uninstall\n* What's not in the Linux beta yet\n\n#### [desktop-scheduled-tasks](https://code.claude.com/docs/en/desktop-scheduled-tasks.md)\n\n* Compare scheduling options\n* Create a scheduled task\n* Schedule options\n* How scheduled tasks run\n* Missed runs\n* Permissions for scheduled tasks\n* Manage scheduled tasks\n* Related resources\n\n### Platforms and integrations > Code review & CI/CD\n\n#### [security-guidance](https://code.claude.com/docs/en/security-guidance.md)\n\n* Prerequisites\n* Install the plugin\n  * Enable in cloud sessions and shared repositories\n* What the plugin checks\n  * On each file edit\n  * At the end of each turn\n  * On each commit or push Claude makes\n  * Review independence and limits\n* Add your own rules\n  * Add guidance for the model-backed reviews\n  * Add custom per-edit patterns\n  * Rule file lookup locations\n* Usage cost\n* Disable or uninstall\n* How the plugin integrates with Claude Code\n* How this fits with other security tools\n* Troubleshooting\n* Related resources\n\n#### [code-review](https://code.claude.com/docs/en/code-review.md)\n\n* How reviews work\n  * Severity levels\n  * Rate and reply to findings\n  * Check run output\n  * What Code Review checks\n* Set up Code Review\n* Manually trigger reviews\n* Customize reviews\n  * CLAUDE.md\n  * REVIEW\\.md\n    * What you can tune\n    * Example\n    * Keep it focused\n* View usage\n* Pricing\n* Troubleshooting\n  * Retrigger a failed or timed-out review\n  * Review didn't run and the PR shows a spend-cap message\n  * Find issues that aren't showing as inline comments\n* Review a diff locally\n* Related resources\n\n#### [github-actions](https://code.claude.com/docs/en/github-actions.md)\n\n* Why use Claude Code GitHub Actions?\n* What can Claude do?\n  * Claude Code Action\n* Setup\n* Quick setup\n* Manual setup\n* Upgrading from Beta\n  * Essential changes\n  * Breaking Changes Reference\n  * Before and After Example\n* Example use cases\n  * Basic workflow\n  * Using skills\n  * Custom automation with prompts\n  * Common use cases\n* Best practices\n  * CLAUDE.md configuration\n  * Security considerations\n  * Optimizing performance\n  * CI costs\n* Configuration examples\n* Using with Amazon Bedrock and Google Cloud\n  * Prerequisites\n    * For Google Cloud's Agent Platform:\n    * For Amazon Bedrock:\n* Troubleshooting\n  * Claude not responding to @claude commands\n  * CI not running on Claude's commits\n  * Authentication errors\n* Advanced configuration\n  * Action parameters\n    * Pass CLI arguments\n  * Alternative integration methods\n  * Customizing Claude's behavior\n\n#### [github-enterprise-server](https://code.claude.com/docs/en/github-enterprise-server.md)\n\n* What works with GitHub Enterprise Server\n* Admin setup\n  * GitHub App permissions\n  * Manual setup\n  * Network requirements\n* Developer workflow\n  * Teleport sessions to your terminal\n* Plugin marketplaces on GHES\n  * Add a GHES marketplace\n  * Pre-register GHES marketplaces with managed settings\n  * Allowlist GHES marketplaces in managed settings\n* Limitations\n* Troubleshooting\n  * Web session fails to clone repository\n  * Marketplace add fails with a policy error\n  * Marketplace add on claude.ai fails with a GitHub access error\n  * GHES instance not reachable\n* Related resources\n\n#### [gitlab-ci-cd](https://code.claude.com/docs/en/gitlab-ci-cd.md)\n\n* Why use Claude Code with GitLab?\n* How it works\n* What can Claude do?\n* Setup\n  * Quick setup\n  * Manual setup (recommended for production)\n* Example use cases\n  * Turn issues into MRs\n  * Get implementation help\n  * Fix bugs quickly\n* Using with Amazon Bedrock and Google Cloud\n* Configuration examples\n  * Basic .gitlab-ci.yml (Claude API)\n  * Amazon Bedrock job example (OIDC)\n  * Agent Platform job example (Workload Identity Federation)\n* Best practices\n  * CLAUDE.md configuration\n  * Security considerations\n  * Optimizing performance\n  * CI costs\n* Security and governance\n* Troubleshooting\n  * Claude not responding to @claude commands\n  * Job can't write comments or open MRs\n  * Authentication errors\n* Advanced configuration\n  * Common parameters and variables\n  * Customizing Claude's behavior\n\n## Platforms and integrations\n\n### [platforms](https://code.claude.com/docs/en/platforms.md)\n\n* Where to run Claude Code\n* Connect your tools\n* Work when you are away from your terminal\n* Related resources\n  * Platforms\n  * Integrations\n  * Remote access\n\n### [remote-control](https://code.claude.com/docs/en/remote-control.md)\n\n* Requirements\n* Start a Remote Control session\n  * Check connection status\n  * Connect from another device\n  * Enable Remote Control for all sessions\n* Connection and security\n* Trusted Devices\n  * Enable Trusted Devices for your organization\n  * What members see\n  * Manage enrolled devices\n* Remote Control vs Claude Code on the web\n* Mobile push notifications\n* Limitations\n* Troubleshooting\n  * \"Remote Control requires a claude.ai subscription\"\n  * \"Remote Control requires a full-scope login token\"\n  * \"Unable to determine your organization for Remote Control eligibility\"\n  * \"Remote Control is not yet enabled for your account\"\n  * \"Couldn't verify Remote Control eligibility\"\n  * \"Remote Control is only available when using Claude via api.anthropic.com\"\n  * \"Remote Control is disabled by your organization's policy\"\n  * \"Remote credentials fetch failed\"\n  * \"Couldn't reconnect to your Remote Control session\"\n  * \"Your organization requires Trusted Devices for Remote Control, but this device is not enrolled\"\n  * \"session expired for trusted-device check\"\n* Choose the right approach\n* Related resources\n\n### [chrome](https://code.claude.com/docs/en/chrome.md)\n\n* Capabilities\n* Prerequisites\n* Get started in the CLI\n  * Enable Chrome by default\n  * Manage site permissions\n  * Browser tools in plan mode\n* Example workflows\n  * Test a local web application\n  * Debug with console logs\n  * Automate form filling\n  * Draft content in Google Docs\n  * Extract data from web pages\n  * Run multi-site workflows\n  * Record a demo GIF\n* Troubleshooting\n  * Extension not detected\n  * Browser not responding\n  * Connection drops during long sessions\n  * Windows-specific issues\n  * Common error messages\n* See also\n\n### [computer-use](https://code.claude.com/docs/en/computer-use.md)\n\n* What you can do with computer use\n* When computer use applies\n* Enable computer use\n* Approve apps per session\n* How Claude works on your screen\n  * One session at a time\n  * Apps are hidden while Claude works\n  * Screenshots are downscaled automatically\n  * Stop at any time\n* Safety and the trust boundary\n* Example workflows\n  * Validate a native build\n  * Reproduce a layout bug\n  * Test a simulator flow\n* Differences from the Desktop app\n* Troubleshooting\n  * \"Computer use is in use by another Claude session\"\n  * macOS permissions prompt keeps reappearing\n  * `computer-use` doesn't appear in `/mcp`\n* See also\n\n### [vs-code](https://code.claude.com/docs/en/vs-code.md)\n\n* Prerequisites\n* Install the extension\n* Get started\n* Use the prompt box\n  * Reference files and folders\n  * Resume past conversations\n  * Resume cloud sessions from Claude.ai\n  * Check account and usage\n* Customize your workflow\n  * Choose where Claude lives\n  * Run multiple conversations\n  * Switch to terminal mode\n* Manage plugins\n  * Install plugins\n  * Manage marketplaces\n* Automate browser tasks with Chrome\n* VS Code commands and shortcuts\n  * Launch a VS Code tab from other tools\n* Configure settings\n  * Extension settings\n* VS Code extension vs. Claude Code CLI\n  * Rewind with checkpoints\n  * Run CLI in VS Code\n  * Switch between extension and CLI\n  * Include terminal output in prompts\n  * Monitor background processes\n  * Connect to external tools with MCP\n* Work with git\n  * Create commits and pull requests\n  * Use git worktrees for parallel tasks\n* Use third-party providers\n* Security and privacy\n  * The built-in IDE MCP server\n* Fix common issues\n  * Extension won't install\n  * Spark icon not visible\n  * Cmd+Esc does nothing on macOS\n  * Claude Code never responds\n* Uninstall the extension\n* Next steps\n\n### [jetbrains](https://code.claude.com/docs/en/jetbrains.md)\n\n* Supported IDEs\n* Features\n* Installation\n* Usage\n  * From your IDE\n  * From external terminals\n* Configuration\n  * Claude Code settings\n  * Plugin settings\n    * General settings\n    * ESC key configuration\n* Special configurations\n  * Remote development\n  * WSL configuration\n    * Allow WSL2 traffic through Windows Firewall\n    * Switch WSL2 to mirrored networking\n* Troubleshooting\n  * Plugin not working\n  * IDE not detected\n  * Command not found\n* Security considerations\n\n### [slack](https://code.claude.com/docs/en/slack.md)\n\n* Use cases\n* Prerequisites\n* Setting up Claude Code in Slack\n* How it works\n  * Automatic detection\n  * Context gathering\n  * Session flow\n* User interface elements\n  * App Home\n  * Message actions\n  * Repository selection\n* Access and permissions\n  * User-level access\n  * Workspace-level access\n  * Channel-based access control\n* What's accessible where\n* Best practices\n  * Writing effective requests\n  * When to use Slack vs. web\n* Troubleshooting\n  * \"Claude Code is not enabled for your account\"\n  * Sessions not starting\n  * Repository not showing\n  * Wrong repository selected\n  * Authentication errors\n  * Session expiration\n* Current limitations\n* Related resources\n\n## Agents and parallel work\n\n### [agents](https://code.claude.com/docs/en/agents.md)\n\n* Choose an approach\n* Check on running work\n* Learn more\n\n### [sub-agents](https://code.claude.com/docs/en/sub-agents.md)\n\n* Built-in subagents\n* Quickstart: create your first subagent\n* Configure subagents\n  * Choose the subagent scope\n  * Write subagent files\n    * Supported frontmatter fields\n  * Choose a model\n  * Control subagent capabilities\n    * Available tools\n    * Restrict which subagents can be spawned\n    * Scope MCP servers to a subagent\n    * Permission modes\n    * Preload skills into subagents\n    * Enable persistent memory\n      * Persistent memory tips\n    * Conditional rules with hooks\n    * Disable specific subagents\n  * Define hooks for subagents\n    * Hooks in subagent frontmatter\n    * Project-level hooks for subagent events\n* Work with subagents\n  * Understand automatic delegation\n  * Invoke subagents explicitly\n  * Run subagents in foreground or background\n  * API errors in subagents\n  * Common patterns\n    * Isolate high-volume operations\n    * Run parallel research\n    * Chain subagents\n  * Choose between subagents and main conversation\n  * Spawn nested subagents\n  * Manage subagent context\n    * What loads at startup\n    * Resume subagents\n    * Auto-compaction\n* Fork the current conversation\n  * Observe and steer running forks\n  * How forks differ from named subagents\n  * Limitations\n* Example subagents\n  * Code reviewer\n  * Debugger\n  * Data scientist\n  * Database query validator\n* Next steps\n\n### [agent-view](https://code.claude.com/docs/en/agent-view.md)\n\n* Quick start\n* Monitor sessions with agent view\n  * Read session state\n  * Row summaries\n  * Pull request status\n  * Peek and reply\n  * Attach to a session\n  * Organize the list\n  * Filter sessions\n  * Keyboard shortcuts\n* Dispatch new agents\n  * From agent view\n    * Dispatch to a specific directory\n  * From inside a session\n  * From your shell\n    * Run a shell command\n  * How file edits are isolated\n  * Set the model\n  * Permission mode, model, and effort\n  * Settings, plugins, and MCP servers\n* Manage sessions from the shell\n* How background sessions are hosted\n  * The supervisor process\n  * Where state is stored\n  * Turn off agent view\n* Troubleshooting\n  * `claude agents` lists subagents instead of opening agent view\n  * Agent view opens with no sessions\n  * Backgrounding shows a `Background this session?` dialog\n  * Prompt rejected as too short\n  * Sessions show as failed after shutdown\n  * Opening a session says the conversation is already open\n  * A session fails before starting with a `possibly low memory` note\n  * Agent view says the background service did not respond\n  * Dispatch fails with `Could not resolve authentication method`\n  * Background sessions can't read Desktop, Documents, or Downloads on macOS\n  * Background sessions can't reach local-network hosts on macOS\n  * A session is slow to respond after attaching\n  * `.claude/worktrees/` is filling up\n* Limitations\n* Related resources\n* Version history\n\n### [agent-teams](https://code.claude.com/docs/en/agent-teams.md)\n\n* When to use agent teams\n  * Compare with subagents\n* Enable agent teams\n* Start your first agent team\n* Control your agent team\n  * Choose a display mode\n  * Specify teammates and models\n  * Require plan approval for teammates\n  * Talk to teammates directly\n  * Assign and claim tasks\n  * Shut down teammates\n  * Enforce quality gates with hooks\n* How agent teams work\n  * How Claude starts agent teams\n  * Architecture\n  * Use subagent definitions for teammates\n  * Permissions\n  * Context and communication\n  * Token usage\n* Use case examples\n  * Run a parallel code review\n  * Investigate with competing hypotheses\n* Best practices\n  * Give teammates enough context\n  * Choose an appropriate team size\n  * Size tasks appropriately\n  * Wait for teammates to finish\n  * Start with research and review\n  * Avoid file conflicts\n  * Monitor and steer\n* Troubleshooting\n  * Teammates not appearing\n  * Too many permission prompts\n  * Teammates stopping on errors\n  * Lead shuts down before work is done\n  * Orphaned tmux sessions\n* Limitations\n* Next steps\n\n### [workflows](https://code.claude.com/docs/en/workflows.md)\n\n* When to use a workflow\n* Run a bundled workflow\n  * Bundled workflows\n  * Watch the run\n* Have Claude write a workflow\n  * Ask for a workflow in your prompt\n  * Let Claude decide with ultracode\n  * Approve the plan before it runs\n  * Save the workflow for reuse\n  * Pass input to a saved workflow\n* Example workflow prompts\n  * Audit many files for the same issue\n  * Keep fixing until a check passes\n  * Migrate many files in parallel\n  * Review every changed file and write one summary\n  * Research a topic across many sources\n  * Find issues until the list stops growing\n  * What the saved script looks like\n* How a workflow runs\n  * Behavior and limits\n* Manage runs\n  * Resume after a pause\n  * Cost\n  * Set a size guideline\n  * Turn workflows off\n* Related resources\n\n### [worktrees](https://code.claude.com/docs/en/worktrees.md)\n\n* Start Claude in a worktree\n  * Choose the base branch\n* Copy gitignored files into worktrees\n* Isolate subagents with worktrees\n* Clean up worktrees\n* Manage worktrees manually\n* Non-git version control\n* See also\n\n## MCP\n\n### [mcp-quickstart](https://code.claude.com/docs/en/mcp-quickstart.md)\n\n* Before you begin\n* Add and verify a server\n* Where servers are saved\n  * Find your configuration on disk\n* Change server scope\n  * Use a server in all your projects\n  * Share a server with your team\n* Additional MCP server examples\n  * Add a local server\n  * Connect a server that requires sign-in\n* Edit .mcp.json directly\n* Connect from other surfaces\n* Troubleshooting\n* Next steps\n\n### [mcp](https://code.claude.com/docs/en/mcp.md)\n\n* What you can do with MCP\n* Find and build MCP servers\n* Installing MCP servers\n  * Option 1: Add a remote HTTP server\n  * Option 2: Add a remote SSE server\n  * Option 3: Add a local stdio server\n  * Option 4: Add a remote WebSocket server\n  * Managing your servers\n  * Dynamic tool updates\n  * Automatic reconnection\n  * Push messages with channels\n  * Plugin-provided MCP servers\n* MCP installation scopes\n  * Local scope\n  * Project scope\n  * User scope\n  * Scope hierarchy and precedence\n  * Environment variable expansion in `.mcp.json`\n* Practical examples\n  * Example: Monitor errors with Sentry\n  * Example: Connect to GitHub for code reviews\n  * Example: Query your PostgreSQL database\n* Authenticate with remote MCP servers\n  * Authenticate from the command line\n  * Use a fixed OAuth callback port\n  * Use pre-configured OAuth credentials\n  * Override OAuth metadata discovery\n  * Restrict OAuth scopes\n  * Use dynamic headers for custom authentication\n* Add MCP servers from JSON configuration\n* Import MCP servers from Claude Desktop\n* Use MCP servers from claude.ai\n  * Disable claude.ai connectors\n* Use Claude Code as an MCP server\n* MCP output limits and warnings\n  * Raise the limit for a specific tool\n* Tool input schemas with a root-level combinator\n* Require approval for a specific tool\n* Respond to MCP elicitation requests\n* Use MCP resources\n  * Reference MCP resources\n* Scale with MCP tool search\n  * How it works\n  * For MCP server authors\n  * Configure tool search\n  * Exempt a server from deferral\n* Use MCP prompts as commands\n  * Execute MCP prompts\n* Managed MCP configuration\n\n## Skills\n\n### [skills](https://code.claude.com/docs/en/skills.md)\n\n* Bundled skills\n  * Run and verify your app\n* Getting started\n  * Create your first skill\n  * Where skills live\n    * Live change detection\n    * Automatic discovery from parent and nested directories\n    * Skills from additional directories\n* Configure skills\n  * Types of skill content\n  * Frontmatter reference\n    * How a skill gets its command name\n    * Available string substitutions\n  * Add supporting files\n  * Control who invokes a skill\n  * Skill content lifecycle\n  * Pre-approve tools for a skill\n  * Pass arguments to skills\n* Advanced patterns\n  * Inject dynamic context\n  * Run skills in a subagent\n    * Example: Research skill using Explore agent\n  * Restrict Claude's skill access\n  * Override skill visibility from settings\n* Evaluate and iterate on a skill\n  * Run evals with skill-creator\n* Share skills\n  * Generate visual output\n* Troubleshooting\n  * Skill not triggering\n  * Skill triggers too often\n  * Skill descriptions are cut short\n* Related resources\n\n## Plugins\n\n### [discover-plugins](https://code.claude.com/docs/en/discover-plugins.md)\n\n* How marketplaces work\n* Official Anthropic marketplace\n  * Code intelligence\n    * What Claude gains from code intelligence plugins\n  * External integrations\n  * Automatic security review\n  * Development workflows\n  * Output styles\n* Community marketplace\n* Try it: add the demo marketplace\n* Add marketplaces\n  * Add from GitHub\n  * Add from other Git hosts\n  * Add from local paths\n  * Add from remote URLs\n* Install plugins\n* Manage installed plugins\n  * Apply plugin changes without restarting\n* Manage marketplaces\n  * Use the interactive interface\n  * Use CLI commands\n  * Configure auto-updates\n* Configure team marketplaces\n* Security\n* Troubleshooting\n  * /plugin command not recognized\n  * Common issues\n  * Code intelligence issues\n* Next steps\n\n### [plugins](https://code.claude.com/docs/en/plugins.md)\n\n* When to use plugins vs standalone configuration\n* Quickstart\n  * Prerequisites\n  * Create your first plugin\n* Develop a plugin in your skills directory\n* Plugin structure overview\n* Develop more complex plugins\n  * Add Skills to your plugin\n  * Add LSP servers to your plugin\n  * Add background monitors to your plugin\n  * Ship default settings with your plugin\n  * Organize complex plugins\n  * Test your plugins locally\n  * Debug plugin issues\n  * Share your plugins\n  * Submit your plugin to the community marketplace\n* Convert existing configurations to plugins\n  * Migration steps\n  * What changes when migrating\n* Next steps\n  * For plugin users\n  * For plugin developers\n\n## Artifacts\n\n### [artifacts](https://code.claude.com/docs/en/artifacts.md)\n\n* When to use an artifact\n  * What an artifact is not\n* Create an artifact\n* Update an artifact\n* Share an artifact\n* What you can build\n  * Walk through a change\n  * Compare alternatives\n  * Tune with interactive controls\n  * Bring the result back to your session\n  * Track work in progress\n* Improve the visual design\n* Page constraints\n* Availability\n* Disable artifacts\n* Manage artifacts for your organization\n  * Enable or disable artifacts\n  * Set a retention policy\n  * Review the audit log\n  * Allowlist the viewer domain\n  * List and delete artifacts with the Compliance API\n* Related resources\n\n## Automation\n\n### [hooks-guide](https://code.claude.com/docs/en/hooks-guide.md)\n\n* Set up your first hook\n* What you can automate\n  * Get notified when Claude needs input\n  * Auto-format code after edits\n  * Block edits to protected files\n  * Re-inject context after compaction\n  * Audit configuration changes\n  * Reload environment when directory or files change\n  * Auto-approve specific permission prompts\n* How hooks work\n  * Combine results from multiple hooks\n  * Read input and return output\n    * Hook input\n    * Hook output\n    * Structured JSON output\n  * Filter hooks with matchers\n    * Filter by tool name and arguments with the `if` field\n  * Configure hook location\n* Prompt-based hooks\n* Agent-based hooks\n* HTTP hooks\n* Limitations and troubleshooting\n  * Limitations\n  * Hooks and permission modes\n  * Hook not firing\n  * Hook error in output\n  * `/hooks` shows no hooks configured\n  * Stop hook hits the block cap\n  * JSON validation failed\n  * Debug techniques\n* Learn more\n\n### [channels](https://code.claude.com/docs/en/channels.md)\n\n* Supported channels\n* Quickstart\n* Security\n* Enterprise controls\n  * Enable channels for your organization\n  * Restrict which channel plugins can run\n* Research preview\n* How channels compare\n* Next steps\n\n### [scheduled-tasks](https://code.claude.com/docs/en/scheduled-tasks.md)\n\n* Compare scheduling options\n* Run a prompt repeatedly with /loop\n  * Run on a fixed interval\n  * Let Claude choose the interval\n  * Run the built-in maintenance prompt\n  * Customize the default prompt with loop.md\n  * Stop a loop\n* Set a one-time reminder\n* Manage scheduled tasks\n* How scheduled tasks run\n  * Jitter\n  * Seven-day expiry\n* Cron expression reference\n* Disable scheduled tasks\n* Limitations\n\n### [goal](https://code.claude.com/docs/en/goal.md)\n\n* Compare ways to keep a session running\n* Use `/goal`\n  * Set a goal\n  * Write an effective condition\n  * Check status\n  * Clear a goal\n  * Resume with an active goal\n  * Run non-interactively\n* How evaluation works\n* Requirements\n* See also\n\n### [headless](https://code.claude.com/docs/en/headless.md)\n\n* Basic usage\n  * Start faster with bare mode\n  * Background tasks at exit\n* Examples\n  * Pipe data through Claude\n  * Add Claude to a build script\n  * Get structured output\n  * Stream responses\n  * Auto-approve tools\n  * Create a commit\n  * Customize the system prompt\n  * Continue conversations\n* Next steps\n\n### [deep-links](https://code.claude.com/docs/en/deep-links.md)\n\n* How it works\n  * What a launched session shows\n* Build a link\n  * Choose between `cwd` and `repo`\n* Examples\n  * Embed a link in a runbook\n  * Open a link from the shell\n* Registration and supported platforms\n* Open a VS Code tab instead of a terminal\n* Troubleshooting\n  * Clicking the link does nothing\n  * The link renders as plain text instead of being clickable\n  * The session opens in my home directory instead of the repo\n  * The link opens the wrong terminal\n* Learn more\n\n## Guides\n\n### [large-codebases](https://code.claude.com/docs/en/large-codebases.md)\n\n* What this guide covers\n  * Settings on this page\n  * The example monorepo\n* Choose where to start Claude\n* Layer CLAUDE.md files by directory\n  * Choose between per-directory CLAUDE.md and path-scoped rules\n  * Exclude irrelevant CLAUDE.md files\n* Reduce what Claude reads\n  * Block reads of generated and vendored code\n  * Reduce file reads with code intelligence\n* Scope worktrees and file access\n  * Check out only the directories you need\n  * Grant access across packages or repositories\n* Add per-directory skills\n  * Keep skills discoverable\n* Centralize conventions when layering stops scaling\n  * Recommend the right plugin at session start\n* Put it together\n* Scope and plan changes that span packages\n* Next steps\n\n## Troubleshooting\n\n### [troubleshoot-install](https://code.claude.com/docs/en/troubleshoot-install.md)\n\n* Find your error\n* Run diagnostic checks\n  * Check network connectivity\n  * Verify your PATH\n  * Check for conflicting installations\n  * Check directory permissions\n  * Verify the binary works\n* Common installation issues\n  * Install script returns HTML instead of a shell script\n  * `command not found: claude` after installation\n  * `curl: (56) Failure writing output to destination`\n  * Homebrew cask unavailable or outdated\n  * TLS or SSL connection errors\n  * `Failed to fetch version from downloads.claude.ai`\n  * Wrong install command on Windows\n  * `The process cannot access the file` during Windows install\n  * Install killed on low-memory Linux servers\n  * Install hangs in Docker\n  * Claude Desktop overrides the `claude` command on Windows\n  * Claude Code on Windows requires either Git for Windows (for bash) or PowerShell\n  * Claude Code does not support 32-bit Windows\n  * Linux musl or glibc binary mismatch\n  * `Illegal instruction`\n  * `dyld: cannot load` on macOS\n  * `Exec format error` on WSL1\n  * npm install errors in WSL\n  * Permission errors during installation\n  * Native binary not found after npm install\n* Login and authentication\n  * Reset your login\n  * OAuth error: Invalid code\n  * 403 Forbidden after login\n  * This organization has been disabled with an active subscription\n  * OAuth login fails in WSL2, SSH, or containers\n  * Not logged in or token expired\n  * Bedrock, Agent Platform, or Foundry credentials not loading\n* Still stuck\n\n### [troubleshooting](https://code.claude.com/docs/en/troubleshooting.md)\n\n* Performance and stability\n  * High CPU or memory usage\n  * Auto-compaction stops with a thrashing error\n  * Command hangs or freezes\n  * Garbled or corrupted text in an editor's integrated terminal\n  * Search and discovery issues\n  * Slow or incomplete search results on WSL\n* Get more help\n\n### [debug-your-config](https://code.claude.com/docs/en/debug-your-config.md)\n\n* See what loaded into context\n* Check resolved settings\n* Check MCP servers\n* Check hooks\n* Test against a clean configuration\n* Check common causes\n* Related resources\n\n### [errors](https://code.claude.com/docs/en/errors.md)\n\n* Find your error\n* Automatic retries\n* Server errors\n  * API Error: 500 Internal server error\n  * API Error: Repeated 529 Overloaded errors\n  * Request timed out\n  * The response above may be incomplete\n  * Auto mode cannot determine the safety of an action\n  * Agent terminated early due to an API error\n* Usage limits\n  * You've hit your session limit\n  * Usage credits required for 1M context\n  * Server is temporarily limiting requests\n  * Request rejected (429)\n  * Credit balance is too low\n* Authentication errors\n  * Not logged in\n  * Could not resolve authentication method\n  * Invalid API key\n  * This organization has been disabled\n  * Your organization has disabled API key authentication\n  * Your organization has disabled Claude subscription access\n  * Routines are disabled by your organization's policy\n  * Remote Control requires the Anthropic API\n  * OAuth token revoked or expired\n  * OAuth scope requirement\n  * AWS credentials expired or invalid\n  * AWS authentication failed\n* Network and connection errors\n  * Unable to connect to API\n  * SSL certificate errors\n  * Host not allowed in a cloud session\n  * Couldn't reconnect to your Remote Control session\n* Request errors\n  * Prompt is too long\n  * Error during compaction: Conversation too long\n  * Request too large\n  * Image was too large\n  * Unable to resize image\n  * PDF errors\n  * Extra inputs are not permitted\n  * There's an issue with the selected model\n  * Model is not a recognized model id\n  * Claude Opus is not available with the Claude Pro plan\n  * Model is restricted by your organization's settings\n  * thinking.type.enabled is not supported for this model\n  * Thinking budget exceeds output limit\n  * Tool use or thinking block mismatch\n  * Usage Policy refusal\n  * Safety measures flagged a cybersecurity topic\n* Installation errors\n  * Installation was killed before it could finish\n  * The connection dropped while downloading the update\n* Command-line errors\n  * Conflict between --bg and --print\n* Configuration warnings\n  * Workspace has not been trusted\n* Responses seem lower quality than usual\n* Report an error\n\n## Setup and access\n\n### [admin-setup](https://code.claude.com/docs/en/admin-setup.md)\n\n* Choose your API provider\n* Decide how settings reach devices\n* Decide what to enforce\n* Set up usage visibility\n* Review data handling\n* Verify and onboard\n* Next steps\n\n### [setup](https://code.claude.com/docs/en/setup.md)\n\n* System requirements\n  * Additional dependencies\n* Install Claude Code\n  * Set up on Windows\n  * Alpine Linux and musl-based distributions\n* Verify your installation\n* Authenticate\n* Update Claude Code\n  * Auto-updates\n  * Configure release channel\n  * Pin a minimum version\n  * Disable auto-updates\n  * Update manually\n* Advanced installation options\n  * Install a specific version\n  * Install with Linux package managers\n  * Install with npm\n  * Binary integrity and code signing\n    * Verify the manifest signature\n    * Platform code signatures\n* Uninstall Claude Code\n  * Native installation\n  * Homebrew installation\n  * WinGet installation\n  * apt / dnf / apk\n  * npm\n  * Remove configuration files\n\n### [authentication](https://code.claude.com/docs/en/authentication.md)\n\n* Log in to Claude Code\n* Set up team authentication\n  * Claude for Teams or Enterprise\n  * Claude Console authentication\n  * Cloud provider authentication\n* Credential management\n  * Renew an expiring login\n  * Authentication precedence\n  * Generate a long-lived token\n\n### [server-managed-settings](https://code.claude.com/docs/en/server-managed-settings.md)\n\n* Requirements\n* Choose between server-managed and endpoint-managed settings\n* Configure server-managed settings\n  * Verify settings delivery\n  * Access control\n  * Managed-only settings\n  * Current limitations\n* Settings delivery\n  * Settings precedence\n  * Fetch and caching behavior\n  * Invalid entries in delivered settings\n  * Enforce fail-closed startup\n  * Security approval dialogs\n* Platform availability\n* Audit logging\n* Security considerations\n* See also\n\n### [managed-mcp](https://code.claude.com/docs/en/managed-mcp.md)\n\n* Choose a pattern\n* Exclusive control with managed-mcp.json\n  * Authenticate with per-user credentials\n  * Validate the configuration\n  * Disable MCP entirely\n  * Allow claude.ai connectors alongside the managed set\n* Policy-based control with allowlists and denylists\n  * Match servers by URL, command, or name\n  * How a server is evaluated\n  * Example configuration\n  * Restrict the allowlist to managed settings only\n* How restrictions appear to users\n* Monitor MCP usage\n* Configuration summary\n* Related resources\n\n### [auto-mode-config](https://code.claude.com/docs/en/auto-mode-config.md)\n\n* Where the classifier reads configuration\n* Define trusted infrastructure\n* Override the block and allow rules\n* Route all shell commands through the classifier\n* Inspect the defaults and your effective config\n* Review denials\n* See also\n\n## Deployment\n\n### [third-party-integrations](https://code.claude.com/docs/en/third-party-integrations.md)\n\n* Compare deployment options\n* Configure proxies and gateways\n  * Amazon Bedrock\n  * Microsoft Foundry\n  * Google Cloud's Agent Platform\n* Best practices for organizations\n  * Invest in documentation and memory\n  * Simplify deployment\n  * Start with guided usage\n  * Pin model versions for cloud providers\n  * Configure security policies\n  * Leverage MCP for integrations\n* Next steps\n\n### [feature-availability](https://code.claude.com/docs/en/feature-availability.md)\n\n* Availability by model provider\n  * Features available on every provider\n  * Features that require a Claude subscription\n  * CLI capabilities that vary by provider\n  * Admin and analytics\n  * Summary by provider\n* Availability by subscription plan\n* Model availability\n* Related resources\n\n### [amazon-bedrock](https://code.claude.com/docs/en/amazon-bedrock.md)\n\n* Prerequisites\n* Sign in with Bedrock\n* Set up manually\n  * 1. Submit use case details\n  * 2. Configure AWS credentials\n    * Advanced credential configuration\n      * Example configuration\n      * Configuration settings explained\n  * 3. Configure Claude Code\n  * 4. Pin model versions\n    * Map each model version to an inference profile\n* Startup model checks\n* IAM configuration\n* 1M token context window\n* Service tiers\n* AWS Guardrails\n* Use the Mantle endpoint\n  * Enable Mantle\n  * Select a Mantle model\n  * Run Mantle alongside the Invoke API\n  * Route Mantle through a gateway\n  * Mantle environment variables\n* Troubleshooting\n  * Authentication loop with SSO and corporate proxies\n  * Region issues\n  * Zero token counts in /context\n  * Mantle endpoint errors\n* Additional resources\n\n### [claude-platform-on-aws](https://code.claude.com/docs/en/claude-platform-on-aws.md)\n\n* Prerequisites\n* Setup\n  * 1. Configure AWS credentials\n  * 2. Configure Claude Code\n  * 3. Pin model versions\n* Use the Agent SDK\n* Route through a corporate proxy\n* Troubleshooting\n  * `403 Forbidden` or `AccessDenied` on every request\n  * Requests fail with a missing-workspace error\n  * Requests still go to `api.anthropic.com`\n* Additional resources\n\n### [google-vertex-ai](https://code.claude.com/docs/en/google-vertex-ai.md)\n\n* Prerequisites\n* Sign in with Agent Platform\n* Region configuration\n* Set up manually\n  * 1. Enable Agent Platform API\n  * 2. Request model access\n  * 3. Configure GCP credentials\n    * Advanced credential configuration\n  * 4. Configure Claude Code\n  * 5. Pin model versions\n* Startup model checks\n* IAM configuration\n* 1M token context window\n* Troubleshooting\n* Additional resources\n\n### [microsoft-foundry](https://code.claude.com/docs/en/microsoft-foundry.md)\n\n* Prerequisites\n* Setup\n  * 1. Provision Microsoft Foundry resource\n  * 2. Configure Azure credentials\n  * 3. Configure Claude Code\n  * 4. Pin model versions\n  * 5. Run Claude Code\n* Azure RBAC configuration\n* Troubleshooting\n* Additional resources\n\n### [network-config](https://code.claude.com/docs/en/network-config.md)\n\n* Proxy configuration\n  * Environment variables\n  * Basic authentication\n* CA certificate store\n* Custom CA certificates\n* mTLS authentication\n* Network access requirements\n* Additional resources\n\n### [devcontainer](https://code.claude.com/docs/en/devcontainer.md)\n\n* Add Claude Code to your dev container\n* Persist authentication and settings across rebuilds\n* Enforce organization policy\n* Restrict network egress\n* Run without permission prompts\n* Try the reference container\n* Next steps\n\n### Gateways > Claude apps gateway\n\n#### [claude-apps-gateway-config](https://code.claude.com/docs/en/claude-apps-gateway-config.md)\n\n* File structure\n* Secret expansion\n* Required sections\n  * `listen`\n  * `oidc`\n  * `session`\n  * `store`\n  * `upstreams`\n    * Anthropic API\n    * Amazon Bedrock\n    * Claude Platform on AWS\n    * Google Cloud Agent Platform\n    * Microsoft Foundry\n    * Multiple upstreams\n* Optional sections\n  * `admin`\n  * `enforcement`\n  * `models`\n  * `managed`\n    * What goes in `cli`\n    * Precedence with other managed sources\n  * `telemetry`\n  * HTTP tuning\n* Complete example\n* Client-side managed settings\n* Related\n\n#### [claude-apps-gateway-spend-limits](https://code.claude.com/docs/en/claude-apps-gateway-spend-limits.md)\n\n* Set a cap\n  * Authenticate to the admin API\n* How enforcement works\n  * Postgres availability\n* Admin API reference\n  * `/effective`\n  * `/audit`\n  * Pagination\n* Data lifecycle\n* Related\n\n#### [claude-apps-gateway-deploy](https://code.claude.com/docs/en/claude-apps-gateway-deploy.md)\n\n* Identity provider setup\n* Deployment\n  * Container image\n  * Kubernetes\n  * Cloud Run\n  * Push the gateway URL to developer machines\n* Operations\n  * Logs\n  * Health\n  * Outage behavior\n  * JWT secret rotation\n  * Postgres\n  * Upgrades\n* Security\n  * Data flow\n  * Threat model summary\n  * User-code brute-force resistance\n  * Compliance posture\n* Troubleshooting\n* Related\n\n#### [claude-apps-gateway-on-gcp](https://code.claude.com/docs/en/claude-apps-gateway-on-gcp.md)\n\n* What you'll build\n* Prerequisites\n* Deploy the gateway\n* Terraform reference\n* Troubleshooting\n* Next steps\n\n### Gateways > Other gateways\n\n#### [llm-gateway-connect](https://code.claude.com/docs/en/llm-gateway-connect.md)\n\n* Check for an existing configuration\n* Configure Claude Code yourself\n  * Set the credential variable\n  * Set the base URL and credential\n    * Set as shell environment variables\n    * Set in a settings file\n  * Verify the connection\n    * Confirm in Claude Code\n  * How the credential variable maps to a header\n  * Conflicts with an existing login\n* Configure each surface\n  * VS Code extension\n  * Desktop app\n  * GitHub Actions\n  * Agent SDK\n  * Slack, web, and Remote Control\n* Additional configuration\n  * Send additional headers\n  * Add gateway models to the model picker\n  * Rotate credentials with apiKeyHelper\n  * Route to a cloud provider through a gateway\n    * Amazon Bedrock\n    * Google Cloud's Agent Platform\n    * Microsoft Foundry\n    * Claude Platform on AWS\n* Troubleshoot gateway errors\n* Related resources\n\n#### [llm-gateway-rollout](https://code.claude.com/docs/en/llm-gateway-rollout.md)\n\n* Prerequisites\n  * Gateway requirements\n* Rollout steps\n  * Confirm the gateway routes your models\n  * Issue developer credentials\n  * Test Claude Code against the gateway\n  * Distribute the configuration\n    * What to distribute\n    * Distribute through managed settings\n    * Hand developers the values to set themselves\n  * Verify the rollout\n* Maintain the gateway\n* Related resources\n\n#### [llm-gateway-protocol](https://code.claude.com/docs/en/llm-gateway-protocol.md)\n\n* API formats\n  * Foundry and Claude Platform on AWS\n  * Optional endpoints and startup traffic\n  * Streaming\n  * Format mismatch with the upstream\n* Request headers\n  * Forward as open lists\n* System prompt attribution block\n* Feature pass-through\n  * Automatic retry and error forwarding\n  * Disable pre-release capabilities\n* Model discovery\n  * When discovery runs\n  * Request and response\n  * Picker entries and caching\n* Related resources\n\n## Gateways\n\n### [gateways](https://code.claude.com/docs/en/gateways.md)\n\n* How a gateway works\n* Choose a gateway\n  * Claude apps gateway\n  * Other gateways\n* Subscriptions and gateways\n* Configure separately from the gateway\n* Next steps\n\n## Usage and costs\n\n### [monitoring-usage](https://code.claude.com/docs/en/monitoring-usage.md)\n\n* Quick start\n* Administrator configuration\n* Configuration details\n  * Common configuration variables\n  * mTLS authentication\n  * Metrics cardinality control\n  * Traces (beta)\n    * Span hierarchy\n    * Span attributes\n  * Dynamic headers\n    * Settings configuration\n    * Script requirements\n    * Refresh behavior\n  * Multi-team organization support\n  * Example configurations\n* Available metrics and events\n  * Standard attributes\n  * Metrics\n  * Metric details\n    * Session counter\n    * Lines of code counter\n    * Pull request counter\n    * Commit counter\n    * Cost counter\n    * Token counter\n    * Code edit tool decision counter\n    * Active time counter\n  * Events\n    * Event correlation attributes\n    * User prompt event\n    * Assistant response event\n    * Tool result event\n    * API request event\n    * API error event\n    * API refusal event\n    * API request body event\n    * API response body event\n    * Tool decision event\n    * Permission mode changed event\n    * Auth event\n    * MCP server connection event\n    * Internal error event\n    * Plugin installed event\n    * Plugin loaded event\n    * Skill activated event\n    * At mention event\n    * API retries exhausted event\n    * Hook registered event\n    * Hook execution start event\n    * Hook execution complete event\n    * Hook plugin metrics event\n    * Compaction event\n    * Feedback survey event\n* Interpret metrics and events data\n  * Usage monitoring\n  * Cost monitoring\n  * Alerting and segmentation\n  * Detect retry exhaustion\n  * Event analysis\n* Audit security events\n  * Attribute actions to users\n  * Audit MCP activity\n  * Map security questions to events\n  * Send events to a SIEM\n* Backend considerations\n  * For metrics\n  * For events/logs\n  * For traces\n* Service information\n* ROI measurement resources\n* Security and privacy\n* Monitor Claude Code on Amazon Bedrock\n\n### [costs](https://code.claude.com/docs/en/costs.md)\n\n* Track your costs\n  * Using the `/usage` command\n* Managing costs for teams\n  * Rate limit recommendations\n  * Agent team token costs\n* Reduce token usage\n  * Manage context proactively\n  * Choose the right model\n  * Reduce MCP server overhead\n  * Install code intelligence plugins for typed languages\n  * Offload processing to hooks and skills\n  * Move instructions from CLAUDE.md to skills\n  * Adjust extended thinking\n  * Delegate verbose operations to subagents\n  * Manage agent team costs\n  * Write specific prompts\n  * Work efficiently on complex tasks\n* Background token usage\n* Understanding changes in Claude Code behavior\n\n### [analytics](https://code.claude.com/docs/en/analytics.md)\n\n* Access analytics for Team and Enterprise\n  * Enable contribution metrics\n  * Review summary metrics\n  * Explore the charts\n    * Track adoption\n    * Measure PRs per user\n    * View pull requests breakdown\n    * Find top contributors\n  * PR attribution\n    * Tagging criteria\n    * Attribution process\n    * Time window\n    * Excluded files\n    * Attribution notes\n  * Get the most from analytics\n    * Monitor adoption\n    * Measure ROI\n    * Identify power users\n    * Access data programmatically\n* Access analytics for API customers\n  * View team insights\n* Related resources\n\n## Plugin distribution\n\n### [plugin-marketplaces](https://code.claude.com/docs/en/plugin-marketplaces.md)\n\n* Overview\n* Walkthrough: create a local marketplace\n* Create the marketplace file\n* Marketplace schema\n  * Required fields\n  * Owner fields\n  * Optional fields\n* Plugin entries\n  * Required fields\n  * Optional plugin fields\n* Plugin sources\n  * Relative paths\n  * GitHub repositories\n  * Git repositories\n  * Git subdirectories\n  * npm packages\n  * Advanced plugin entries\n  * Strict mode\n* Host and distribute marketplaces\n  * Host on GitHub (recommended)\n  * Host on other git services\n  * Private repositories\n  * Test locally before distribution\n  * Require marketplaces for your team\n  * Pre-populate plugins for containers\n  * Managed marketplace restrictions\n    * Common configurations\n    * How restrictions work\n  * Version resolution and release channels\n    * Set up release channels\n      * Example\n      * Assign channels to user groups\n    * Pin dependency versions\n  * Rename or remove a plugin\n* Validation and testing\n* Manage marketplaces from the CLI\n  * Plugin marketplace add\n  * Plugin marketplace list\n  * Plugin marketplace remove\n  * Plugin marketplace update\n* Troubleshooting\n  * Marketplace not loading\n  * Marketplace validation errors\n  * Plugin installation failures\n  * Private repository authentication fails\n  * Marketplace updates fail in offline environments\n  * Git operations time out\n  * Plugins with relative paths fail in URL-based marketplaces\n  * Files not found after installation\n* See also\n\n### [plugin-dependencies](https://code.claude.com/docs/en/plugin-dependencies.md)\n\n* Why constrain dependency versions\n* Declare a dependency with a version constraint\n* Depend on a plugin from another marketplace\n* Tag plugin releases for version resolution\n* How constraints interact\n* Enable or disable a plugin with dependencies\n* Remove orphaned auto-installed dependencies\n* Resolve dependency errors\n* See also\n\n### [plugin-hints](https://code.claude.com/docs/en/plugin-hints.md)\n\n* How it works\n* Emit the hint\n* Choose where to emit\n* What the user sees\n* Hint format\n* Requirements\n* Get your plugin into the official marketplace\n* See also\n\n### [plugin-relevance](https://code.claude.com/docs/en/plugin-relevance.md)\n\n* How it works\n* Add relevance to a plugin entry\n* Field reference\n  * `relevance`\n  * `relevance.signals`\n* Enable suggestions in managed settings\n* What the user sees\n* Validate your marketplace\n* See also\n\n## Security and data\n\n### [security](https://code.claude.com/docs/en/security.md)\n\n* How we approach security\n  * Security foundation\n  * Permission-based architecture\n  * Built-in protections\n  * User responsibility\n* Protect against prompt injection\n  * Core protections\n  * Privacy safeguards\n  * Additional safeguards\n* MCP security\n* IDE security\n* Cloud execution security\n* Security best practices\n  * Working with sensitive code\n  * Team security\n  * Reporting security issues\n* Related resources\n\n### [data-usage](https://code.claude.com/docs/en/data-usage.md)\n\n* Data policies\n  * Data training policy\n  * Development Partner Program\n  * Feedback using the `/feedback` command\n  * Session quality surveys\n  * Data retention\n* Data access\n* Local Claude Code: Data flow and dependencies\n  * Cloud execution: Data flow and dependencies\n* Telemetry services\n* Default behaviors by API provider\n  * WebFetch domain safety check\n\n### [zero-data-retention](https://code.claude.com/docs/en/zero-data-retention.md)\n\n* ZDR scope\n  * What ZDR covers\n  * What ZDR does not cover\n* Features disabled under ZDR\n  * Model availability under ZDR\n* Data retention for policy violations\n* Request ZDR\n\n## Adoption\n\n### [communications-kit](https://code.claude.com/docs/en/communications-kit.md)\n\n* Launch communications\n  * Before you send\n  * The announcement\n  * Executive sponsor variant\n  * Pilot group variant\n  * Champion recruitment DM\n* Tips and tricks campaign\n  * Get started\n  * Project memory\n  * Control and safety\n  * Connect your tools\n  * Automate your workflows\n  * Day-to-day development\n  * Share and scale\n  * Security and admin\n* Quick reference\n  * FAQ responses\n  * Prompt templates\n\n### [champion-kit](https://code.claude.com/docs/en/champion-kit.md)\n\n* The champion role\n  * What this should cost you\n* Share what you discover\n  * What is worth sharing\n  * Where to share it\n  * The format that works\n* Be the person people ask\n  * Answer with a prompt rather than an explanation\n  * Point at the feature rather than the documentation\n  * Questions you are likely to hear\n* Grow the circle\n  * Patterns that tend to work\n  * Thirty-day playbook\n  * When someone wants to go deeper\n* Respond to common concerns\n* Quick-reference sheet\n\n## Settings and permissions\n\n### [settings](https://code.claude.com/docs/en/settings.md)\n\n* Configuration scopes\n  * Available scopes\n  * When to use each scope\n  * How scopes interact\n  * What uses scopes\n* Settings files\n  * When edits take effect\n  * Invalid entries in managed settings\n  * Available settings\n  * Global config settings\n  * Worktree settings\n  * Permission settings\n  * Permission rule syntax\n  * Sandbox settings\n    * Sandbox path prefixes\n  * Attribution settings\n  * File suggestion settings\n  * Footer link badges\n  * Hook configuration\n  * Compute managed settings with a policy helper\n  * Settings precedence\n  * Verify active settings\n  * Key points about the configuration system\n  * System prompt\n  * Exclude sensitive files\n* Subagent configuration\n* Plugin configuration\n  * Plugin settings\n    * `enabledPlugins`\n    * `extraKnownMarketplaces`\n    * `strictKnownMarketplaces`\n    * `strictPluginOnlyCustomization`\n  * Manage plugins\n* Environment variables\n* Tools available to Claude\n* See also\n\n### [permissions](https://code.claude.com/docs/en/permissions.md)\n\n* Permission system\n* Manage permissions\n* Permission modes\n* Permission rule syntax\n  * Match all uses of a tool\n  * Use specifiers for fine-grained control\n  * Match by input parameter\n  * Wildcard patterns\n  * Tool name wildcards\n* Tool-specific permission rules\n  * Bash\n    * Compound commands\n    * Process wrappers\n    * Read-only commands\n  * PowerShell\n  * Read and Edit\n  * WebFetch\n  * MCP\n  * Agent (subagents)\n  * Cd\n* Extend permissions with hooks\n* Working directories\n  * Additional directories grant file access, not configuration\n* How permissions interact with sandboxing\n* Managed settings\n  * Managed-only settings\n* Settings precedence\n* Project allow rules and workspace trust\n* Example configurations\n* See also\n\n### [sandbox-environments](https://code.claude.com/docs/en/sandbox-environments.md)\n\n* Compare sandboxing approaches\n* Choose an approach\n  * How isolation relates to permission modes\n* Sandboxed Bash tool\n* Sandbox runtime\n* Dev containers\n* Custom container\n* Virtual machine\n* Claude Code on the web\n* Enforce isolation across an organization\n* See also\n\n### [sandboxing](https://code.claude.com/docs/en/sandboxing.md)\n\n* Get started\n  * Set up Linux and WSL2\n  * Sandbox modes\n* Configure sandboxing\n  * Protect credentials\n    * Mask environment variables\n* How sandboxing works\n  * Filesystem isolation\n  * Network isolation\n  * OS-level enforcement\n* How sandboxing relates to permissions and permission modes\n  * Permission rules\n  * Permission modes\n* Configure the sandbox for your organization\n  * Enforce sandboxing with managed settings\n  * Keep developers from widening the policy\n  * Custom proxy configuration\n* Troubleshooting\n* Limitations\n  * Security limitations\n  * Platform and tool compatibility\n  * Scope\n* See also\n\n## Model and responses\n\n### [model-config](https://code.claude.com/docs/en/model-config.md)\n\n* Available models\n  * Model aliases\n  * Work with Fable 5\n  * Setting your model\n* Restrict model selection\n  * Surface coverage\n  * Default model behavior\n  * Enforce the allowlist for the Default model\n  * Control the model users run on\n  * Merge behavior\n  * Mantle model IDs\n  * Organization model restrictions\n* Organization default model\n* Organization effort limits\n* Special model behavior\n  * `default` model setting\n  * `opusplan` model setting\n  * Fallback model chains\n  * Automatic model fallback\n    * Check what triggered fallback\n    * Ask before switching\n    * Enable fallback on Bedrock, Agent Platform, and Foundry\n    * Security research and biology workloads\n  * Adjust effort level\n    * Choose an effort level\n    * Use ultrathink for one-off deep reasoning\n    * Set the effort level\n    * Adaptive reasoning and fixed thinking budgets\n  * Extended thinking\n  * Extended context\n    * Sonnet 5 context window\n* Checking your current model\n* Add a custom model option\n* Environment variables\n  * Pin models for third-party deployments\n  * Customize pinned model display and capabilities\n  * Override model IDs per version\n  * Prompt caching configuration\n\n### [fast-mode](https://code.claude.com/docs/en/fast-mode.md)\n\n* Toggle fast mode\n* Understand the cost tradeoff\n* Decide when to use fast mode\n  * Fast mode vs effort level\n* Requirements\n  * Enable fast mode for your organization\n  * Require per-session opt-in\n* Handle rate limits\n* Research preview\n* See also\n\n### [advisor](https://code.claude.com/docs/en/advisor.md)\n\n* When to use the advisor\n* Enable the advisor\n  * Use the `/advisor` command\n  * Set `advisorModel` in settings\n  * Use the `--advisor` flag\n* Choose an advisor model\n  * Common model pairings\n* When Claude consults the advisor\n* What you see during a session\n* Cost\n* Impact on prompt caching\n* Requirements\n* Turn the advisor off\n* Compare with related features\n* See also\n\n### [output-styles](https://code.claude.com/docs/en/output-styles.md)\n\n* Built-in output styles\n* Change your output style\n* Create a custom output style\n  * Frontmatter\n* How output styles work\n* Comparisons to related features\n* Related resources\n\n## Interface\n\n### [terminal-config](https://code.claude.com/docs/en/terminal-config.md)\n\n* Enter multiline prompts\n* Enable Option key shortcuts on macOS\n* Get a terminal bell or notification\n  * Play a sound with a Notification hook\n* Configure tmux\n* Match the color theme\n  * Create a custom theme\n    * Text and accent colors\n    * Status colors\n    * Input box and mode indicators\n    * Diff rendering\n    * Fullscreen mode\n    * Usage meter and speaker labels\n    * Shimmer variants and subagent colors\n* Switch to fullscreen rendering\n* Paste large content\n* Edit prompts with Vim keybindings\n* Related resources\n\n### [fullscreen](https://code.claude.com/docs/en/fullscreen.md)\n\n* Enable fullscreen rendering\n* What changes\n* Use the mouse\n* Scroll the conversation\n  * Auto-follow\n  * Mouse wheel scrolling\n  * Scroll in the JetBrains IDE terminal\n* Search and review the conversation\n* Clear the conversation\n* Use with tmux\n* Keep native text selection\n* Research preview\n\n### [voice-dictation](https://code.claude.com/docs/en/voice-dictation.md)\n\n* Requirements\n* Enable voice dictation\n* Hold to record\n* Tap to record and send\n* Change the dictation language\n* Rebind the dictation key\n* Troubleshooting\n  * Terminal not listed in macOS Microphone settings\n* See also\n\n### [statusline](https://code.claude.com/docs/en/statusline.md)\n\n* Set up a status line\n  * Use the /statusline command\n  * Manually configure a status line\n  * Disable the status line\n* Build a status line step by step\n* How status lines work\n* Available data\n  * Context window fields\n* Examples\n  * Context window usage\n  * Git status with colors\n  * Cost and duration tracking\n  * Display multiple lines\n  * Clickable links\n  * Rate limit usage\n  * Cache expensive operations\n  * Windows configuration\n* Subagent status lines\n* Tips\n* Troubleshooting\n\n### [keybindings](https://code.claude.com/docs/en/keybindings.md)\n\n* Configuration file\n* Contexts\n* Available actions\n  * App actions\n  * History actions\n  * Chat actions\n  * Autocomplete actions\n  * Confirmation actions\n  * Permission actions\n  * Transcript actions\n  * History search actions\n  * Task actions\n  * Theme actions\n  * Help actions\n  * Tabs actions\n  * Attachments actions\n  * Footer actions\n  * Message selector actions\n  * Diff actions\n  * Model picker actions\n  * Select actions\n  * Plugin actions\n  * Settings actions\n  * Doctor actions\n  * Voice actions\n  * Scroll actions\n* Keystroke syntax\n  * Modifiers\n  * Uppercase letters\n  * Chords\n  * Special keys\n* Unbind default shortcuts\n* Reserved shortcuts\n* Terminal conflicts\n* Vim mode interaction\n* Validation\n\n## Reference\n\n### [cli-reference](https://code.claude.com/docs/en/cli-reference.md)\n\n* CLI commands\n* CLI flags\n  * System prompt flags\n* See also\n\n### [commands](https://code.claude.com/docs/en/commands.md)\n\n* Commands across a typical workflow\n* All commands\n* MCP prompts\n* See also\n\n### [env-vars](https://code.claude.com/docs/en/env-vars.md)\n\n* Set environment variables\n  * In your shell\n  * In settings files\n* Precedence\n* Variables\n* See also\n\n### [tools-reference](https://code.claude.com/docs/en/tools-reference.md)\n\n* Configure tools with permission rules and hooks\n* Agent tool behavior\n* Bash tool behavior\n* Edit tool behavior\n* Glob tool behavior\n* Grep tool behavior\n* LSP tool behavior\n* Monitor tool\n  * WebSocket source\n* NotebookEdit tool behavior\n* PowerShell tool\n  * Enable the PowerShell tool\n  * Shell selection in settings, hooks, and skills\n  * Preview limitations\n* Read tool behavior\n* WebFetch tool behavior\n* WebSearch tool behavior\n* Write tool behavior\n* Check which tools are available\n* See also\n\n### [interactive-mode](https://code.claude.com/docs/en/interactive-mode.md)\n\n* Keyboard shortcuts\n  * General controls\n  * Text editing\n  * Theme and display\n  * Multiline input\n  * Quick commands\n  * Transcript viewer\n  * Voice input\n* Commands\n* Vim editor mode\n  * Mode switching\n  * Navigation (NORMAL mode)\n  * Editing (NORMAL mode)\n  * Text objects (NORMAL mode)\n  * Visual mode\n* Command history\n  * Reverse search with Ctrl+R\n* Background Bash commands\n  * How backgrounding works\n  * Shell mode with `!` prefix\n* Prompt suggestions\n* Side questions with /btw\n* Task list\n* Session recap\n* PR review status\n* See also\n\n### [checkpointing](https://code.claude.com/docs/en/checkpointing.md)\n\n* How checkpoints work\n  * Automatic tracking\n  * Rewind and summarize\n    * Rewind past a cleared conversation\n    * Restore vs. summarize\n* Common use cases\n* Limitations\n  * Bash command changes not tracked\n  * External changes not tracked\n  * Not a replacement for version control\n* See also\n\n### [hooks](https://code.claude.com/docs/en/hooks.md)\n\n* Hook lifecycle\n  * How a hook resolves\n* Configuration\n  * Hook locations\n  * Matcher patterns\n    * Match MCP tools\n  * Hook handler fields\n    * Common fields\n    * Command hook fields\n      * Exec form and shell form\n    * HTTP hook fields\n    * MCP tool hook fields\n    * Prompt and agent hook fields\n  * Reference scripts by path\n  * Hooks in skills and agents\n  * The `/hooks` menu\n  * Disable or remove hooks\n* Hook input and output\n  * Common input fields\n  * Exit code output\n    * Exit code 2 behavior per event\n  * HTTP response handling\n  * JSON output\n    * Emit terminal notifications\n    * Add context for Claude\n    * Decision control\n* Hook events\n  * SessionStart\n    * SessionStart input\n    * SessionStart decision control\n    * Persist environment variables\n  * Setup\n    * Setup input\n    * Setup decision control\n  * InstructionsLoaded\n    * InstructionsLoaded input\n    * InstructionsLoaded decision control\n  * UserPromptSubmit\n    * UserPromptSubmit input\n    * UserPromptSubmit decision control\n  * UserPromptExpansion\n    * UserPromptExpansion input\n    * UserPromptExpansion decision control\n  * MessageDisplay\n    * MessageDisplay input\n    * MessageDisplay output\n  * PreToolUse\n    * PreToolUse input\n      * Bash\n      * Write\n      * Edit\n      * Read\n      * Glob\n      * Grep\n      * WebFetch\n      * WebSearch\n      * Agent\n      * AskUserQuestion\n      * ExitPlanMode\n    * PreToolUse decision control\n    * Defer a tool call for later\n  * PermissionRequest\n    * PermissionRequest input\n    * PermissionRequest decision control\n    * Permission update entries\n  * PostToolUse\n    * PostToolUse input\n    * PostToolUse decision control\n  * PostToolUseFailure\n    * PostToolUseFailure input\n    * PostToolUseFailure decision control\n  * PostToolBatch\n    * PostToolBatch input\n    * PostToolBatch decision control\n  * PermissionDenied\n    * PermissionDenied input\n    * PermissionDenied decision control\n  * Notification\n    * Notification input\n  * SubagentStart\n    * SubagentStart input\n  * SubagentStop\n    * SubagentStop input\n  * TaskCreated\n    * TaskCreated input\n    * TaskCreated decision control\n  * TaskCompleted\n    * TaskCompleted input\n    * TaskCompleted decision control\n  * Stop\n    * Stop input\n    * Stop decision control\n  * StopFailure\n    * StopFailure input\n  * TeammateIdle\n    * TeammateIdle input\n    * TeammateIdle decision control\n  * ConfigChange\n    * ConfigChange input\n    * ConfigChange decision control\n  * CwdChanged\n    * CwdChanged input\n    * CwdChanged output\n  * FileChanged\n    * FileChanged input\n    * FileChanged output\n  * WorktreeCreate\n    * WorktreeCreate input\n    * WorktreeCreate output\n  * WorktreeRemove\n    * WorktreeRemove input\n  * PreCompact\n    * PreCompact input\n  * PostCompact\n    * PostCompact input\n  * SessionEnd\n    * SessionEnd input\n  * Elicitation\n    * Elicitation input\n    * Elicitation output\n  * ElicitationResult\n    * ElicitationResult input\n    * ElicitationResult output\n* Prompt-based hooks\n  * How prompt-based hooks work\n  * Prompt hook configuration\n  * Response schema\n  * Check multiple conditions before stopping\n* Agent-based hooks\n  * How agent hooks work\n  * Agent hook configuration\n* Run hooks in the background\n  * Configure an async hook\n  * How async hooks execute\n  * Run tests after file changes\n  * Limitations\n* Security considerations\n  * Disclaimer\n  * Security best practices\n* Windows PowerShell tool\n* Debug hooks\n\n### [plugins-reference](https://code.claude.com/docs/en/plugins-reference.md)\n\n* Plugin components reference\n  * Skills\n  * Agents\n  * Hooks\n  * MCP servers\n  * LSP servers\n  * Monitors\n  * Themes\n* Plugin installation scopes\n* Skills-directory plugins\n  * Choose where the plugin loads from\n  * Edit, reload, and disable a skills-directory plugin\n* Plugin manifest schema\n  * Complete schema\n  * Required fields\n  * Unrecognized fields\n  * Metadata fields\n  * Default enablement\n  * Component path fields\n  * Experimental components\n  * User configuration\n  * Channels\n  * Path behavior rules\n  * Environment variables\n    * Persistent data directory\n* Plugin caching and file resolution\n  * Path traversal limitations\n  * Share files within a marketplace with symlinks\n* Plugin directory structure\n  * Standard plugin layout\n  * File locations reference\n* CLI commands reference\n  * plugin init\n  * plugin install\n  * plugin uninstall\n  * plugin prune\n  * plugin enable\n  * plugin disable\n  * plugin update\n  * plugin list\n  * plugin details\n  * plugin tag\n* Debugging and development tools\n  * Debugging commands\n  * Common issues\n  * Example error messages\n  * Hook troubleshooting\n  * MCP server troubleshooting\n  * Directory structure mistakes\n* Distribution and versioning reference\n  * Version management\n* See also\n\n### [channels-reference](https://code.claude.com/docs/en/channels-reference.md)\n\n* Overview\n* What you need\n* Example: build a webhook receiver\n* Test during the research preview\n* Server options\n* Notification format\n* Expose a reply tool\n* Gate inbound messages\n* Relay permission prompts\n  * How relay works\n  * Permission request fields\n  * Add relay to a chat bridge\n  * Full example\n* Package as a plugin\n* See also\n\n## Glossary\n\n### [glossary](https://code.claude.com/docs/en/glossary.md)\n\n* A\n  * Agent teams\n  * Agentic coding\n  * Agentic harness\n  * Agentic loop\n  * Artifact\n  * Auto memory\n  * Auto mode\n* B\n  * Bare mode\n  * Bundled skills\n* C\n  * Channel\n  * Checkpoint\n  * `.claude` directory\n  * CLAUDE.md\n  * Command\n  * Compaction\n  * Context window\n* D\n  * Dispatch\n* E\n  * Effort level\n  * Extended thinking\n* H\n  * Hook\n* M\n  * Managed settings\n  * MCP (Model Context Protocol)\n  * MCP Tool Search\n* N\n  * Non-interactive mode\n* O\n  * Output style\n* P\n  * Permission mode\n  * Permission rule\n  * Plan mode\n  * Plugin\n  * Project trust\n  * Prompt injection\n* R\n  * Remote Control\n  * Rules\n* S\n  * Sandboxing\n  * Session\n  * Settings layers\n  * Skill\n  * Subagent\n  * Surface\n* T\n  * Teleport\n  * Tool\n  * Turn\n* V\n  * Verification loop\n* W\n  * Worktree isolation\n* Deprecated and renamed terms\n\n## Agent SDK\n\n### [overview](https://code.claude.com/docs/en/agent-sdk/overview.md)\n\n* Get started\n* Capabilities\n  * Claude Code features\n* Compare the Agent SDK to other Claude tools\n* Changelog\n* Reporting bugs\n* Branding guidelines\n* License and terms\n* Next steps\n\n### [quickstart](https://code.claude.com/docs/en/agent-sdk/quickstart.md)\n\n* Prerequisites\n* Setup\n* Create a buggy file\n* Build an agent that finds and fixes bugs\n  * Run your agent\n  * Try other prompts\n  * Customize your agent\n* Key concepts\n* Next steps\n\n## Core concepts\n\n### [agent-loop](https://code.claude.com/docs/en/agent-sdk/agent-loop.md)\n\n* The loop at a glance\n* Turns and messages\n* Message types\n  * Handle messages\n* Tool execution\n  * Built-in tools\n  * Tool permissions\n  * Parallel tool execution\n* Control how the loop runs\n  * Turns and budget\n  * Effort level\n  * Permission mode\n  * Model\n* The context window\n  * What consumes context\n  * Automatic compaction\n  * Keep context efficient\n* Sessions and continuity\n* Handle the result\n* Hooks\n* Put it all together\n* Next steps\n\n### [claude-code-features](https://code.claude.com/docs/en/agent-sdk/claude-code-features.md)\n\n* Control filesystem settings with settingSources\n  * What settingSources does not control\n* Project instructions (CLAUDE.md and rules)\n  * CLAUDE.md load locations\n* Skills\n* Hooks\n  * When to use which hook type\n* Choose the right feature\n* Related resources\n\n### [sessions](https://code.claude.com/docs/en/agent-sdk/sessions.md)\n\n* Choose an approach\n  * Continue, resume, and fork\n* Automatic session management\n  * Python: `ClaudeSDKClient`\n  * TypeScript: `continue: true`\n* Use session options with `query()`\n  * Capture the session ID\n  * Resume by ID\n  * Fork to explore alternatives\n* Resume across hosts\n* Related resources\n\n### [session-storage](https://code.claude.com/docs/en/agent-sdk/session-storage.md)\n\n* The `SessionStore` interface\n* Quick start\n* Write your own adapter\n* Reference implementations\n  * Validate your adapter\n* Behavior notes\n  * Dual-write architecture\n  * Mirror writes are best-effort\n  * `getSessionMessages` returns the post-compaction chain\n  * `forkSession` is not a byte copy\n  * Subagent transcripts\n  * Retention\n* Supported on\n* Related resources\n\n## Input and output\n\n### [streaming-vs-single-mode](https://code.claude.com/docs/en/agent-sdk/streaming-vs-single-mode.md)\n\n* Overview\n* Streaming Input Mode (Recommended)\n  * How It Works\n  * Benefits\n  * Implementation Example\n* Single Message Input\n  * When to Use Single Message Input\n  * Limitations\n  * Implementation Example\n\n### [user-input](https://code.claude.com/docs/en/agent-sdk/user-input.md)\n\n* Detect when Claude needs input\n* Handle tool approval requests\n  * Respond to tool requests\n* Handle clarifying questions\n  * Question format\n    * Option previews (TypeScript)\n  * Response format\n    * Support free-text input\n  * Complete example\n* Limitations\n* Other ways to get user input\n  * Streaming input\n  * Custom tools\n* Related resources\n\n### [streaming-output](https://code.claude.com/docs/en/agent-sdk/streaming-output.md)\n\n* Enable streaming output\n* StreamEvent reference\n* Message flow\n* Stream text responses\n* Stream tool calls\n* Build a streaming UI\n* Known limitations\n* Next steps\n\n### [structured-outputs](https://code.claude.com/docs/en/agent-sdk/structured-outputs.md)\n\n* Why structured outputs?\n* Quick start\n* Type-safe schemas with Zod and Pydantic\n* Output format configuration\n* Example: TODO tracking agent\n* Error handling\n* Related resources\n\n## Extend with tools\n\n### [custom-tools](https://code.claude.com/docs/en/agent-sdk/custom-tools.md)\n\n* Quick reference\n* Create a custom tool\n  * Weather tool example\n  * Call a custom tool\n  * Add more tools\n  * Add tool annotations\n* Control tool access\n  * Tool name format\n  * Configure allowed tools\n* Handle errors\n* Return images and resources\n  * Images\n  * Resources\n* Return structured data\n* Example: unit converter\n* Next steps\n* Related documentation\n\n### [mcp](https://code.claude.com/docs/en/agent-sdk/mcp.md)\n\n* Quickstart\n* Add an MCP server\n  * In code\n  * From a config file\n* Allow MCP tools\n  * Tool naming convention\n  * Auto-approve with allowedTools\n  * Discover available tools\n* Transport types\n  * stdio servers\n  * HTTP/SSE servers\n  * SDK MCP servers\n* MCP tool search\n* Authentication\n  * Pass credentials via environment variables\n  * HTTP headers for remote servers\n  * OAuth2 authentication\n* Examples\n  * List issues from a repository\n  * Query a database\n* Error handling\n* Troubleshooting\n  * Server shows \"failed\" status\n  * Tools not being called\n  * Connection timeouts\n* Related resources\n\n### [tool-search](https://code.claude.com/docs/en/agent-sdk/tool-search.md)\n\n* How tool search works\n* Configure tool search\n* Optimize tool discovery\n* Limits\n* Related documentation\n\n### [subagents](https://code.claude.com/docs/en/agent-sdk/subagents.md)\n\n* Overview\n* Benefits of using subagents\n  * Context isolation\n  * Parallelization\n  * Specialized instructions and knowledge\n  * Tool restrictions\n* Create subagents\n  * Programmatic definition (recommended)\n  * AgentDefinition configuration\n  * Filesystem-based definition (alternative)\n* What subagents inherit\n* Invoke subagents\n  * Automatic invocation\n  * Explicit invocation\n  * Dynamic agent configuration\n* Detect subagent invocation\n* Resume subagents\n* Tool restrictions\n  * Common tool combinations\n* Scale up with dynamic workflows\n* Troubleshooting\n  * Claude not delegating to subagents\n  * Filesystem-based agents not loading\n  * Long prompt failures on Windows\n* Related documentation\n\n## Customize behavior\n\n### [modifying-system-prompts](https://code.claude.com/docs/en/agent-sdk/modifying-system-prompts.md)\n\n* How system prompts work\n  * Decide on a starting point\n* Customize agent behavior\n  * CLAUDE.md files for project-level instructions\n    * Load CLAUDE.md with the SDK\n  * Output styles for persistent configurations\n    * Create an output style\n    * Activate an output style\n  * Append to the `claude_code` preset\n    * Improve prompt caching across users and machines\n  * Custom system prompts\n* Compare the four approaches\n* Use cases and best practices\n  * When to use CLAUDE.md\n  * When to use output styles\n  * When to use `systemPrompt` with append\n  * When to use custom `systemPrompt`\n* Combine approaches\n  * Combine an output style with session-specific additions\n* See also\n\n### [slash-commands](https://code.claude.com/docs/en/agent-sdk/slash-commands.md)\n\n* Discovering Available Slash Commands\n* Sending Slash Commands\n* Common Slash Commands\n  * `/compact` - Compact conversation history\n  * `/clear` - Reset conversation context\n* Creating Custom Slash Commands\n  * File Locations\n  * File Format\n    * Basic Example\n    * With Frontmatter\n  * Using Custom Commands in the SDK\n  * Advanced Features\n    * Arguments and Placeholders\n    * Bash Command Execution\n    * File References\n  * Organization with Namespacing\n  * Practical Examples\n    * Pull Request Review Command\n    * Test Runner Command\n* See Also\n\n### [skills](https://code.claude.com/docs/en/agent-sdk/skills.md)\n\n* Overview\n* How Skills Work with the SDK\n* Using Skills with the SDK\n* Skill Locations\n* Creating Skills\n* Tool Restrictions\n* Discovering Available Skills\n* Testing Skills\n* Troubleshooting\n  * Skills Not Found\n  * Skill Not Being Used\n  * Additional Troubleshooting\n* Related Documentation\n  * Skills Guides\n  * SDK Resources\n\n### [plugins](https://code.claude.com/docs/en/agent-sdk/plugins.md)\n\n* What are plugins?\n* Loading plugins\n  * Path specifications\n* Verifying plugin installation\n* Using plugin skills\n* Complete example\n* Plugin structure reference\n* Common use cases\n  * Development and testing\n  * Project-specific extensions\n  * Multiple plugin sources\n* Troubleshooting\n  * Plugin not loading\n  * Skills not appearing\n  * Path resolution issues\n* See also\n\n## Control and observability\n\n### [permissions](https://code.claude.com/docs/en/agent-sdk/permissions.md)\n\n* How permissions are evaluated\n* Allow and deny rules\n* Permission modes\n  * Available modes\n  * Set permission mode\n  * Mode details\n    * Accept edits mode (`acceptEdits`)\n    * Don't ask mode (`dontAsk`)\n    * Bypass permissions mode (`bypassPermissions`)\n    * Plan mode (`plan`)\n* Related resources\n\n### [hooks](https://code.claude.com/docs/en/agent-sdk/hooks.md)\n\n* How hooks work\n* Available hooks\n* Configure hooks\n  * Matchers\n  * Callback functions\n    * Inputs\n    * Outputs\n    * Asynchronous output\n* Examples\n  * Modify tool input\n  * Add context and block a tool\n  * Auto-approve specific tools\n  * Register multiple hooks\n  * Filter with multi-tool matchers\n  * Track subagent activity\n  * Make HTTP requests from hooks\n  * Forward notifications to Slack\n* Fix common issues\n  * Hook not firing\n  * Matcher not filtering as expected\n  * Hook timeout\n  * Tool blocked unexpectedly\n  * Modified input not applied\n  * Session hooks not available in Python\n  * Subagent permission prompts multiplying\n  * Recursive hook loops with subagents\n  * systemMessage not appearing in output\n* Related resources\n\n### [file-checkpointing](https://code.claude.com/docs/en/agent-sdk/file-checkpointing.md)\n\n* How checkpointing works\n* Implement checkpointing\n* Common patterns\n  * Checkpoint before risky operations\n  * Multiple restore points\n* Try it out\n* Limitations\n* Troubleshooting\n  * Checkpointing options not recognized\n  * User messages don't have UUIDs\n  * \"No file checkpoint found for message\" error\n  * \"File rewinding is not enabled\" error\n  * \"ProcessTransport is not ready for writing\" error\n* Next steps\n\n### [cost-tracking](https://code.claude.com/docs/en/agent-sdk/cost-tracking.md)\n\n* Understand token usage\n* Get the total cost of a query\n* Track per-step and per-model usage\n  * Track per-step usage\n  * Break down usage per model\n* Accumulate costs across multiple calls\n* Handle errors, caching, and token discrepancies\n  * Resolve output token discrepancies\n  * Track costs on failed conversations\n  * Track cache tokens\n  * Extend the prompt cache TTL to one hour\n* Related documentation\n\n### [observability](https://code.claude.com/docs/en/agent-sdk/observability.md)\n\n* How telemetry flows from the SDK\n* Enable telemetry export\n  * Flush telemetry from short-lived calls\n* Read agent traces\n* Link traces to your application\n* Tag telemetry from your agent\n* Attribute actions to your end users\n* Control sensitive data in exports\n* Related documentation\n\n### [todo-tracking](https://code.claude.com/docs/en/agent-sdk/todo-tracking.md)\n\n* Todo Lifecycle\n* When Todos Are Used\n* Examples\n  * Monitoring Todo Changes\n  * Real-time Progress Display\n* Migrate to Task tools\n* Related Documentation\n\n## Deployment\n\n### [hosting](https://code.claude.com/docs/en/agent-sdk/hosting.md)\n\n* The subprocess model\n  * State that lives on local disk\n* Choose a session pattern\n  * Ephemeral sessions\n  * Long-running sessions\n  * Hybrid sessions\n  * Multi-agent container\n* Provision the container\n  * Container-based sandboxing\n  * Runtime dependencies\n  * Resources\n  * Network\n* Handle production concerns\n  * Session and state persistence\n  * Observability\n  * Auth and secrets\n  * Scaling and concurrency\n  * Cost\n  * Multi-tenant isolation\n* Known limitations\n* Next steps\n\n### [secure-deployment](https://code.claude.com/docs/en/agent-sdk/secure-deployment.md)\n\n* Threat model\n* Built-in security features\n* Security principles\n  * Security boundaries\n  * Least privilege\n  * Defense in depth\n* Isolation technologies\n  * Sandbox runtime\n  * Containers\n  * gVisor\n  * Virtual machines\n  * Cloud deployments\n* Credential management\n  * The proxy pattern\n  * Configuring Claude Code to use a proxy\n  * Implementing a proxy\n  * Credentials for other services\n    * Custom tools\n    * Traffic forwarding\n* Filesystem configuration\n  * Read-only code mounting\n  * Writable locations\n* Further reading\n\n## SDK references\n\n### [typescript](https://code.claude.com/docs/en/agent-sdk/typescript.md)\n\n* Installation\n  * Compile to a single executable\n* Functions\n  * `query()`\n    * Parameters\n    * Returns\n  * `startup()`\n    * Parameters\n    * Returns\n    * Example\n  * `tool()`\n    * Parameters\n    * `ToolAnnotations`\n  * `createSdkMcpServer()`\n    * Parameters\n  * `listSessions()`\n    * Parameters\n    * Return type: `SDKSessionInfo`\n    * Example\n  * `getSessionMessages()`\n    * Parameters\n    * Return type: `SessionMessage`\n    * Example\n  * `getSessionInfo()`\n    * Parameters\n  * `renameSession()`\n    * Parameters\n  * `tagSession()`\n    * Parameters\n  * `resolveSettings()`\n    * Parameters\n    * Return type: `ResolvedSettings`\n    * Example\n* Types\n  * `Options`\n    * Handle slow or stalled API responses\n  * `Query` object\n    * Methods\n    * `applyFlagSettings()`\n  * `WarmQuery`\n    * Methods\n  * `SDKControlInitializeResponse`\n  * `AgentDefinition`\n  * `AgentMcpServerSpec`\n  * `SettingSource`\n    * Default behavior\n    * Why use settingSources\n    * Settings precedence\n  * `PermissionMode`\n  * `CanUseTool`\n  * `PermissionResult`\n  * `ToolConfig`\n  * `McpServerConfig`\n    * `McpStdioServerConfig`\n    * `McpSSEServerConfig`\n    * `McpHttpServerConfig`\n    * `McpSdkServerConfigWithInstance`\n    * `McpClaudeAIProxyServerConfig`\n  * `SdkPluginConfig`\n* Message Types\n  * `SDKMessage`\n  * `SDKAssistantMessage`\n  * `SDKUserMessage`\n  * `SDKUserMessageReplay`\n  * `SDKResultMessage`\n  * `SDKSystemMessage`\n  * `SDKPartialAssistantMessage`\n  * `SDKCompactBoundaryMessage`\n  * `SDKInformationalMessage`\n  * `SDKWorkerShuttingDownMessage`\n  * `SDKPluginInstallMessage`\n  * `SDKPermissionDeniedMessage`\n  * `SDKPermissionDenial`\n  * `SDKMessageOrigin`\n* Hook Types\n  * `HookEvent`\n  * `HookCallback`\n  * `HookCallbackMatcher`\n  * `HookInput`\n  * `BaseHookInput`\n    * `PreToolUseHookInput`\n    * `PostToolUseHookInput`\n    * `PostToolUseFailureHookInput`\n    * `PostToolBatchHookInput`\n    * `NotificationHookInput`\n    * `UserPromptSubmitHookInput`\n    * `SessionStartHookInput`\n    * `SessionEndHookInput`\n    * `StopHookInput`\n    * `SubagentStartHookInput`\n    * `SubagentStopHookInput`\n    * `PreCompactHookInput`\n    * `PermissionRequestHookInput`\n    * `SetupHookInput`\n    * `TeammateIdleHookInput`\n    * `TaskCompletedHookInput`\n    * `ConfigChangeHookInput`\n    * `WorktreeCreateHookInput`\n    * `WorktreeRemoveHookInput`\n    * `MessageDisplayHookInput`\n  * `HookJSONOutput`\n    * `AsyncHookJSONOutput`\n    * `SyncHookJSONOutput`\n* Tool Input Types\n  * `ToolInputSchemas`\n  * Agent\n  * AskUserQuestion\n  * Bash\n  * Monitor\n  * TaskOutput\n  * Edit\n  * Read\n  * Write\n  * Glob\n  * Grep\n  * TaskStop\n  * NotebookEdit\n  * WebFetch\n  * WebSearch\n  * Workflow\n  * TodoWrite\n  * TaskCreate\n  * TaskUpdate\n  * TaskGet\n  * TaskList\n  * ExitPlanMode\n  * ListMcpResources\n  * ReadMcpResource\n  * EnterWorktree\n* Tool Output Types\n  * `ToolOutputSchemas`\n  * Agent\n  * AskUserQuestion\n  * Bash\n  * Monitor\n  * Edit\n  * Read\n  * Write\n  * Glob\n  * Grep\n  * TaskStop\n  * NotebookEdit\n  * WebFetch\n  * WebSearch\n  * Workflow\n  * TodoWrite\n  * TaskCreate\n  * TaskUpdate\n  * TaskGet\n  * TaskList\n  * ExitPlanMode\n  * ListMcpResources\n  * ReadMcpResource\n  * EnterWorktree\n* Permission Types\n  * `PermissionUpdate`\n  * `PermissionBehavior`\n  * `PermissionUpdateDestination`\n  * `PermissionRuleValue`\n* Other Types\n  * `ApiKeySource`\n  * `SdkBeta`\n  * `SlashCommand`\n  * `ModelInfo`\n  * `AgentInfo`\n  * `McpServerStatus`\n  * `McpServerStatusConfig`\n  * `AccountInfo`\n  * `ModelUsage`\n  * `ConfigScope`\n  * `NonNullableUsage`\n  * `Usage`\n  * `CallToolResult`\n  * `ThinkingConfig`\n  * `SpawnedProcess`\n  * `SpawnOptions`\n  * `McpSetServersResult`\n  * `RewindFilesResult`\n  * `SDKStatusMessage`\n  * `SDKTaskNotificationMessage`\n  * `SDKToolUseSummaryMessage`\n  * `SDKHookStartedMessage`\n  * `SDKHookProgressMessage`\n  * `SDKHookResponseMessage`\n  * `SDKToolProgressMessage`\n  * `SDKAuthStatusMessage`\n  * `SDKTaskStartedMessage`\n  * `SDKTaskProgressMessage`\n  * `SDKTaskUpdatedMessage`\n  * `SDKBackgroundTasksChangedMessage`\n  * `SDKFilesPersistedEvent`\n  * `SDKRateLimitEvent`\n  * `SDKLocalCommandOutputMessage`\n  * `SDKCommandsChangedMessage`\n  * `SDKPromptSuggestionMessage`\n  * `SDKConversationResetMessage`\n  * `AbortError`\n* Sandbox Configuration\n  * `SandboxSettings`\n    * Example usage\n  * `SandboxNetworkConfig`\n  * `SandboxFilesystemConfig`\n  * Permissions Fallback for Unsandboxed Commands\n* See also\n\n### [typescript-v2-preview](https://code.claude.com/docs/en/agent-sdk/typescript-v2-preview.md)\n\n* Installation\n* Quick start\n  * One-shot prompt\n  * Basic session\n  * Multi-turn conversation\n  * Session resume\n  * Cleanup\n* API reference\n  * `unstable_v2_createSession()`\n  * `unstable_v2_resumeSession()`\n  * `unstable_v2_prompt()`\n  * SDKSession interface\n* Feature availability\n* See also\n\n### [python](https://code.claude.com/docs/en/agent-sdk/python.md)\n\n* Installation\n* Choosing between `query()` and `ClaudeSDKClient`\n  * Quick comparison\n  * When to use `query()` (one-off tasks)\n  * When to use `ClaudeSDKClient` (continuous conversation)\n* Functions\n  * `query()`\n    * Parameters\n    * Returns\n    * Example - With options\n  * `tool()`\n    * Parameters\n    * Input schema options\n    * Returns\n    * Example\n    * `ToolAnnotations`\n  * `create_sdk_mcp_server()`\n    * Parameters\n    * Returns\n    * Example\n  * `list_sessions()`\n    * Parameters\n    * Return type: `SDKSessionInfo`\n    * Example\n  * `get_session_messages()`\n    * Parameters\n    * Return type: `SessionMessage`\n    * Example\n  * `get_session_info()`\n    * Parameters\n    * Example\n  * `rename_session()`\n    * Parameters\n    * Example\n  * `tag_session()`\n    * Parameters\n    * Example\n* Classes\n  * `ClaudeSDKClient`\n    * Key Features\n    * Methods\n    * Context Manager Support\n    * Example - Continuing a conversation\n    * Example - Streaming input with ClaudeSDKClient\n    * Example - Using interrupts\n    * Example - Advanced permission control\n* Types\n  * `SdkMcpTool`\n  * `Transport`\n  * `ClaudeAgentOptions`\n    * Handle slow or stalled API responses\n  * `OutputFormat`\n  * `SystemPromptPreset`\n  * `SettingSource`\n    * Default behavior\n    * Why use setting\\_sources\n    * Settings precedence\n  * `AgentDefinition`\n  * `PermissionMode`\n  * `EffortLevel`\n  * `CanUseTool`\n  * `ToolPermissionContext`\n  * `PermissionResult`\n  * `PermissionResultAllow`\n  * `PermissionResultDeny`\n  * `PermissionUpdate`\n  * `PermissionRuleValue`\n  * `ToolsPreset`\n  * `ThinkingConfig`\n  * `SdkBeta`\n  * `McpSdkServerConfig`\n  * `McpServerConfig`\n    * `McpStdioServerConfig`\n    * `McpSSEServerConfig`\n    * `McpHttpServerConfig`\n  * `McpServerStatusConfig`\n  * `McpStatusResponse`\n  * `McpServerStatus`\n  * `SdkPluginConfig`\n* Message Types\n  * `Message`\n  * `UserMessage`\n  * `AssistantMessage`\n  * `AssistantMessageError`\n  * `SystemMessage`\n  * `ResultMessage`\n  * `StreamEvent`\n  * `RateLimitEvent`\n  * `RateLimitInfo`\n  * `TaskStartedMessage`\n  * `TaskUsage`\n  * `TaskProgressMessage`\n  * `TaskNotificationMessage`\n* Content Block Types\n  * `ContentBlock`\n  * `TextBlock`\n  * `ThinkingBlock`\n  * `ToolUseBlock`\n  * `ToolResultBlock`\n* Error Types\n  * `ClaudeSDKError`\n  * `CLINotFoundError`\n  * `CLIConnectionError`\n  * `ProcessError`\n  * `CLIJSONDecodeError`\n* Hook Types\n  * `HookEvent`\n  * `HookCallback`\n  * `HookContext`\n  * `HookMatcher`\n  * `HookInput`\n  * `BaseHookInput`\n  * `PreToolUseHookInput`\n  * `PostToolUseHookInput`\n  * `PostToolUseFailureHookInput`\n  * `UserPromptSubmitHookInput`\n  * `StopHookInput`\n  * `SubagentStopHookInput`\n  * `PreCompactHookInput`\n  * `NotificationHookInput`\n  * `SubagentStartHookInput`\n  * `PermissionRequestHookInput`\n  * `HookJSONOutput`\n    * `SyncHookJSONOutput`\n    * `HookSpecificOutput`\n    * `AsyncHookJSONOutput`\n  * Hook Usage Example\n* Tool Input/Output Types\n  * Agent\n  * AskUserQuestion\n  * Bash\n  * Monitor\n  * Edit\n  * Read\n  * Write\n  * Glob\n  * Grep\n  * NotebookEdit\n  * WebFetch\n  * WebSearch\n  * TodoWrite\n  * TaskCreate\n  * TaskUpdate\n  * TaskGet\n  * TaskList\n  * BashOutput\n  * KillBash\n  * ExitPlanMode\n  * ListMcpResources\n  * ReadMcpResource\n* Advanced Features with ClaudeSDKClient\n  * Building a Continuous Conversation Interface\n  * Using Hooks for Behavior Modification\n  * Real-time Progress Monitoring\n* Example Usage\n  * Basic file operations (using query)\n  * Error handling\n  * Streaming mode with client\n  * Using custom tools with ClaudeSDKClient\n* Sandbox Configuration\n  * `SandboxSettings`\n    * Example usage\n  * `SandboxNetworkConfig`\n  * `SandboxIgnoreViolations`\n  * Permissions Fallback for Unsandboxed Commands\n* See also\n\n### [migration-guide](https://code.claude.com/docs/en/agent-sdk/migration-guide.md)\n\n* Overview\n* What's Changed\n* Migration Steps\n  * For TypeScript/JavaScript Projects\n  * For Python Projects\n* Breaking changes\n  * Python: ClaudeCodeOptions renamed to ClaudeAgentOptions\n  * System prompt no longer default\n  * Settings sources default\n* Why the Rename?\n* Getting Help\n* Next Steps\n\n## What's New\n\n### [index](https://code.claude.com/docs/en/whats-new/index.md)\n\n* (No headings found)\n\n### [2026-w26](https://code.claude.com/docs/en/whats-new/2026-w26.md)\n\n* (No headings found)\n\n### [2026-w25](https://code.claude.com/docs/en/whats-new/2026-w25.md)\n\n* (No headings found)\n\n### [2026-w24](https://code.claude.com/docs/en/whats-new/2026-w24.md)\n\n* (No headings found)\n\n### [2026-w23](https://code.claude.com/docs/en/whats-new/2026-w23.md)\n\n* (No headings found)\n\n### [2026-w22](https://code.claude.com/docs/en/whats-new/2026-w22.md)\n\n* (No headings found)\n\n### [2026-w21](https://code.claude.com/docs/en/whats-new/2026-w21.md)\n\n* (No headings found)\n\n### [2026-w20](https://code.claude.com/docs/en/whats-new/2026-w20.md)\n\n* (No headings found)\n\n### [2026-w19](https://code.claude.com/docs/en/whats-new/2026-w19.md)\n\n* (No headings found)\n\n### [2026-w18](https://code.claude.com/docs/en/whats-new/2026-w18.md)\n\n* (No headings found)\n\n### [2026-w17](https://code.claude.com/docs/en/whats-new/2026-w17.md)\n\n* (No headings found)\n\n### [2026-w16](https://code.claude.com/docs/en/whats-new/2026-w16.md)\n\n* (No headings found)\n\n### [2026-w15](https://code.claude.com/docs/en/whats-new/2026-w15.md)\n\n* (No headings found)\n\n### [2026-w14](https://code.claude.com/docs/en/whats-new/2026-w14.md)\n\n* (No headings found)\n\n### [2026-w13](https://code.claude.com/docs/en/whats-new/2026-w13.md)\n\n* (No headings found)\n\n## Resources\n\n### [legal-and-compliance](https://code.claude.com/docs/en/legal-and-compliance.md)\n\n* Legal agreements\n  * License\n  * Commercial agreements\n* Compliance\n  * Healthcare compliance (BAA)\n* Usage policy\n  * Acceptable use\n  * Authentication and credential use\n* Security and trust\n  * Trust and safety\n  * Security vulnerability reporting\n","durationMs":708,"url":"https://code.claude.com/docs/en/claude_code_docs_map.md"},"sourceToolAssistantUUID":"5c8e3305-5669-4f6f-877b-f1dc576a366d","userType":"external","entrypoint":"cli","cwd":"/home/marcuh/claude-projects/ai-control","sessionId":"8fdc96f6-e540-4d59-bd12-3ce8764bcf18","version":"2.1.205","gitBranch":"main"}
{"parentUuid":"b2129525-c991-4080-af06-a2bd4c496142","isSidechain":true,"agentId":"aa19a86d514b7f8bd","message":{"model":"claude-haiku-4-5-20251001","id":"msg_011Ccr2nhjURZx7sARHAjP6z","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"","signature":"EpQHCpMBCA8YAipA6PUSOTvikvPflM3CPkJuEX+D6Ah8/xaHZRG0DR1uxQPf/ZZ+jmOAXehk0I2+l/B7RHUec4peMFLZRjR9mQVRXDIZY2xhdWRlLWhhaWt1LTQtNS0yMDI1MTAwMTgAQgh0aGlua2luZ1okNGJkZDE1Y2MtNDcxZS00ZTU2LWJhMWEtM2QzZDViNGYwMTdjEgw8Oi6rlFIij5rA0q8aDCGMKHOnRsN57O/XuyIw+i9rTbaqm343/oVn9GBSG2Nv21uqxse2aa1azRSkL1OdigfqewIiOSlNxAgIEUUWKq0FsJnEQaEUGDefBc9JGoQa9Us2uDfHgOhKJ62Ehx+0BwHFkCTbolGvVnvLM2UlD/+qJGHlEZdWJgYmeBka6zjf4nymS+gcufdvG/QgI7PJVmlu70SU0R/Xvr1azSgRQ4edKrpFSszNT1ibttgaLdBKIvGeEYmU9u+NK84vEA6Bd6WlMObc1WmSJzeCrvxmi4mmyRV5sOqeQa/d0RAe7dJDCyPez0+5ZxI6PqCR+xZELnnOSMn1/NmIJoK58lLEtqQDjqYBgcg1bMAHefjPYCncwlg4gKPi3qJt0CThMdkJujTvYxKyM8T1R01VedMhJ26scDOj04Xyz78SKoaYXauEEwkCrFL1kG2/7NgX58evgqAspyI+LuweNvKSNgLT3EC14Fbud+SS6eMDcGDM+HhlPbbkmxLYoKKnKlgK61D/7/wtDzkNqGLsewGnnESGy+0gEpqZXhkSNadVvdda4WCJO4NGX8qYkfm4yeWltWDHaD34BD3uLzxyHltdGexojMtzdLuNICWbTVEDgDv6gBDp164/V581j6K6t7mAqvz+48LCvT4deFEDk9xGD156xIoa3FipPXdN7Gm5vl/kyV2MrVGbAjCmNSK0r8wBcY+iVzcsBFSUULav5eQeiNdlF9n7pwAc6sfTKSn4SHovH5s/fN/3dNVHnfC4P4z7DjKOnW3HqN0WHOl9u/2ahPfR20vNhjB/wXdD1HZWaGgJ+WXTsxOZuQTNawFG54vwE1yNN5evagUow7BNcHnTkJ1Uz3VyMipaBwu/mBV3v7BThfMR4Tm1sK0RKPRWPTHaTzPmzDYD06Khz2NO00VtQA3S71Ya5FLwYyXcv5Pn7mlpsxe/Mtj7vrF+tEKU4wlHnYxhqX7iK3Eb51B3CxM/ZM7YgH6cytafINV7AhzexnvwuxgB"}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":8,"cache_creation_input_tokens":955,"cache_read_input_tokens":13323,"cache_creation":{"ephemeral_5m_input_tokens":955,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011Ccr2ngnRUvrRZz8pxXGcz","attributionAgent":"claude-code-guide","type":"assistant","uuid":"a7103d92-c5bf-4807-a11e-b1569843be24","timestamp":"2026-07-09T06:44:39.275Z","userType":"external","entrypoint":"cli","cwd":"/home/marcuh/claude-projects/ai-control","sessionId":"8fdc96f6-e540-4d59-bd12-3ce8764bcf18","version":"2.1.205","gitBranch":"main"}
{"parentUuid":"a7103d92-c5bf-4807-a11e-b1569843be24","isSidechain":true,"agentId":"aa19a86d514b7f8bd","message":{"model":"claude-haiku-4-5-20251001","id":"msg_011Ccr2nhjURZx7sARHAjP6z","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01RnujUugarHHC2QeRmvpNGT","name":"WebFetch","input":{"url":"https://code.claude.com/docs/en/how-claude-code-works.md","prompt":"Resume sessions picker cwd working directory scope filter"},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":8,"cache_creation_input_tokens":955,"cache_read_input_tokens":13323,"output_tokens":317,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":955},"inference_geo":"not_available","iterations":[{"input_tokens":8,"output_tokens":317,"cache_read_input_tokens":13323,"cache_creation_input_tokens":955,"cache_creation":{"ephemeral_5m_input_tokens":955,"ephemeral_1h_input_tokens":0},"type":"message"}],"speed":"standard"},"diagnostics":null},"requestId":"req_011Ccr2ngnRUvrRZz8pxXGcz","attributionAgent":"claude-code-guide","type":"assistant","uuid":"e5932273-c96e-4ce2-a88c-5b633ef2e4a0","timestamp":"2026-07-09T06:44:39.792Z","userType":"external","entrypoint":"cli","cwd":"/home/marcuh/claude-projects/ai-control","sessionId":"8fdc96f6-e540-4d59-bd12-3ce8764bcf18","version":"2.1.205","gitBranch":"main"}
{"parentUuid":"e5932273-c96e-4ce2-a88c-5b633ef2e4a0","isSidechain":true,"promptId":"32314f2e-62a5-43e9-b469-ea1a64ebd693","agentId":"aa19a86d514b7f8bd","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01RnujUugarHHC2QeRmvpNGT","type":"tool_result","content":"> ## Documentation Index\n> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt\n> Use this file to discover all available pages before exploring further.\n\n# How Claude Code works\n\n> Understand the agentic loop, built-in tools, and how Claude Code interacts with your project.\n\nClaude Code is an agentic assistant that runs in your terminal. While it excels at coding, it can help with anything you can do from the command line: writing docs, running builds, searching files, researching topics, and more.\n\nThis guide covers the core architecture, built-in capabilities, and [tips for working effectively](#work-effectively-with-claude-code). For step-by-step walkthroughs, see [Common workflows](/en/common-workflows). For extensibility features like skills, MCP, and hooks, see [Extend Claude Code](/en/features-overview).\n\n## The agentic loop\n\nWhen you give Claude a task, it works through three phases: **gather context**, **take action**, and **verify results**. These phases blend together. Claude uses tools throughout, whether searching files to understand your code, editing to make changes, or running tests to check its work.\n\n<img src=\"https://mintcdn.com/claude-code/ikqp3_70mqIahteV/images/agentic-loop.svg?fit=max&auto=format&n=ikqp3_70mqIahteV&q=85&s=4a30fb7ce2815012a9f27c955e2c6bb0\" alt=\"Diagram of the agentic loop: Your prompt leads to Claude gathering context, taking action, verifying results, and repeating until task complete. You can interrupt at any point.\" width=\"720\" height=\"280\" data-path=\"images/agentic-loop.svg\" />\n\nThe loop adapts to what you ask. A question about your codebase might only need context gathering. A bug fix cycles through all three phases repeatedly. A refactor might involve extensive verification. Claude decides what each step requires based on what it learned from the previous step, chaining dozens of actions together and course-correcting along the way.\n\nYou're part of this loop too. You can interrupt at any point to steer Claude in a different direction, provide additional context, or ask it to try a different approach. Claude works autonomously but stays responsive to your input.\n\nThe agentic loop is powered by two components: [models](#models) that reason and [tools](#tools) that act. Claude Code serves as the **agentic harness** around Claude: it provides the tools, context management, and execution environment that turn a language model into a capable coding agent.\n\n### Models\n\nClaude Code uses Claude models to understand your code and reason about tasks. Claude can read code in any language, understand how components connect, and figure out what needs to change to accomplish your goal. For complex tasks, it breaks work into steps, executes them, and adjusts based on what it learns.\n\n[Multiple models](/en/model-config) are available with different tradeoffs. Sonnet handles most coding tasks well. Opus provides stronger reasoning for complex architectural decisions. Switch with `/model` during a session or start with `claude --model <name>`.\n\nWhen this guide says \"Claude chooses\" or \"Claude decides,\" it's the model doing the reasoning.\n\n### Tools\n\nTools are what make Claude Code agentic. Without tools, Claude can only respond with text. With tools, Claude can act: read your code, edit files, run commands, search the web, and interact with external services. Each tool use returns information that feeds back into the loop, informing Claude's next decision.\n\nThe built-in tools generally fall into five categories, each representing a different kind of agency.\n\n| Category              | What Claude can do                                                                                                                                            |\n| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **File operations**   | Read files, edit code, create new files, rename and reorganize                                                                                                |\n| **Search**            | Find files by pattern, search content with regex, explore codebases                                                                                           |\n| **Execution**         | Run shell commands, start servers, run tests, use git                                                                                                         |\n| **Web**               | Search the web, fetch documentation, look up error messages                                                                                                   |\n| **Code intelligence** | See type errors and warnings after edits, jump to definitions, find references (requires [code intelligence plugins](/en/discover-plugins#code-intelligence)) |\n\nThese are the primary capabilities. Claude also has tools for spawning subagents, asking you questions, and other orchestration tasks. See [Tools available to Claude](/en/tools-reference) for the complete list.\n\nClaude chooses which tools to use based on your prompt and what it learns along the way. When you say \"fix the failing tests,\" Claude might:\n\n1. Run the test suite to see what's failing\n2. Read the error output\n3. Search for the relevant source files\n4. Read those files to understand the code\n5. Edit the files to fix the issue\n6. Run the tests again to verify\n\nEach tool use gives Claude new information that informs the next step. This is the agentic loop in action.\n\n**Extending the base capabilities:** The built-in tools are the foundation. You can extend what Claude knows with [skills](/en/skills), connect to external services with [MCP](/en/mcp), automate workflows with [hooks](/en/hooks), and offload tasks to [subagents](/en/sub-agents). These extensions form a layer on top of the core agentic loop. See [Extend Claude Code](/en/features-overview) for guidance on choosing the right extension for your needs.\n\n## What Claude can access\n\nThis guide focuses on the terminal. Claude Code also runs in [VS Code](/en/vs-code), [JetBrains IDEs](/en/jetbrains), and other environments.\n\nWhen you run `claude` in a directory, Claude Code gains access to:\n\n* **Your project.** Files in your directory and subdirectories, plus files elsewhere with your permission.\n* **Your terminal.** Any command you could run: build tools, git, package managers, system utilities, scripts. If you can do it from the command line, Claude can too.\n* **Your git state.** Current branch, uncommitted changes, and recent commit history.\n* **Your [CLAUDE.md](/en/memory).** A markdown file where you store project-specific instructions, conventions, and context that Claude should know every session.\n* **[Auto memory](/en/memory#auto-memory).** Learnings Claude saves automatically as you work, like project patterns and your preferences. The first 200 lines or 25KB of MEMORY.md, whichever comes first, load at the start of each session.\n* **Extensions you configure.** [MCP servers](/en/mcp) for external services, [skills](/en/skills) for workflows, [subagents](/en/sub-agents) for delegated work, and [Claude in Chrome](/en/chrome) for browser interaction.\n\nBecause Claude sees your whole project, it can work across it. When you ask Claude to \"fix the authentication bug,\" it searches for relevant files, reads multiple files to understand context, makes coordinated edits across them, runs tests to verify the fix, and commits the changes if you ask. This is different from inline code assistants that only see the current file.\n\n## Environments and interfaces\n\nThe agentic loop, tools, and capabilities described above are the same everywhere you use Claude Code. What changes is where the code executes and how you interact with it.\n\n### Execution environments\n\nClaude Code runs in three environments, each with different tradeoffs for where your code executes.\n\n| Environment        | Where code runs                         | Use case                                                   |\n| ------------------ | --------------------------------------- | ---------------------------------------------------------- |\n| **Local**          | Your machine                            | Default. Full access to your files, tools, and environment |\n| **Cloud**          | Anthropic-managed VMs                   | Offload tasks, work on repos you don't have locally        |\n| **Remote Control** | Your machine, controlled from a browser | Use the web UI while keeping everything local              |\n\n### Interfaces\n\nYou can access Claude Code through the terminal, the [desktop app](/en/desktop), [IDE extensions](/en/vs-code), [claude.ai/code](https://claude.ai/code), [Remote Control](/en/remote-control), [Slack](/en/slack), and [CI/CD pipelines](/en/github-actions). The interface determines how you see and interact with Claude, but the underlying agentic loop is identical. See [Use Claude Code everywhere](/en/overview#use-claude-code-everywhere) for the full list.\n\n## Work with sessions\n\nClaude Code saves your conversation locally as you work. Each message, tool use, and result is written to a plaintext JSONL file under `~/.claude/projects/`, which enables [rewinding](#undo-changes-with-checkpoints), [resuming, and forking](#resume-or-fork-sessions) sessions. Before Claude makes code changes, it also snapshots the affected files so you can revert if needed. For paths, retention, and how to clear this data, see [application data in `~/.claude`](/en/claude-directory#application-data).\n\n**Sessions are independent.** Each new session starts with a fresh context window, without the conversation history from previous sessions. Claude can persist learnings across sessions using [auto memory](/en/memory#auto-memory), and you can add your own persistent instructions in [CLAUDE.md](/en/memory).\n\n### Work across branches\n\nEach Claude Code conversation is a session tied to your current directory. The `/resume` picker shows sessions from the current worktree by default, with keyboard shortcuts to widen the list to other worktrees or projects. See [Manage sessions](/en/sessions#use-the-session-picker) for the full list of picker shortcuts and how name resolution works.\n\nClaude sees your current branch's files. When you switch branches, Claude sees the new branch's files, but your conversation history stays the same. Claude remembers what you discussed even after switching.\n\nSince sessions are tied to directories, you can run parallel Claude sessions by using [git worktrees](/en/worktrees), which create separate directories for individual branches.\n\n### Resume or fork sessions\n\nResuming a session with `claude --continue` or `claude --resume` reopens it under the same session ID and appends new messages to the existing conversation. Forking with `--fork-session` or `/branch` copies the history into a new session ID, leaving the original unchanged.\n\n<img src=\"https://mintcdn.com/claude-code/ikqp3_70mqIahteV/images/session-continuity.svg?fit=max&auto=format&n=ikqp3_70mqIahteV&q=85&s=04ed0984a58e4127e05b3640265241a3\" alt=\"Diagram of session continuity: resume continues the same session, fork creates a new branch with a new ID.\" width=\"560\" height=\"280\" data-path=\"images/session-continuity.svg\" />\n\nFor the resume flags, the `/resume` picker, naming, and what happens when the same session is open in two terminals, see [Manage sessions](/en/sessions).\n\n### The context window\n\nClaude's context window holds your conversation history, file contents, command outputs, [CLAUDE.md](/en/memory), [auto memory](/en/memory#auto-memory), loaded skills, and system instructions. As you work, context fills up. Claude compacts automatically, but instructions from early in the conversation can get lost. Put persistent rules in CLAUDE.md, and run `/context` to see what's using space.\n\nFor an interactive walkthrough of what loads and when, see [Explore the context window](/en/context-window).\n\n#### When context fills up\n\nClaude Code manages context automatically as you approach the limit. It clears older tool outputs first, then summarizes the conversation if needed. Your requests and key code snippets are preserved; detailed instructions from early in the conversation may be lost. Put persistent rules in CLAUDE.md rather than relying on conversation history.\n\nTo control what's preserved during compaction, add a \"Compact Instructions\" section to CLAUDE.md or run `/compact` with a focus (like `/compact focus on the API changes`).\n\nIf a single file or tool output is so large that context refills immediately after each summary, Claude Code stops auto-compacting after a few attempts and shows an error instead of looping. See [Auto-compaction stops with a thrashing error](/en/troubleshooting#auto-compaction-stops-with-a-thrashing-error) for recovery steps.\n\nRun `/context` to see what's using space. MCP tool definitions are deferred by default and loaded on demand via [tool search](/en/mcp#scale-with-mcp-tool-search), so only tool names consume context until Claude uses a specific tool. Run `/mcp` to check per-server costs.\n\n#### Manage context with skills and subagents\n\nBeyond compaction, you can use other features to control what loads into context.\n\n[Skills](/en/skills) load on demand. Claude sees skill descriptions at session start, but the full content only loads when a skill is used. For skills you invoke manually, set `disable-model-invocation: true` to keep descriptions out of context until you need them. For skills you didn't write, use [`skillOverrides`](/en/skills#override-skill-visibility-from-settings) to do the same from settings.\n\n[Subagents](/en/sub-agents) get their own fresh context, completely separate from your main conversation. Their work doesn't bloat your context. When done, they return a summary. This isolation is why subagents help with long sessions.\n\nSee [context costs](/en/features-overview#understand-context-costs) for what each feature costs, and [reduce token usage](/en/costs#reduce-token-usage) for tips on managing context.\n\n## Stay safe with checkpoints and permissions\n\nClaude has two safety mechanisms: checkpoints let you undo file changes, and permissions control what Claude can do without asking.\n\n### Undo changes with checkpoints\n\n**Every file edit is reversible.** Before Claude edits any file, it snapshots the current contents. If something goes wrong, press `Esc` twice to rewind to a previous state, or ask Claude to undo.\n\nCheckpoints are local to your session, separate from git. They only cover file changes. Actions that affect remote systems (databases, APIs, deployments) can't be checkpointed, which is why Claude asks before running commands with external side effects.\n\n### Control what Claude can do\n\nPress `Shift+Tab` to cycle through permission modes:\n\n* **Default**: Claude asks before file edits and shell commands\n* **Auto-accept edits**: Claude edits files and runs common filesystem commands like `mkdir` and `mv` without asking, still asks for other commands\n* **Plan mode**: Claude explores and proposes a plan without editing your source files; permission prompts still apply as in default mode\n* **Auto mode**: Claude evaluates all actions with background safety checks. Currently a research preview\n\nYou can also allow specific commands in `.claude/settings.json` so Claude doesn't ask each time. This is useful for trusted commands like `npm test` or `git status`. Settings can be scoped from organization-wide policies down to personal preferences. See [Permissions](/en/permissions) for details.\n\n***\n\n## Work effectively with Claude Code\n\nThese tips help you get better results from Claude Code.\n\n### Ask Claude Code for help\n\nClaude Code can teach you how to use it. Ask questions like \"how do I set up hooks?\" or \"what's the best way to structure my CLAUDE.md?\" and Claude will explain.\n\nBuilt-in commands also guide you through setup:\n\n* `/init` walks you through creating a CLAUDE.md for your project\n* `/doctor` diagnoses common issues with your installation\n\n### It's a conversation\n\nClaude Code is conversational. You don't need perfect prompts. Start with what you want, then refine:\n\n```text theme={null}\nFix the login bug\n```\n\n\\[Claude investigates, tries something]\n\n```text theme={null}\nThat's not quite right. The issue is in the session handling.\n```\n\n\\[Claude adjusts approach]\n\nWhen the first attempt isn't right, you don't start over. You iterate.\n\n#### Interrupt and steer\n\nYou can redirect Claude at any point without waiting for the turn to finish or starting over:\n\n* **Press `Esc`** to stop Claude immediately. The running tool call is canceled and Claude waits for your next instruction.\n* **Type a correction and press `Enter`** to send it without stopping the running tool. Claude reads it as soon as the current action completes and adjusts before deciding its next step.\n\n### Be specific upfront\n\nThe more precise your initial prompt, the fewer corrections you'll need. Reference specific files, mention constraints, and point to example patterns.\n\n```text theme={null}\nThe checkout flow is broken for users with expired cards.\nCheck src/payments/ for the issue, especially token refresh.\nWrite a failing test first, then fix it.\n```\n\nVague prompts work, but you'll spend more time steering. Specific prompts like the one above often succeed on the first attempt.\n\n### Give Claude something to verify against\n\nClaude performs better when it can check its own work. Include test cases, paste screenshots of expected UI, or define the output you want.\n\n```text theme={null}\nImplement validateEmail. Test cases: 'user@example.com' → true,\n'invalid' → false, 'user@.com' → false. Run the tests after.\n```\n\nFor visual work, paste a screenshot of the design and ask Claude to compare its implementation against it.\n\n### Explore before implementing\n\nFor complex problems, separate research from coding. Use plan mode (`Shift+Tab` twice) to analyze the codebase first:\n\n```text theme={null}\nRead src/auth/ and understand how we handle sessions.\nThen create a plan for adding OAuth support.\n```\n\nReview the plan, refine it through conversation, then let Claude implement. This two-phase approach produces better results than jumping straight to code.\n\n### Delegate, don't dictate\n\nThink of delegating to a capable colleague. Give context and direction, then trust Claude to figure out the details:\n\n```text theme={null}\nThe checkout flow is broken for users with expired cards.\nThe relevant code is in src/payments/. Can you investigate and fix it?\n```\n\nYou don't need to specify which files to read or what commands to run. Claude figures that out.\n\n## What's next\n\n<CardGroup cols={2}>\n  <Card title=\"Extend with features\" icon=\"puzzle-piece\" href=\"/en/features-overview\">\n    Add Skills, MCP connections, and custom commands\n  </Card>\n\n  <Card title=\"Common workflows\" icon=\"graduation-cap\" href=\"/en/common-workflows\">\n    Step-by-step guides for typical tasks\n  </Card>\n</CardGroup>\n"}]},"uuid":"865a1316-3380-42f0-9c08-599ae26662d8","timestamp":"2026-07-09T06:44:40.850Z","toolUseResult":{"bytes":19026,"code":200,"codeText":"OK","result":"> ## Documentation Index\n> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt\n> Use this file to discover all available pages before exploring further.\n\n# How Claude Code works\n\n> Understand the agentic loop, built-in tools, and how Claude Code interacts with your project.\n\nClaude Code is an agentic assistant that runs in your terminal. While it excels at coding, it can help with anything you can do from the command line: writing docs, running builds, searching files, researching topics, and more.\n\nThis guide covers the core architecture, built-in capabilities, and [tips for working effectively](#work-effectively-with-claude-code). For step-by-step walkthroughs, see [Common workflows](/en/common-workflows). For extensibility features like skills, MCP, and hooks, see [Extend Claude Code](/en/features-overview).\n\n## The agentic loop\n\nWhen you give Claude a task, it works through three phases: **gather context**, **take action**, and **verify results**. These phases blend together. Claude uses tools throughout, whether searching files to understand your code, editing to make changes, or running tests to check its work.\n\n<img src=\"https://mintcdn.com/claude-code/ikqp3_70mqIahteV/images/agentic-loop.svg?fit=max&auto=format&n=ikqp3_70mqIahteV&q=85&s=4a30fb7ce2815012a9f27c955e2c6bb0\" alt=\"Diagram of the agentic loop: Your prompt leads to Claude gathering context, taking action, verifying results, and repeating until task complete. You can interrupt at any point.\" width=\"720\" height=\"280\" data-path=\"images/agentic-loop.svg\" />\n\nThe loop adapts to what you ask. A question about your codebase might only need context gathering. A bug fix cycles through all three phases repeatedly. A refactor might involve extensive verification. Claude decides what each step requires based on what it learned from the previous step, chaining dozens of actions together and course-correcting along the way.\n\nYou're part of this loop too. You can interrupt at any point to steer Claude in a different direction, provide additional context, or ask it to try a different approach. Claude works autonomously but stays responsive to your input.\n\nThe agentic loop is powered by two components: [models](#models) that reason and [tools](#tools) that act. Claude Code serves as the **agentic harness** around Claude: it provides the tools, context management, and execution environment that turn a language model into a capable coding agent.\n\n### Models\n\nClaude Code uses Claude models to understand your code and reason about tasks. Claude can read code in any language, understand how components connect, and figure out what needs to change to accomplish your goal. For complex tasks, it breaks work into steps, executes them, and adjusts based on what it learns.\n\n[Multiple models](/en/model-config) are available with different tradeoffs. Sonnet handles most coding tasks well. Opus provides stronger reasoning for complex architectural decisions. Switch with `/model` during a session or start with `claude --model <name>`.\n\nWhen this guide says \"Claude chooses\" or \"Claude decides,\" it's the model doing the reasoning.\n\n### Tools\n\nTools are what make Claude Code agentic. Without tools, Claude can only respond with text. With tools, Claude can act: read your code, edit files, run commands, search the web, and interact with external services. Each tool use returns information that feeds back into the loop, informing Claude's next decision.\n\nThe built-in tools generally fall into five categories, each representing a different kind of agency.\n\n| Category              | What Claude can do                                                                                                                                            |\n| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **File operations**   | Read files, edit code, create new files, rename and reorganize                                                                                                |\n| **Search**            | Find files by pattern, search content with regex, explore codebases                                                                                           |\n| **Execution**         | Run shell commands, start servers, run tests, use git                                                                                                         |\n| **Web**               | Search the web, fetch documentation, look up error messages                                                                                                   |\n| **Code intelligence** | See type errors and warnings after edits, jump to definitions, find references (requires [code intelligence plugins](/en/discover-plugins#code-intelligence)) |\n\nThese are the primary capabilities. Claude also has tools for spawning subagents, asking you questions, and other orchestration tasks. See [Tools available to Claude](/en/tools-reference) for the complete list.\n\nClaude chooses which tools to use based on your prompt and what it learns along the way. When you say \"fix the failing tests,\" Claude might:\n\n1. Run the test suite to see what's failing\n2. Read the error output\n3. Search for the relevant source files\n4. Read those files to understand the code\n5. Edit the files to fix the issue\n6. Run the tests again to verify\n\nEach tool use gives Claude new information that informs the next step. This is the agentic loop in action.\n\n**Extending the base capabilities:** The built-in tools are the foundation. You can extend what Claude knows with [skills](/en/skills), connect to external services with [MCP](/en/mcp), automate workflows with [hooks](/en/hooks), and offload tasks to [subagents](/en/sub-agents). These extensions form a layer on top of the core agentic loop. See [Extend Claude Code](/en/features-overview) for guidance on choosing the right extension for your needs.\n\n## What Claude can access\n\nThis guide focuses on the terminal. Claude Code also runs in [VS Code](/en/vs-code), [JetBrains IDEs](/en/jetbrains), and other environments.\n\nWhen you run `claude` in a directory, Claude Code gains access to:\n\n* **Your project.** Files in your directory and subdirectories, plus files elsewhere with your permission.\n* **Your terminal.** Any command you could run: build tools, git, package managers, system utilities, scripts. If you can do it from the command line, Claude can too.\n* **Your git state.** Current branch, uncommitted changes, and recent commit history.\n* **Your [CLAUDE.md](/en/memory).** A markdown file where you store project-specific instructions, conventions, and context that Claude should know every session.\n* **[Auto memory](/en/memory#auto-memory).** Learnings Claude saves automatically as you work, like project patterns and your preferences. The first 200 lines or 25KB of MEMORY.md, whichever comes first, load at the start of each session.\n* **Extensions you configure.** [MCP servers](/en/mcp) for external services, [skills](/en/skills) for workflows, [subagents](/en/sub-agents) for delegated work, and [Claude in Chrome](/en/chrome) for browser interaction.\n\nBecause Claude sees your whole project, it can work across it. When you ask Claude to \"fix the authentication bug,\" it searches for relevant files, reads multiple files to understand context, makes coordinated edits across them, runs tests to verify the fix, and commits the changes if you ask. This is different from inline code assistants that only see the current file.\n\n## Environments and interfaces\n\nThe agentic loop, tools, and capabilities described above are the same everywhere you use Claude Code. What changes is where the code executes and how you interact with it.\n\n### Execution environments\n\nClaude Code runs in three environments, each with different tradeoffs for where your code executes.\n\n| Environment        | Where code runs                         | Use case                                                   |\n| ------------------ | --------------------------------------- | ---------------------------------------------------------- |\n| **Local**          | Your machine                            | Default. Full access to your files, tools, and environment |\n| **Cloud**          | Anthropic-managed VMs                   | Offload tasks, work on repos you don't have locally        |\n| **Remote Control** | Your machine, controlled from a browser | Use the web UI while keeping everything local              |\n\n### Interfaces\n\nYou can access Claude Code through the terminal, the [desktop app](/en/desktop), [IDE extensions](/en/vs-code), [claude.ai/code](https://claude.ai/code), [Remote Control](/en/remote-control), [Slack](/en/slack), and [CI/CD pipelines](/en/github-actions). The interface determines how you see and interact with Claude, but the underlying agentic loop is identical. See [Use Claude Code everywhere](/en/overview#use-claude-code-everywhere) for the full list.\n\n## Work with sessions\n\nClaude Code saves your conversation locally as you work. Each message, tool use, and result is written to a plaintext JSONL file under `~/.claude/projects/`, which enables [rewinding](#undo-changes-with-checkpoints), [resuming, and forking](#resume-or-fork-sessions) sessions. Before Claude makes code changes, it also snapshots the affected files so you can revert if needed. For paths, retention, and how to clear this data, see [application data in `~/.claude`](/en/claude-directory#application-data).\n\n**Sessions are independent.** Each new session starts with a fresh context window, without the conversation history from previous sessions. Claude can persist learnings across sessions using [auto memory](/en/memory#auto-memory), and you can add your own persistent instructions in [CLAUDE.md](/en/memory).\n\n### Work across branches\n\nEach Claude Code conversation is a session tied to your current directory. The `/resume` picker shows sessions from the current worktree by default, with keyboard shortcuts to widen the list to other worktrees or projects. See [Manage sessions](/en/sessions#use-the-session-picker) for the full list of picker shortcuts and how name resolution works.\n\nClaude sees your current branch's files. When you switch branches, Claude sees the new branch's files, but your conversation history stays the same. Claude remembers what you discussed even after switching.\n\nSince sessions are tied to directories, you can run parallel Claude sessions by using [git worktrees](/en/worktrees), which create separate directories for individual branches.\n\n### Resume or fork sessions\n\nResuming a session with `claude --continue` or `claude --resume` reopens it under the same session ID and appends new messages to the existing conversation. Forking with `--fork-session` or `/branch` copies the history into a new session ID, leaving the original unchanged.\n\n<img src=\"https://mintcdn.com/claude-code/ikqp3_70mqIahteV/images/session-continuity.svg?fit=max&auto=format&n=ikqp3_70mqIahteV&q=85&s=04ed0984a58e4127e05b3640265241a3\" alt=\"Diagram of session continuity: resume continues the same session, fork creates a new branch with a new ID.\" width=\"560\" height=\"280\" data-path=\"images/session-continuity.svg\" />\n\nFor the resume flags, the `/resume` picker, naming, and what happens when the same session is open in two terminals, see [Manage sessions](/en/sessions).\n\n### The context window\n\nClaude's context window holds your conversation history, file contents, command outputs, [CLAUDE.md](/en/memory), [auto memory](/en/memory#auto-memory), loaded skills, and system instructions. As you work, context fills up. Claude compacts automatically, but instructions from early in the conversation can get lost. Put persistent rules in CLAUDE.md, and run `/context` to see what's using space.\n\nFor an interactive walkthrough of what loads and when, see [Explore the context window](/en/context-window).\n\n#### When context fills up\n\nClaude Code manages context automatically as you approach the limit. It clears older tool outputs first, then summarizes the conversation if needed. Your requests and key code snippets are preserved; detailed instructions from early in the conversation may be lost. Put persistent rules in CLAUDE.md rather than relying on conversation history.\n\nTo control what's preserved during compaction, add a \"Compact Instructions\" section to CLAUDE.md or run `/compact` with a focus (like `/compact focus on the API changes`).\n\nIf a single file or tool output is so large that context refills immediately after each summary, Claude Code stops auto-compacting after a few attempts and shows an error instead of looping. See [Auto-compaction stops with a thrashing error](/en/troubleshooting#auto-compaction-stops-with-a-thrashing-error) for recovery steps.\n\nRun `/context` to see what's using space. MCP tool definitions are deferred by default and loaded on demand via [tool search](/en/mcp#scale-with-mcp-tool-search), so only tool names consume context until Claude uses a specific tool. Run `/mcp` to check per-server costs.\n\n#### Manage context with skills and subagents\n\nBeyond compaction, you can use other features to control what loads into context.\n\n[Skills](/en/skills) load on demand. Claude sees skill descriptions at session start, but the full content only loads when a skill is used. For skills you invoke manually, set `disable-model-invocation: true` to keep descriptions out of context until you need them. For skills you didn't write, use [`skillOverrides`](/en/skills#override-skill-visibility-from-settings) to do the same from settings.\n\n[Subagents](/en/sub-agents) get their own fresh context, completely separate from your main conversation. Their work doesn't bloat your context. When done, they return a summary. This isolation is why subagents help with long sessions.\n\nSee [context costs](/en/features-overview#understand-context-costs) for what each feature costs, and [reduce token usage](/en/costs#reduce-token-usage) for tips on managing context.\n\n## Stay safe with checkpoints and permissions\n\nClaude has two safety mechanisms: checkpoints let you undo file changes, and permissions control what Claude can do without asking.\n\n### Undo changes with checkpoints\n\n**Every file edit is reversible.** Before Claude edits any file, it snapshots the current contents. If something goes wrong, press `Esc` twice to rewind to a previous state, or ask Claude to undo.\n\nCheckpoints are local to your session, separate from git. They only cover file changes. Actions that affect remote systems (databases, APIs, deployments) can't be checkpointed, which is why Claude asks before running commands with external side effects.\n\n### Control what Claude can do\n\nPress `Shift+Tab` to cycle through permission modes:\n\n* **Default**: Claude asks before file edits and shell commands\n* **Auto-accept edits**: Claude edits files and runs common filesystem commands like `mkdir` and `mv` without asking, still asks for other commands\n* **Plan mode**: Claude explores and proposes a plan without editing your source files; permission prompts still apply as in default mode\n* **Auto mode**: Claude evaluates all actions with background safety checks. Currently a research preview\n\nYou can also allow specific commands in `.claude/settings.json` so Claude doesn't ask each time. This is useful for trusted commands like `npm test` or `git status`. Settings can be scoped from organization-wide policies down to personal preferences. See [Permissions](/en/permissions) for details.\n\n***\n\n## Work effectively with Claude Code\n\nThese tips help you get better results from Claude Code.\n\n### Ask Claude Code for help\n\nClaude Code can teach you how to use it. Ask questions like \"how do I set up hooks?\" or \"what's the best way to structure my CLAUDE.md?\" and Claude will explain.\n\nBuilt-in commands also guide you through setup:\n\n* `/init` walks you through creating a CLAUDE.md for your project\n* `/doctor` diagnoses common issues with your installation\n\n### It's a conversation\n\nClaude Code is conversational. You don't need perfect prompts. Start with what you want, then refine:\n\n```text theme={null}\nFix the login bug\n```\n\n\\[Claude investigates, tries something]\n\n```text theme={null}\nThat's not quite right. The issue is in the session handling.\n```\n\n\\[Claude adjusts approach]\n\nWhen the first attempt isn't right, you don't start over. You iterate.\n\n#### Interrupt and steer\n\nYou can redirect Claude at any point without waiting for the turn to finish or starting over:\n\n* **Press `Esc`** to stop Claude immediately. The running tool call is canceled and Claude waits for your next instruction.\n* **Type a correction and press `Enter`** to send it without stopping the running tool. Claude reads it as soon as the current action completes and adjusts before deciding its next step.\n\n### Be specific upfront\n\nThe more precise your initial prompt, the fewer corrections you'll need. Reference specific files, mention constraints, and point to example patterns.\n\n```text theme={null}\nThe checkout flow is broken for users with expired cards.\nCheck src/payments/ for the issue, especially token refresh.\nWrite a failing test first, then fix it.\n```\n\nVague prompts work, but you'll spend more time steering. Specific prompts like the one above often succeed on the first attempt.\n\n### Give Claude something to verify against\n\nClaude performs better when it can check its own work. Include test cases, paste screenshots of expected UI, or define the output you want.\n\n```text theme={null}\nImplement validateEmail. Test cases: 'user@example.com' → true,\n'invalid' → false, 'user@.com' → false. Run the tests after.\n```\n\nFor visual work, paste a screenshot of the design and ask Claude to compare its implementation against it.\n\n### Explore before implementing\n\nFor complex problems, separate research from coding. Use plan mode (`Shift+Tab` twice) to analyze the codebase first:\n\n```text theme={null}\nRead src/auth/ and understand how we handle sessions.\nThen create a plan for adding OAuth support.\n```\n\nReview the plan, refine it through conversation, then let Claude implement. This two-phase approach produces better results than jumping straight to code.\n\n### Delegate, don't dictate\n\nThink of delegating to a capable colleague. Give context and direction, then trust Claude to figure out the details:\n\n```text theme={null}\nThe checkout flow is broken for users with expired cards.\nThe relevant code is in src/payments/. Can you investigate and fix it?\n```\n\nYou don't need to specify which files to read or what commands to run. Claude figures that out.\n\n## What's next\n\n<CardGroup cols={2}>\n  <Card title=\"Extend with features\" icon=\"puzzle-piece\" href=\"/en/features-overview\">\n    Add Skills, MCP connections, and custom commands\n  </Card>\n\n  <Card title=\"Common workflows\" icon=\"graduation-cap\" href=\"/en/common-workflows\">\n    Step-by-step guides for typical tasks\n  </Card>\n</CardGroup>\n","durationMs":1055,"url":"https://code.claude.com/docs/en/how-claude-code-works.md"},"sourceToolAssistantUUID":"e5932273-c96e-4ce2-a88c-5b633ef2e4a0","userType":"external","entrypoint":"cli","cwd":"/home/marcuh/claude-projects/ai-control","sessionId":"8fdc96f6-e540-4d59-bd12-3ce8764bcf18","version":"2.1.205","gitBranch":"main"}
{"parentUuid":"865a1316-3380-42f0-9c08-599ae26662d8","isSidechain":true,"agentId":"aa19a86d514b7f8bd","message":{"model":"claude-haiku-4-5-20251001","id":"msg_011Ccr2o5gLAvZXHeG38Mh1J","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"","signature":"EoMJCpMBCA8YAipA8VZYA0hAtGJvjkXlTIEW7KbkLkKLRjsJqDICJjaAqQbnJTOH0yXBVmB47rHGUe6fkuwUuikk/UoRbwd9NTUrZjIZY2xhdWRlLWhhaWt1LTQtNS0yMDI1MTAwMTgAQgh0aGlua2luZ1okNGJkZDE1Y2MtNDcxZS00ZTU2LWJhMWEtM2QzZDViNGYwMTdjEgwIIH6zMN7uP9FbuLMaDMUOU6RPXZBa8mbkVyIwr/rDOOuZs7fhJ0rc0RIraH35zavDsw3N64Nm3PS1UDMRaVleDneVxuZxwMkuvg1BKpwHXsHyHr2rpFdNpmG6mNXJVSArTUIwP+JNVv2LdTodROnuyQLS0pIj7OHd1J0ORrci8mhQMBJFn1wq7RMkykvMIZq9aOCbXNV9qNvhy46FTPX8esW0+QszK8ddp2c8wlAzJjzyfm8M9gz7/3e2Hg89YWkCVD6pO6BX6yKadFQHLKlSYd0+slRrhqrd5lGiFuXvmo8jMEIACZH8GcB+Eya/2lUHRiFMoqAZFk+KuHEkQZkLwBogyozLu8XWa2jCDP3XcdLW126/ORFHPpqrUCRv7PaBQbhoUUEhuElwjL8Tu5Eb6nq+BiRGrVSBSiDBUzVCFODHA6/xf7djV2EIKNfhnF4dyrlDEBxV6h93x1uGbGC0nZc2uCKtvdCS/Zi9NcgxRgLmanHK69yrMUPOIZPvDUc3CzFyPEcpshGZvwlQni/yp5M8pnSNfwAhuyl28GyR8CAL1FvWK1AJQvA3bXnhGK2PD6/9225wW6PB5q/v/Mk3RC4xS+mi1KDIrN67fI5TxH2K5VdQOaU+oQdM3AMB+r0K78FJM3XWJ+2KXhmHU+4K8T/P3Q3Hg6/aDQ0VQpBUNe3i+PkfDUJyc51xYAOc/0C6AKu1SBI0j9AQ86YVRWZyCIlS8Y/Gh9lNCNT/G8GtX3Lq4XTeVO4Qq5UhFovnPob2i6LJp3JpWdEDrffs52rQGbZU69TVC8h7DQ8H3AJXaKiLEYTQtKpdnrSK6lpO/hb0YPwRhoC0Oy9/hmILQckRHTCIVYjILkyiPFyQuj+ZHsoAfEGhA6eJRqsuE0rlS8PVJ7zZ4klMiQyi6eLlOSavdGxGbrppFf+2PDeHeYaO0wQMkLvr/FtfrmCfp/YWO9RDI7STcDbhcBVlyZnb5WS2WO5kmZgWPwa1Ua+pqPAQ6+dopXhYvFzOzhxAeOZqE+vjVkqwsENtmktm8gyGylqRujiHaFbf9eDxAJHkg7gpaUKVTO9yz6+mK+f3v1M0MZoeMc0i1Jx64yaVwPUfw715qishzmorOdwhAh3SjLfNfG+Vr7ZANMK9MjKwp1Ygfubmrx5jMI2I27ObQmva2ZL1OsSLUbfS2acz5RnY15lP5B68WXX+PahzhtH4XqDI19TBu4jFB+DhQNFYBKBzy4OWjwKrPRoLxp+6JTDv2PGI3kHkL6DSCTSWGI7B0AuOwZcD4LKvSN742SIVI/KHx7UAxVjBjCrJcPTKFGBRZN7sxanyrogRnOsGJ4F4GAE="}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":8,"cache_creation_input_tokens":4675,"cache_read_input_tokens":14278,"cache_creation":{"ephemeral_5m_input_tokens":4675,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011Ccr2o4yfFkCqyScUT4y51","attributionAgent":"claude-code-guide","type":"assistant","uuid":"7e33d867-5bd8-4a5c-9d91-4a5ee24562fb","timestamp":"2026-07-09T06:44:45.638Z","userType":"external","entrypoint":"cli","cwd":"/home/marcuh/claude-projects/ai-control","sessionId":"8fdc96f6-e540-4d59-bd12-3ce8764bcf18","version":"2.1.205","gitBranch":"main"}
{"parentUuid":"7e33d867-5bd8-4a5c-9d91-4a5ee24562fb","isSidechain":true,"agentId":"aa19a86d514b7f8bd","message":{"model":"claude-haiku-4-5-20251001","id":"msg_011Ccr2o5gLAvZXHeG38Mh1J","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_016EGEuqc5FcMaea3Zyu5YtE","name":"WebFetch","input":{"url":"https://code.claude.com/docs/en/sessions.md","prompt":"resume picker keyboard shortcuts scope cwd working directory config-dir filter"},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":8,"cache_creation_input_tokens":4675,"cache_read_input_tokens":14278,"output_tokens":349,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":4675},"inference_geo":"not_available","iterations":[{"input_tokens":8,"output_tokens":349,"cache_read_input_tokens":14278,"cache_creation_input_tokens":4675,"cache_creation":{"ephemeral_5m_input_tokens":4675,"ephemeral_1h_input_tokens":0},"type":"message"}],"speed":"standard"},"diagnostics":null},"requestId":"req_011Ccr2o4yfFkCqyScUT4y51","attributionAgent":"claude-code-guide","type":"assistant","uuid":"f1ebefdf-f2b7-4b75-a38b-53f5445a3972","timestamp":"2026-07-09T06:44:46.300Z","userType":"external","entrypoint":"cli","cwd":"/home/marcuh/claude-projects/ai-control","sessionId":"8fdc96f6-e540-4d59-bd12-3ce8764bcf18","version":"2.1.205","gitBranch":"main"}
{"parentUuid":"f1ebefdf-f2b7-4b75-a38b-53f5445a3972","isSidechain":true,"promptId":"32314f2e-62a5-43e9-b469-ea1a64ebd693","agentId":"aa19a86d514b7f8bd","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_016EGEuqc5FcMaea3Zyu5YtE","type":"tool_result","content":"> ## Documentation Index\n> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt\n> Use this file to discover all available pages before exploring further.\n\n# Manage sessions\n\n> Name, resume, branch, and switch between Claude Code conversations. Covers `--continue`, `--resume`, `--from-pr`, the `/resume` picker, session naming, exporting transcripts, and where transcripts are stored.\n\nA session is a saved conversation tied to a project directory. Claude Code stores it locally as you work, so you can resume where you left off, branch to try a different approach, or switch between tasks.\n\nThe [desktop app](/en/desktop#work-in-parallel-with-sessions), [Claude Code on the web](/en/claude-code-on-the-web), and the [VS Code extension](/en/vs-code#resume-past-conversations) each maintain their own session history. This page covers the CLI.\n\n## Resume a session\n\nSessions are saved continuously to [local transcript files](#export-and-locate-session-data) as you work, so you can return to one after exiting or running `/clear`. Use these entry points:\n\n| Command                     | What it does                                                       |\n| :-------------------------- | :----------------------------------------------------------------- |\n| `claude --continue`         | Resumes the most recent session in the current directory           |\n| `claude --resume`           | Opens the [session picker](#use-the-session-picker)                |\n| `claude --resume <name>`    | Resumes the named session directly                                 |\n| `claude --from-pr <number>` | Resumes the session linked to that pull request                    |\n| `/resume`                   | Switches to a different conversation from inside an active session |\n\nSessions created with [`claude -p`](/en/headless) or the [Agent SDK](/en/agent-sdk/overview) do not appear in the session picker, but you can still resume one by passing its session ID to `claude --resume <session-id>`. Run this from the directory the session was started in: session ID lookup is scoped to the current project directory and its git worktrees, so a session created elsewhere reports `No conversation found with session ID: <session-id>`.\n\n### Where the session picker looks\n\nSessions are stored per project directory. By default the session picker shows interactive sessions from the current worktree, plus sessions started elsewhere that added the current directory with `/add-dir`. Use `Ctrl+W` to widen to all worktrees of the repository or `Ctrl+A` to widen to every project on this machine.\n\n{/* min-version: 2.1.169 */}From v2.1.169, moving a session with [`/cd`](/en/commands) relocates it to the new directory's project storage, so it appears in that directory's picker afterward. {/* min-version: 2.1.196 */}As of v2.1.196, a moved session stays out of the old directory's picker even after a crash or forced exit. On earlier versions, it could also reappear in the old directory's list after an exit that wasn't clean when the old path contained special characters such as underscores.\n\nSelecting a session from another worktree of the same repository resumes it in place. Selecting a session from an unrelated project copies a `cd` and resume command to your clipboard instead.\n\nResuming by name resolves across the current repository and its worktrees. Both forms look for an exact match and resume it directly even if it lives in a different worktree:\n\n| Command                  | Exact match      | Ambiguous name                                                              |\n| :----------------------- | :--------------- | :-------------------------------------------------------------------------- |\n| `claude --resume <name>` | Resumes directly | Opens the session picker with the name pre-filled as a search term          |\n| `/resume <name>`         | Resumes directly | Reports an error; run `/resume` with no argument to open the session picker |\n\n## Name your sessions\n\nGive sessions descriptive names so they're findable in the session picker and resumable by name. This matters most when you're working on several tasks in parallel.\n\n| When                    | How to set the name                                                                                                                                                |\n| :---------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| At startup              | `claude -n auth-refactor`                                                                                                                                          |\n| During a session        | `/rename auth-refactor`. The name also appears on the prompt bar                                                                                                   |\n| From the session picker | Highlight a session and press `Ctrl+R`                                                                                                                             |\n| On plan accept          | Accepting a plan in [plan mode](/en/permission-modes#analyze-before-you-edit-with-plan-mode) names the session from the plan content unless you've already set one |\n\nOnce a session is named, return to it with `claude --resume <name>` or `/resume <name>`. See [Resume a session](#resume-a-session) for how name resolution behaves across worktrees.\n\n{/* min-version: 2.1.196 */}Interactive sessions you never name still get a default display name when they start. Requires Claude Code v2.1.196 or later. The default combines the working directory's name with a two-character suffix, for example `my-app-3f`, and identifies the session in listings of running sessions, such as [agent view](/en/agent-view) and `claude agents --json` output.\n\nThe default isn't a resume handle: `claude --resume <name>`, `/resume <name>`, and the session picker match only names you set. Naming the session replaces the default.\n\n## Use the session picker\n\nRun `/resume` inside a session, or `claude --resume` with no arguments, to open the interactive session picker. Use these keyboard shortcuts to navigate, search, and widen the list:\n\n| Shortcut                                          | Action                                                                                                                                                       |\n| :------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `↑` / `↓`                                         | Navigate between sessions                                                                                                                                    |\n| `→` / `←`                                         | Expand or collapse grouped sessions                                                                                                                          |\n| `Enter`                                           | Resume the highlighted session                                                                                                                               |\n| `Space`                                           | Preview the session content. `Ctrl+V` also works on terminals that don't capture it as paste                                                                 |\n| `Ctrl+R`                                          | Rename the highlighted session                                                                                                                               |\n| `/` or any printable character other than `Space` | Enter search mode and filter sessions. Paste a GitHub, GitHub Enterprise, GitLab, or Bitbucket pull or merge request URL to find the session that created it |\n| `Ctrl+A`                                          | Show sessions from all projects on this machine. Press again to return to the current repository                                                             |\n| `Ctrl+W`                                          | Show sessions from all worktrees of the current repository. Press again to return to the current worktree. Only shown in multi-worktree repositories         |\n| `Ctrl+B`                                          | Filter to sessions from the current git branch. Press again to show all branches                                                                             |\n| `Esc`                                             | Exit the session picker or search mode                                                                                                                       |\n\nEach row shows the session name if set, otherwise the conversation summary or first prompt, along with time since last activity, message count, and git branch. Project path appears after you widen to all projects with `Ctrl+A`.\n\nForked sessions created with `/branch`, `/rewind`, or `--fork-session` are grouped under their root session. Press `→` to expand a group.\n\n## Branch a session\n\nBranching creates a copy of the conversation so far and switches you into it, leaving the original intact. Use it to try a different approach without losing the path you were on.\n\nFrom inside a session, run `/branch` with an optional name:\n\n```text theme={null}\n/branch try-streaming-approach\n```\n\nIf you omit the name, Claude Code names the new branch after the first prompt in the conversation. As of v2.1.198 this also applies after [compaction](/en/how-claude-code-works#when-context-fills-up); earlier versions fell back to the literal name `Branched conversation` instead of looking past the compaction summary to the original first prompt.\n\nFrom the command line, combine `--continue` or `--resume` with `--fork-session`:\n\n```bash theme={null}\nclaude --continue --fork-session\n```\n\nThe original session is unchanged and remains available in the session picker. The `/branch` confirmation prints two session IDs: the new branch you are now in and the original. To return to the original, pass its ID to `/resume`, use the session picker, or run `/resume <original-name>`. Permissions you approved with \"allow for this session\" do not carry over to the new branch. If you resume the same session in two terminals without forking, messages from both interleave into one transcript.\n\nFor checkpoint-based rewind within a single session, see [Checkpointing](/en/checkpointing).\n\n## Manage context within a session\n\nThese commands control what's in the context window without leaving the session:\n\n* **`/clear`**: start fresh with an empty context. The previous conversation is saved and resumable\n* **`/compact [instructions]`**: replace history with a summary, optionally focused on what you specify\n* **`/context`**: show what is currently consuming context\n\nFor how compaction interacts with CLAUDE.md, skills, and rules, see the [context window guide](/en/context-window). For strategies on when to clear versus compact, see [Best practices](/en/best-practices#manage-your-session).\n\n## Export and locate session data\n\nRun `/export` to open a menu that lets you copy the current conversation to your clipboard or save it as a plain-text file, with messages and tool outputs rendered as readable text. Pass a filename to skip the menu and write directly to that file.\n\n### Access conversations from scripts\n\n`/export` produces a rendered transcript for a person to read. The interfaces below produce structured data for a script to parse: a JSON result from a run, the path to a session's transcript file, or a live stream of events. Pick by what triggers the script:\n\n* **Run Claude once and capture the result**: invoke `claude -p` with [`--output-format json` or `stream-json`](/en/headless#get-structured-output) to capture the result, session ID, usage, and cost of a non-interactive run as structured JSON.\n* **Ask an existing session a question**: pass a session ID to [`claude -p --resume`](/en/headless#continue-conversations) to send a follow-up prompt, such as a summary request, and capture the structured response.\n* **React to session events**: read the `transcript_path` field that [hooks](/en/hooks#common-input-fields) and [status line commands](/en/statusline#available-data) receive as input. A `SessionEnd` hook can archive the transcript when a session ends.\n* **Embed Claude in a TypeScript or Python app**: use the [Agent SDK](/en/agent-sdk/overview) to receive each message programmatically.\n\nThe example below uses the second interface. It sends a follow-up prompt to an existing session and reads the answer with `jq`:\n\n```bash theme={null}\nclaude -p --resume <session-id> --output-format json \"summarize what we changed\" | jq -r '.result'\n```\n\n### Where transcripts are stored\n\nBy default, transcripts are stored as JSONL at `~/.claude/projects/<project>/<session-id>.jsonl`, where `<project>` is your working directory path with non-alphanumeric characters replaced by `-`. Each line is a JSON object for a message, tool use, or metadata entry. The entry format is internal to Claude Code and changes between versions, so scripts that parse these files directly can break on any release. To build on session data, use `/export` or the [script interfaces](#access-conversations-from-scripts) instead.\n\nThe location, retention, and write behavior are configurable:\n\n| To                                          | Set                                                    | Where                     |\n| ------------------------------------------- | ------------------------------------------------------ | ------------------------- |\n| Move storage off `~/.claude`                | [`CLAUDE_CONFIG_DIR`](/en/env-vars)                    | Environment variable      |\n| Change the 30-day retention                 | [`cleanupPeriodDays`](/en/settings#available-settings) | `settings.json`           |\n| Suppress transcript writes in all modes     | [`CLAUDE_CODE_SKIP_PROMPT_HISTORY`](/en/env-vars)      | Environment variable      |\n| Suppress writes for one non-interactive run | [`--no-session-persistence`](/en/cli-reference)        | CLI flag with `claude -p` |\n\n## See also\n\nThese pages cover related session and parallelism mechanics:\n\n* [Worktrees](/en/worktrees): run isolated parallel sessions on separate branches\n* [Checkpointing](/en/checkpointing): rewind code and conversation to an earlier point\n* [Context window](/en/context-window): what fills context and what survives compaction\n* [Non-interactive mode](/en/headless): session behavior under `claude -p`\n"}]},"uuid":"3356fc7e-878c-4aca-bb72-c7ef709a5217","timestamp":"2026-07-09T06:44:46.755Z","toolUseResult":{"bytes":14739,"code":200,"codeText":"OK","result":"> ## Documentation Index\n> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt\n> Use this file to discover all available pages before exploring further.\n\n# Manage sessions\n\n> Name, resume, branch, and switch between Claude Code conversations. Covers `--continue`, `--resume`, `--from-pr`, the `/resume` picker, session naming, exporting transcripts, and where transcripts are stored.\n\nA session is a saved conversation tied to a project directory. Claude Code stores it locally as you work, so you can resume where you left off, branch to try a different approach, or switch between tasks.\n\nThe [desktop app](/en/desktop#work-in-parallel-with-sessions), [Claude Code on the web](/en/claude-code-on-the-web), and the [VS Code extension](/en/vs-code#resume-past-conversations) each maintain their own session history. This page covers the CLI.\n\n## Resume a session\n\nSessions are saved continuously to [local transcript files](#export-and-locate-session-data) as you work, so you can return to one after exiting or running `/clear`. Use these entry points:\n\n| Command                     | What it does                                                       |\n| :-------------------------- | :----------------------------------------------------------------- |\n| `claude --continue`         | Resumes the most recent session in the current directory           |\n| `claude --resume`           | Opens the [session picker](#use-the-session-picker)                |\n| `claude --resume <name>`    | Resumes the named session directly                                 |\n| `claude --from-pr <number>` | Resumes the session linked to that pull request                    |\n| `/resume`                   | Switches to a different conversation from inside an active session |\n\nSessions created with [`claude -p`](/en/headless) or the [Agent SDK](/en/agent-sdk/overview) do not appear in the session picker, but you can still resume one by passing its session ID to `claude --resume <session-id>`. Run this from the directory the session was started in: session ID lookup is scoped to the current project directory and its git worktrees, so a session created elsewhere reports `No conversation found with session ID: <session-id>`.\n\n### Where the session picker looks\n\nSessions are stored per project directory. By default the session picker shows interactive sessions from the current worktree, plus sessions started elsewhere that added the current directory with `/add-dir`. Use `Ctrl+W` to widen to all worktrees of the repository or `Ctrl+A` to widen to every project on this machine.\n\n{/* min-version: 2.1.169 */}From v2.1.169, moving a session with [`/cd`](/en/commands) relocates it to the new directory's project storage, so it appears in that directory's picker afterward. {/* min-version: 2.1.196 */}As of v2.1.196, a moved session stays out of the old directory's picker even after a crash or forced exit. On earlier versions, it could also reappear in the old directory's list after an exit that wasn't clean when the old path contained special characters such as underscores.\n\nSelecting a session from another worktree of the same repository resumes it in place. Selecting a session from an unrelated project copies a `cd` and resume command to your clipboard instead.\n\nResuming by name resolves across the current repository and its worktrees. Both forms look for an exact match and resume it directly even if it lives in a different worktree:\n\n| Command                  | Exact match      | Ambiguous name                                                              |\n| :----------------------- | :--------------- | :-------------------------------------------------------------------------- |\n| `claude --resume <name>` | Resumes directly | Opens the session picker with the name pre-filled as a search term          |\n| `/resume <name>`         | Resumes directly | Reports an error; run `/resume` with no argument to open the session picker |\n\n## Name your sessions\n\nGive sessions descriptive names so they're findable in the session picker and resumable by name. This matters most when you're working on several tasks in parallel.\n\n| When                    | How to set the name                                                                                                                                                |\n| :---------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| At startup              | `claude -n auth-refactor`                                                                                                                                          |\n| During a session        | `/rename auth-refactor`. The name also appears on the prompt bar                                                                                                   |\n| From the session picker | Highlight a session and press `Ctrl+R`                                                                                                                             |\n| On plan accept          | Accepting a plan in [plan mode](/en/permission-modes#analyze-before-you-edit-with-plan-mode) names the session from the plan content unless you've already set one |\n\nOnce a session is named, return to it with `claude --resume <name>` or `/resume <name>`. See [Resume a session](#resume-a-session) for how name resolution behaves across worktrees.\n\n{/* min-version: 2.1.196 */}Interactive sessions you never name still get a default display name when they start. Requires Claude Code v2.1.196 or later. The default combines the working directory's name with a two-character suffix, for example `my-app-3f`, and identifies the session in listings of running sessions, such as [agent view](/en/agent-view) and `claude agents --json` output.\n\nThe default isn't a resume handle: `claude --resume <name>`, `/resume <name>`, and the session picker match only names you set. Naming the session replaces the default.\n\n## Use the session picker\n\nRun `/resume` inside a session, or `claude --resume` with no arguments, to open the interactive session picker. Use these keyboard shortcuts to navigate, search, and widen the list:\n\n| Shortcut                                          | Action                                                                                                                                                       |\n| :------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `↑` / `↓`                                         | Navigate between sessions                                                                                                                                    |\n| `→` / `←`                                         | Expand or collapse grouped sessions                                                                                                                          |\n| `Enter`                                           | Resume the highlighted session                                                                                                                               |\n| `Space`                                           | Preview the session content. `Ctrl+V` also works on terminals that don't capture it as paste                                                                 |\n| `Ctrl+R`                                          | Rename the highlighted session                                                                                                                               |\n| `/` or any printable character other than `Space` | Enter search mode and filter sessions. Paste a GitHub, GitHub Enterprise, GitLab, or Bitbucket pull or merge request URL to find the session that created it |\n| `Ctrl+A`                                          | Show sessions from all projects on this machine. Press again to return to the current repository                                                             |\n| `Ctrl+W`                                          | Show sessions from all worktrees of the current repository. Press again to return to the current worktree. Only shown in multi-worktree repositories         |\n| `Ctrl+B`                                          | Filter to sessions from the current git branch. Press again to show all branches                                                                             |\n| `Esc`                                             | Exit the session picker or search mode                                                                                                                       |\n\nEach row shows the session name if set, otherwise the conversation summary or first prompt, along with time since last activity, message count, and git branch. Project path appears after you widen to all projects with `Ctrl+A`.\n\nForked sessions created with `/branch`, `/rewind`, or `--fork-session` are grouped under their root session. Press `→` to expand a group.\n\n## Branch a session\n\nBranching creates a copy of the conversation so far and switches you into it, leaving the original intact. Use it to try a different approach without losing the path you were on.\n\nFrom inside a session, run `/branch` with an optional name:\n\n```text theme={null}\n/branch try-streaming-approach\n```\n\nIf you omit the name, Claude Code names the new branch after the first prompt in the conversation. As of v2.1.198 this also applies after [compaction](/en/how-claude-code-works#when-context-fills-up); earlier versions fell back to the literal name `Branched conversation` instead of looking past the compaction summary to the original first prompt.\n\nFrom the command line, combine `--continue` or `--resume` with `--fork-session`:\n\n```bash theme={null}\nclaude --continue --fork-session\n```\n\nThe original session is unchanged and remains available in the session picker. The `/branch` confirmation prints two session IDs: the new branch you are now in and the original. To return to the original, pass its ID to `/resume`, use the session picker, or run `/resume <original-name>`. Permissions you approved with \"allow for this session\" do not carry over to the new branch. If you resume the same session in two terminals without forking, messages from both interleave into one transcript.\n\nFor checkpoint-based rewind within a single session, see [Checkpointing](/en/checkpointing).\n\n## Manage context within a session\n\nThese commands control what's in the context window without leaving the session:\n\n* **`/clear`**: start fresh with an empty context. The previous conversation is saved and resumable\n* **`/compact [instructions]`**: replace history with a summary, optionally focused on what you specify\n* **`/context`**: show what is currently consuming context\n\nFor how compaction interacts with CLAUDE.md, skills, and rules, see the [context window guide](/en/context-window). For strategies on when to clear versus compact, see [Best practices](/en/best-practices#manage-your-session).\n\n## Export and locate session data\n\nRun `/export` to open a menu that lets you copy the current conversation to your clipboard or save it as a plain-text file, with messages and tool outputs rendered as readable text. Pass a filename to skip the menu and write directly to that file.\n\n### Access conversations from scripts\n\n`/export` produces a rendered transcript for a person to read. The interfaces below produce structured data for a script to parse: a JSON result from a run, the path to a session's transcript file, or a live stream of events. Pick by what triggers the script:\n\n* **Run Claude once and capture the result**: invoke `claude -p` with [`--output-format json` or `stream-json`](/en/headless#get-structured-output) to capture the result, session ID, usage, and cost of a non-interactive run as structured JSON.\n* **Ask an existing session a question**: pass a session ID to [`claude -p --resume`](/en/headless#continue-conversations) to send a follow-up prompt, such as a summary request, and capture the structured response.\n* **React to session events**: read the `transcript_path` field that [hooks](/en/hooks#common-input-fields) and [status line commands](/en/statusline#available-data) receive as input. A `SessionEnd` hook can archive the transcript when a session ends.\n* **Embed Claude in a TypeScript or Python app**: use the [Agent SDK](/en/agent-sdk/overview) to receive each message programmatically.\n\nThe example below uses the second interface. It sends a follow-up prompt to an existing session and reads the answer with `jq`:\n\n```bash theme={null}\nclaude -p --resume <session-id> --output-format json \"summarize what we changed\" | jq -r '.result'\n```\n\n### Where transcripts are stored\n\nBy default, transcripts are stored as JSONL at `~/.claude/projects/<project>/<session-id>.jsonl`, where `<project>` is your working directory path with non-alphanumeric characters replaced by `-`. Each line is a JSON object for a message, tool use, or metadata entry. The entry format is internal to Claude Code and changes between versions, so scripts that parse these files directly can break on any release. To build on session data, use `/export` or the [script interfaces](#access-conversations-from-scripts) instead.\n\nThe location, retention, and write behavior are configurable:\n\n| To                                          | Set                                                    | Where                     |\n| ------------------------------------------- | ------------------------------------------------------ | ------------------------- |\n| Move storage off `~/.claude`                | [`CLAUDE_CONFIG_DIR`](/en/env-vars)                    | Environment variable      |\n| Change the 30-day retention                 | [`cleanupPeriodDays`](/en/settings#available-settings) | `settings.json`           |\n| Suppress transcript writes in all modes     | [`CLAUDE_CODE_SKIP_PROMPT_HISTORY`](/en/env-vars)      | Environment variable      |\n| Suppress writes for one non-interactive run | [`--no-session-persistence`](/en/cli-reference)        | CLI flag with `claude -p` |\n\n## See also\n\nThese pages cover related session and parallelism mechanics:\n\n* [Worktrees](/en/worktrees): run isolated parallel sessions on separate branches\n* [Checkpointing](/en/checkpointing): rewind code and conversation to an earlier point\n* [Context window](/en/context-window): what fills context and what survives compaction\n* [Non-interactive mode](/en/headless): session behavior under `claude -p`\n","durationMs":451,"url":"https://code.claude.com/docs/en/sessions.md"},"sourceToolAssistantUUID":"f1ebefdf-f2b7-4b75-a38b-53f5445a3972","userType":"external","entrypoint":"cli","cwd":"/home/marcuh/claude-projects/ai-control","sessionId":"8fdc96f6-e540-4d59-bd12-3ce8764bcf18","version":"2.1.205","gitBranch":"main"}
{"parentUuid":"3356fc7e-878c-4aca-bb72-c7ef709a5217","isSidechain":true,"agentId":"aa19a86d514b7f8bd","message":{"model":"claude-haiku-4-5-20251001","id":"msg_011Ccr2oX2Zyu8aNQ9UiNpix","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"","signature":"EugKCpMBCA8YAipAnfhmPZaYxfK8HaK0m0cxwqAA4d6HWlrTk9m758Ouftpmu6aGDSATpyP6s4c7AX0N6XnrJBpzpkYCAFgVeBVPZjIZY2xhdWRlLWhhaWt1LTQtNS0yMDI1MTAwMTgAQgh0aGlua2luZ1okNGJkZDE1Y2MtNDcxZS00ZTU2LWJhMWEtM2QzZDViNGYwMTdjEgwfJwaD/HCUzfYPMCIaDIKtPMtjKCWRV2Wa8SIwNX5ECkyNp9Bobz6erq73ibcpzdVQDLnABgegwGU7CsoGhhrwHluoWXT7zP9jOj+qKoEJV/GOPps32SAX9ab3JUwt0ip0OblBnHUH2/kM5RIm/LxGyn/44XcBD9Mb7mYUDAh8gpdmPmlXoR9wHWWDhEfHcyER34PEg9/E+GZvW8oE7tYiiL/u19kyknCzujgex0m/UaPMWAbPqiFHgiFNmfQQtO/TThAYWr3A0W5eyomhXL7HB/4VXBX8T9BQQcgCCDxoNTKPbQ4EXR06m120pMfUS0ITirJ0iXbuoaTdo3EMdYrAVBxaWUCc8g65EPxOkxbEUr5su+nFRTioY3u2dKAItsbefaAaTqY0wU0VK0KLqM43//bdRmVVKI6XtMAmVZtT85nkQQEnDoVVPPKzdoRKpPxNjUvfk3bAvH8mwiHsOUI+kwxByX/cOxk+w9SnNzhGDxV3bCSFil7duYeegGQ3Fvyhjom1Av9BO3AsJ7IZIaweStURE6VALnCcm8wh4Ngj4Lz1J47KzCrSP3E2aXf9sCZXoGPXS49FpEK/75sOnJu5BrFqjals1MtcVpY238mhLdxZDAwbJHyPeSs6M6hOoUamBHJYvXf0O95T4R4hRYkMFMr67P1AMILsTUvWmr3ppxA1XqPUpGihyHi8Pn+DaMLV3xU7civZLyUt4AQ7oxu2bLske2K7R5tdVmMizZDtuyVb95z3UaaTZfG1cqSCvSslV14FFqw7uyPDUlKxSzcRLMJYRp8m+S6JrZ9/e5hw//gQPZcGkpbr8IA3hoWte3vZCKvzFIxj+2vy0v6hre0VEH1H+KSZBWonAsCnJHevZOn18mcCnpttCEkVNCfyKbtLSoWltOVseeCCfhPHypT4qAP9Mymmc7B5P21vB7SGa2UA5KAn9EYGi13Gll+wYrsSBYv2lwY/HigldmdoFpmYDRdXbeivj8uKKGLTGFyl/WH6X676EwOim0Ytw27ZbrGIvnXHuLDUkfi5GUTjkp2POTikxz8HEPyQJTEywgqbJZdxzgDztSy/Sg1QvtijK/szkSPWA/ozH55vh6xKlifaATdkj7hstPHQUGniYUAqP1nTUwKiX81Rf50ShYgsWqvqVz/zvUpPhMOc+Qq0Dmtzgyqos67f5EaXPYMNDUsfFG55EayG24m0FpzpJlLVf4wuxMsRRn9H54Q9Ft1ddjQTVbDBjuPBa6azBcUiRvF3bCup1/DfF0WkvUIac8WiZKCaQS43lqo9oUXKFuEPSZo/7SZc7YHFcKH/vPQw85Yv4rJaqgzMDBnviz+VFSAsWg9vpQat8LOX34U6bzW3D13wiQkkMZCAjkj5p4ADrQ7FwvAS5FCubIOTvi6kvJlXBSuIvAEZ2+kuAlV666qyYW4s0hgkSX+nYjCqD4UUaWgTwZEXSC0qftkN+/kY6E2j+xO8kaSGksPosXpz/ttWLOSQxT62t8EAeWwx1V8HtQRNftSKzjcmcQkOjmFhHUnfuGDPJdh51WuT4oL0dhj+7Gl/iujaViMyQX8B8RkIoxHybWxi5rBToZOm2pz5bSjKOTJwIOeXc2uxRvewfUYlZnrRXx+HG7NpvuIJtwPQiB8mMxgB"}],"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":8,"cache_creation_input_tokens":3475,"cache_read_input_tokens":18953,"cache_creation":{"ephemeral_5m_input_tokens":3475,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null},"requestId":"req_011Ccr2oWLQEeN3ABzroN87M","attributionAgent":"claude-code-guide","type":"assistant","uuid":"8da185f4-3d16-4e1f-8a57-0799b616d5b8","timestamp":"2026-07-09T06:44:52.214Z","userType":"external","entrypoint":"cli","cwd":"/home/marcuh/claude-projects/ai-control","sessionId":"8fdc96f6-e540-4d59-bd12-3ce8764bcf18","version":"2.1.205","gitBranch":"main"}
{"parentUuid":"8da185f4-3d16-4e1f-8a57-0799b616d5b8","isSidechain":true,"agentId":"aa19a86d514b7f8bd","message":{"model":"claude-haiku-4-5-20251001","id":"msg_011Ccr2oX2Zyu8aNQ9UiNpix","type":"message","role":"assistant","content":[{"type":"text","text":"**1. Scope des Resume-Pickers:**\n\nDer Picker ist **standardmäßig auf das aktuelle Worktree begrenzt** — nicht auf den ganzen Config-Dir. Sessions werden \"per project directory\" gespeichert. Der Picker zeigt \"by default the session picker shows interactive sessions from the current worktree\".\n\n**2. Keyboard-Shortcuts zur Erweiterung:**\n\n- `Ctrl+W` — alle Worktrees des aktuellen Repositories\n- `Ctrl+A` — alle Projekte auf der Maschine (config-dir-weit)\n\n**3. Dokumentiertes/erwartetes Verhalten:**\n\nJa, dokumentiert. Seit v2.1.196 werden Sessions mit `/cd` zum neuen Verzeichnis verschoben und erscheinen danach nicht mehr im alten Picker.\n\n**Quelle:** https://code.claude.com/docs/en/sessions.md#where-the-session-picker-looks"}],"stop_reason":"end_turn","stop_sequence":null,"stop_details":null,"usage":{"input_tokens":8,"cache_creation_input_tokens":3475,"cache_read_input_tokens":18953,"output_tokens":577,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":3475},"inference_geo":"not_available","iterations":[{"input_tokens":8,"output_tokens":577,"cache_read_input_tokens":18953,"cache_creation_input_tokens":3475,"cache_creation":{"ephemeral_5m_input_tokens":3475,"ephemeral_1h_input_tokens":0},"type":"message"}],"speed":"standard"},"diagnostics":null},"requestId":"req_011Ccr2oWLQEeN3ABzroN87M","attributionAgent":"claude-code-guide","type":"assistant","uuid":"c719220d-b4bc-428b-abc3-2a6e62568836","timestamp":"2026-07-09T06:44:54.541Z","userType":"external","entrypoint":"cli","cwd":"/home/marcuh/claude-projects/ai-control","sessionId":"8fdc96f6-e540-4d59-bd12-3ce8764bcf18","version":"2.1.205","gitBranch":"main"}
