Follow Discord
Sweep 08 Oct 2026 · 18:53Z Build v2.1.295 516 read Stable v2.1.286 Latest v2.1.295 Next v2.1.295 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · claude-code

One read of Claude Code CLIclaude-code-20261007T173702Z

12 pages moved out of 221 read.

Pages moved 12 significant first
Pages read 221 in this capture
Captured 17:37 UTC
Corpus hash d353ef3b6124 corpus-hash

What this read moved

1-12 of 12

managed-mcp Changed · +17 / -5 lines

from line 301
301301 
302302#### How `serverUrl` entries match
303303 
304URLs support `*` wildcards anywhere in the pattern, including the scheme. Hostname matching is case-insensitive and ignores a trailing FQDN dot, so `https://Mcp.Example.com/*` matches `https://mcp.example.com/api`. Paths stay case-sensitive.
304URLs support `*` wildcards, including `*` as the whole scheme. Hostname matching is case-insensitive and ignores a trailing FQDN dot, so `https://Mcp.Example.com/*` matches `https://mcp.example.com/api`. Paths stay case-sensitive. If you give no port, how you write the hostname decides whether the pattern matches only the scheme's default port or every port:
305305 
306* **Hostname written out in full**: the default port only, 443 for `https` and 80 for `http`
307* **Hostname with a `*` in it**: every port
308 
306309The table shows what common patterns allow:
307310 
308311| Pattern | Allows |
309312| :- | :- |
310| `https://mcp.example.com/*` | All paths on a specific domain |
311| `https://mcp.example.com` | Also all paths on that domain. A pattern with no path matches any path |
312| `https://*.example.com/*` | Any subdomain of `example.com` |
313| `https://mcp.example.com/*` | All paths on a specific domain, on port 443 only |
314| `https://mcp.example.com` | Also all paths on that domain, on port 443 only. A pattern with no path matches any path |
315| `https://mcp.example.com:8443/*` | All paths on that domain, on port 8443 only |
316| `https://mcp.example.com:*/*` | All paths on that domain, on any port, 443 included |
317| `https://*.example.com/*` | Any subdomain of `example.com`, on any port |
313318| `http://localhost:*/*` | Any port on localhost |
314| `*://mcp.example.com/*` | Any scheme to a specific domain |
319| `*://mcp.example.com/*` | Any scheme to a specific domain, each scheme on its default port only |
315320 
321Entries in `deniedMcpServers` match ports the same way, so choose an entry for `staging.example.com` by the ports and schemes you need to block:
322 
323* `https://staging.example.com/*`: blocks `https` servers on that host on port 443 only, so it doesn't block a server at `https://staging.example.com:8443/api`
324* `https://staging.example.com:*/*`: blocks `https` servers on that host on every port
325* `*://staging.example.com:*/*`: blocks that host over any scheme and on any port
326 
316327<h4 id="how-policy-entries-expand">
317328 Environment variables in `serverCommand` and `serverUrl` entries
318329</h4>
from line 488
477488 | :- | :- |
478489 | HTTP server at `https://mcp.example.com/api` | Allowed: matches allowlist URL pattern, no denylist match |
479490 | HTTP server at `https://staging.example.com/api` | Blocked: matches both, but the denylist takes precedence |
491 | HTTP server at `https://staging.example.com:8443/api` | Allowed: matches allowlist URL pattern, [no denylist match on this port](#how-serverurl-entries-match) |
480492 | HTTP server at `https://other.com/mcp` | Blocked: doesn't match the allowlist |
481493</Accordion>
482494 

overview Changed · +6 / -4 lines

from line 22
2222 curl -fsSL https://claude.ai/install.sh | bash
2323 ```
2424 
25 On Windows, your prompt shows `PS C:\` when you're in PowerShell and `C:\` without the `PS` when you're in CMD.
26 
2527 **Windows PowerShell:**
2628 
2729 ```powershell theme={null}
from line 38
3638 
3739 When the installer finishes, open a new terminal window and run `claude --version`. A working installation prints a version number. If your shell says `claude` isn't found or isn't recognized, the install directory isn't on your PATH yet: see [Fix your PATH](/docs/en/troubleshoot-install#command-not-found-claude-after-installation).
3840 
39 If you see `The token '&&' is not a valid statement separator`, you're in PowerShell, not CMD. If you see `'irm' is not recognized as an internal or external command`, you're in CMD, not PowerShell. Your prompt shows `PS C:\` when you're in PowerShell and `C:\` without the `PS` when you're in CMD.
41 If you see `The token '&&' is not a valid statement separator`, you're in PowerShell, not CMD. If you see `'irm' is not recognized as an internal or external command`, you're in CMD, not PowerShell.
4042 
41 If the install command fails with `syntax error near unexpected token '<'`, a `403`, or another curl error, see [Troubleshoot installation](/docs/en/troubleshoot-install#find-your-error) to match the error to a fix and for alternative install methods.
43 If the install command fails with `syntax error near unexpected token '<'`, a `403`, or any other error, see [Troubleshoot installation](/docs/en/troubleshoot-install#find-your-error) to match the error to a fix and for alternative install methods.
4244 
4345 [Git for Windows](https://git-scm.com/downloads/win) is recommended on native Windows so Claude Code can use the Bash tool. If Git for Windows is not installed, Claude Code uses PowerShell as the shell tool instead. WSL setups do not need Git for Windows.
4446 
from line 81
7981 claude
8082 ```
8183 
82 You'll be prompted to log in on first use. If you've set the `ANTHROPIC_API_KEY` environment variable, Claude Code skips the login prompt and asks you to approve the key instead. That's it! [Continue with the Quickstart →](/docs/en/quickstart)
84 Claude Code prompts you to log in on first use. If you've set the `ANTHROPIC_API_KEY` environment variable and you approve the key when Claude Code asks whether to use it, Claude Code skips the login prompt. [Continue with the Quickstart →](/docs/en/quickstart)
8385 
8486 <Tip>
8587 See [advanced setup](/docs/en/setup) for installation options, manual updates, or uninstallation instructions. Visit [installation troubleshooting](/docs/en/troubleshoot-install) if you hit issues.

quickstart Changed · +42 / -74 lines

## Step 2: Start your first session ## Step 3: Ask your first question ## Step 4: Make your first code change ## Step 5: Use Git with Claude Code ## Step 6: Fix a bug or add a feature ## Step 7: Test out other common workflows ## Step 2: Log in to your account ## Step 3: Start your first session ## Step 4: Ask your first question ## Step 5: Make your first code change ## Step 6: Use Git with Claude Code ## Step 7: Fix a bug or add a feature ## Step 8: Test out other common workflows

from line 1
11# Quickstart
22 
3> Welcome to Claude Code!
3> Install Claude Code in your terminal, sign in, and use the CLI to explore your codebase and make your first code change.
44 
5This quickstart guide will have you using AI-powered coding assistance in a few minutes. By the end, you'll understand how to use Claude Code for common development tasks.
5This quickstart covers Claude Code in your terminal: installing the CLI, signing in from your first session, and using it for common development tasks in your own project.
66 
77## Before you begin
88 
from line 9
99Make sure you have:
1010 
1111* A terminal or command prompt open
12 * If you've never used the terminal before, check out the [terminal guide](/docs/en/terminal-guide)
1312* A code project to work with
1413* A [Claude subscription](https://claude.com/pricing?utm_source=claude_code\&utm_medium=docs\&utm_content=quickstart_prereq) (Pro, Max, Team, or Enterprise), [Claude Console](https://platform.claude.com/) account, or access through a [supported cloud provider](/docs/en/third-party-integrations)
1514 
1615<Note>
17 This guide covers the terminal CLI. Claude Code is also available on the [web](https://claude.ai/code), as a [desktop app](/docs/en/desktop), in [VS Code](/docs/en/vs-code) and [JetBrains IDEs](/docs/en/jetbrains), in [Slack](/docs/en/slack), and in CI/CD with [GitHub Actions](/docs/en/github-actions) and [GitLab](/docs/en/gitlab-ci-cd). See [all interfaces](/docs/en/overview#use-claude-code-everywhere).
16 These cases are covered on other pages:
17 
18 * **Never used a terminal before**: start with the [terminal guide](/docs/en/terminal-guide)
19 * **Want Claude Code somewhere other than the terminal**: Claude Code is also available on the [web](https://claude.ai/code), as a [desktop app](/docs/en/desktop), in [VS Code](/docs/en/vs-code) and [JetBrains IDEs](/docs/en/jetbrains), in [Slack](/docs/en/slack), and in CI/CD with [GitHub Actions](/docs/en/github-actions) and [GitLab](/docs/en/gitlab-ci-cd). See [all interfaces](/docs/en/overview#use-claude-code-everywhere).
1820</Note>
1921 
2022## Step 1: Install Claude Code
from line 31
2931 curl -fsSL https://claude.ai/install.sh | bash
3032 ```
3133 
34 On Windows, your prompt shows `PS C:\` when you're in PowerShell and `C:\` without the `PS` when you're in CMD.
35 
3236 **Windows PowerShell:**
3337 
3438 ```powershell theme={null}
from line 47
4347 
4448 When the installer finishes, open a new terminal window and run `claude --version`. A working installation prints a version number. If your shell says `claude` isn't found or isn't recognized, the install directory isn't on your PATH yet: see [Fix your PATH](/docs/en/troubleshoot-install#command-not-found-claude-after-installation).
4549 
46 If you see `The token '&&' is not a valid statement separator`, you're in PowerShell, not CMD. If you see `'irm' is not recognized as an internal or external command`, you're in CMD, not PowerShell. Your prompt shows `PS C:\` when you're in PowerShell and `C:\` without the `PS` when you're in CMD.
50 If you see `The token '&&' is not a valid statement separator`, you're in PowerShell, not CMD. If you see `'irm' is not recognized as an internal or external command`, you're in CMD, not PowerShell.
4751 
48 If the install command fails with `syntax error near unexpected token '<'`, a `403`, or another curl error, see [Troubleshoot installation](/docs/en/troubleshoot-install#find-your-error) to match the error to a fix and for alternative install methods.
52 If the install command fails with `syntax error near unexpected token '<'`, a `403`, or any other error, see [Troubleshoot installation](/docs/en/troubleshoot-install#find-your-error) to match the error to a fix and for alternative install methods.
4953 
5054 [Git for Windows](https://git-scm.com/downloads/win) is recommended on native Windows so Claude Code can use the Bash tool. If Git for Windows is not installed, Claude Code uses PowerShell as the shell tool instead. WSL setups do not need Git for Windows.
5155 
from line 91
8791 
8892The command prints a version number followed by `(Claude Code)`.
8993 
90## Step 2: Log in to your account
94## Step 2: Start your first session
9195 
92Claude Code requires an account to use. Start an interactive session with the `claude` command and you'll be prompted to log in on first use:
96Open your terminal in any project directory and start Claude Code:
9397 
9498```bash theme={null}
99cd /path/to/your/project
95100claude
96101```
97102 
98For Claude subscription or Console accounts, follow the prompts to complete authentication in your browser. If you've set the `ANTHROPIC_API_KEY` environment variable, Claude Code skips the login prompt and asks you to approve the key instead. To switch accounts later or re-authenticate, type `/login` inside the running session:
103Replace `/path/to/your/project` with the path to the project you want to work on.
99104 
100```text wrap theme={null}
101/login
102```
105Claude Code prompts you to log in on first use. For Claude subscription or Console accounts, follow the prompts to complete authentication in your browser. If you've set the `ANTHROPIC_API_KEY` environment variable and you approve the key when Claude Code asks whether to use it, Claude Code skips the login prompt.
103106 
104107You can log in using any of these account types:
105108 
from line 113
110113 
111114Once logged in, your credentials are stored and you won't need to log in again. Learn more in [Credential Management](/docs/en/authentication#credential-management).
112115 
113## Step 3: Start your first session
116The Claude Code prompt appears with the version, current model, and working directory shown above it. Type `/help` for available commands or `/resume` to continue a previous conversation. To switch accounts later or re-authenticate, type `/login` inside the running session.
114117 
115Open your terminal in any project directory and start Claude Code:
118## Step 3: Ask your first question
116119 
117```bash theme={null}
118cd /path/to/your/project
119claude
120```
120Try one of these commands:
121121 
122Replace `/path/to/your/project` with the path to the project you want to work on.
123 
124You'll see the Claude Code prompt with the version, current model, and working directory shown above it. Type `/help` for available commands or `/resume` to continue a previous conversation.
125 
126## Step 4: Ask your first question
127 
128Start by understanding your codebase. Try one of these commands:
129 
130122```text wrap theme={null}
131123what does this project do?
132124```
from line 155
163155 Claude Code reads your project files as needed. You don't have to manually add context.
164156</Note>
165157 
166## Step 5: Make your first code change
158## Step 4: Make your first code change
167159 
168Now have Claude Code do some actual coding. Try a simple task:
160Try a small task:
169161 
170162```text wrap theme={null}
171163add a hello world function to the main file
from line 165
173165 
174166Claude Code finds the appropriate file and shows you the change. If it asks before making the change, select **Yes** to approve.
175167 
176With Claude Code v2.1.283 or later, auto mode is the [built-in starting permission mode](/docs/en/permission-modes#eliminate-prompts-with-auto-mode) for interactive terminal sessions: a classifier reviews actions instead of you, and Claude edits most files and runs most commands without asking you. On earlier versions, auto mode is the built-in starting permission mode only on Pro, Max, and Team plans. For the session you start right after installing, see [First session after an install or upgrade](/docs/en/env-vars#first-session-after-an-install-or-upgrade).
168The session's [permission mode](/docs/en/permission-modes) sets which actions Claude can take without asking you first. Press `Shift+Tab` at any time to switch the permission mode of the session you're in.
177169 
178<Note>
179 Your settings or your organization can set a different starting permission mode. [Which permission mode a session starts in](/docs/en/permission-modes#which-mode-a-session-starts-in) lists what does. Press `Shift+Tab` at any time to switch the permission mode of the session you're in.
180</Note>
170## Step 5: Use Git with Claude Code
181171 
182## Step 6: Use Git with Claude Code
183 
184172Claude Code makes Git operations conversational:
185173 
186174```text wrap theme={null}
from line 193
205193help me resolve merge conflicts
206194```
207195 
208## Step 7: Fix a bug or add a feature
196## Step 6: Fix a bug or add a feature
209197 
210Claude is proficient at debugging and feature implementation.
211 
212198Describe what you want in natural language:
213199 
214200```text wrap theme={null}
from line 207
221207there's a bug where users can submit empty forms - fix it
222208```
223209 
224Claude Code will:
210## Step 7: Test out other common workflows
225211 
226* Locate the relevant code
227* Understand the context
228* Implement a solution
229* Run tests if available
230 
231## Step 8: Test out other common workflows
232 
233212There are a number of ways to work with Claude:
234213 
235214**Refactor code**
from line 308
329308 
330309Now that you've learned the basics, explore more advanced features:
331310 
332<CardGroup cols={2}>
333 <Card title="How Claude Code works" icon="microchip" href="/docs/en/how-claude-code-works">
334 Understand the agentic loop, built-in tools, and how Claude Code interacts with your project
335 </Card>
311* [How Claude Code works](/docs/en/how-claude-code-works): understand the agentic loop, built-in tools, and how Claude Code interacts with your project
312* [Best practices](/docs/en/best-practices): get better results with effective prompting and project setup
313* [Common workflows](/docs/en/common-workflows): step-by-step guides for common tasks
314* [Extend Claude Code](/docs/en/features-overview): customize with CLAUDE.md, skills, hooks, MCP, and more
336315 
337 <Card title="Best practices" icon="star" href="/docs/en/best-practices">
338 Get better results with effective prompting and project setup
339 </Card>
316See [advanced setup](/docs/en/setup) for installation options, manual updates, or uninstallation instructions.
340317 
341 <Card title="Common workflows" icon="graduation-cap" href="/docs/en/common-workflows">
342 Step-by-step guides for common tasks
343 </Card>
344 
345 <Card title="Extend Claude Code" icon="puzzle-piece" href="/docs/en/features-overview">
346 Customize with CLAUDE.md, skills, hooks, MCP, and more
347 </Card>
348</CardGroup>
349 
350318## Getting help
351319 
352* **In Claude Code**: Type `/help` or ask a "how do I" question
353* **Documentation**: You're here! Browse other guides
354* **Courses**: Take [Claude Code 101](https://academy.claude.com/courses/claude-code-101) and other free self-paced courses on [Claude Academy](https://academy.claude.com/)
355* **Community**: Join the [Discord server](https://www.anthropic.com/discord) for tips and support
320* **In Claude Code**: type `/help` or ask a "how do I" question
321* **Documentation**: browse the other guides on this site
322* **Courses**: take [Claude Code 101](https://academy.claude.com/courses/claude-code-101) and other free self-paced courses on [Claude Academy](https://academy.claude.com/)
323* **Community**: join the [Discord server](https://www.anthropic.com/discord) for tips and support
356324 

setup Changed · +6 / -4 lines

from line 39
3939 curl -fsSL https://claude.ai/install.sh | bash
4040 ```
4141 
42 On Windows, your prompt shows `PS C:\` when you're in PowerShell and `C:\` without the `PS` when you're in CMD.
43 
4244 **Windows PowerShell:**
4345 
4446 ```powershell theme={null}
from line 55
5355 
5456 When the installer finishes, open a new terminal window and run `claude --version`. A working installation prints a version number. If your shell says `claude` isn't found or isn't recognized, the install directory isn't on your PATH yet: see [Fix your PATH](/docs/en/troubleshoot-install#command-not-found-claude-after-installation).
5557 
56 If you see `The token '&&' is not a valid statement separator`, you're in PowerShell, not CMD. If you see `'irm' is not recognized as an internal or external command`, you're in CMD, not PowerShell. Your prompt shows `PS C:\` when you're in PowerShell and `C:\` without the `PS` when you're in CMD.
58 If you see `The token '&&' is not a valid statement separator`, you're in PowerShell, not CMD. If you see `'irm' is not recognized as an internal or external command`, you're in CMD, not PowerShell.
5759 
58 If the install command fails with `syntax error near unexpected token '<'`, a `403`, or another curl error, see [Troubleshoot installation](/docs/en/troubleshoot-install#find-your-error) to match the error to a fix and for alternative install methods.
60 If the install command fails with `syntax error near unexpected token '<'`, a `403`, or any other error, see [Troubleshoot installation](/docs/en/troubleshoot-install#find-your-error) to match the error to a fix and for alternative install methods.
5961 
6062 [Git for Windows](https://git-scm.com/downloads/win) is recommended on native Windows so Claude Code can use the Bash tool. If Git for Windows is not installed, Claude Code uses PowerShell as the shell tool instead. WSL setups do not need Git for Windows.
6163 
from line 188
186188 
187189Claude Code requires a Pro, Max, Team, Enterprise, or Console account. The free claude.ai plan does not include Claude Code access. You can also use Claude Code with a third-party API provider like [Amazon Bedrock](/docs/en/amazon-bedrock), [Google Cloud's Agent Platform](/docs/en/google-vertex-ai), or [Microsoft Foundry](/docs/en/microsoft-foundry).
188190 
189After installing, log in by running `claude` and following the browser prompts. If the `ANTHROPIC_API_KEY` environment variable is set, Claude Code prompts you once to approve the key instead of opening a browser. See [Authentication](/docs/en/authentication) for all account types and team setup options.
191After installing, log in by running `claude` and following the browser prompts. If you've set the `ANTHROPIC_API_KEY` environment variable and you approve the key when Claude Code asks whether to use it, Claude Code skips the login prompt. See [Authentication](/docs/en/authentication) for all account types and team setup options.
190192 
191193## Update Claude Code
192194 

authentication Changed · +1 / -1 lines

from line 6
66 
77## Log in to Claude Code
88 
9After [installing Claude Code](/docs/en/setup#install-claude-code), run `claude` in your terminal. On first launch, Claude Code opens a browser window for you to log in. If you've set the `ANTHROPIC_API_KEY` environment variable, Claude Code skips the login prompt and asks you to approve the key instead.
9After [installing Claude Code](/docs/en/setup#install-claude-code), run `claude` in your terminal. On first launch, Claude Code opens a browser window for you to log in. If you've set the `ANTHROPIC_API_KEY` environment variable and you approve the key when Claude Code asks whether to use it, Claude Code skips the login prompt.
1010 
1111If the browser doesn't open automatically, press `c` to copy the login URL to your clipboard, then paste it into your browser.
1212 

claude-tag Changed · +1 / -1 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

Nothing in the body moved in this read. What changed is above.

costs Changed · +1 / -1 lines

from line 334
334334* **Use plan mode for complex tasks**: Press Shift+Tab to cycle to [plan mode](/docs/en/permission-modes#analyze-before-you-edit-with-plan-mode) before implementation. Claude explores the codebase and proposes an approach for your approval, preventing expensive re-work when the initial direction is wrong.
335335* **Course-correct early**: If Claude starts heading the wrong direction, press Escape to stop immediately. Use `/rewind` or double-tap Escape to restore conversation and code to a previous checkpoint.
336336* **Give verification targets**: Include test cases, paste screenshots, or define expected output in your prompt. When Claude can verify its own work, it catches issues before you need to request fixes.
337* **Test incrementally**: Write one file, test it, then continue. This catches issues early when they're cheap to fix.
337* **Test incrementally**: Write one file, test it, then continue. This catches issues early.
338338 
339339## Background token usage
340340 

fast-mode Changed · +1 / -1 lines

from line 76
7676 
7777Fast mode pricing is flat across the full 1M token context window. For the standard Opus rate to compare against, see the [Claude pricing reference](https://platform.claude.com/docs/en/about-claude/pricing).
7878 
79The first time you enable fast mode in a conversation, you pay the full fast mode uncached input token price for the entire conversation context. The deeper into a conversation you are, the more this costs, so enabling fast mode from the start is cheaper. The cost applies once per conversation, so toggling fast mode off and on again later does not repeat it. For the mechanism, see [how fast mode interacts with the prompt cache](/docs/en/prompt-caching#turning-on-fast-mode).
79The first time you enable fast mode in a conversation, you pay the full fast mode uncached input token price for the entire conversation context. The deeper into a conversation you are, the more this costs, so the charge is smallest when you enable fast mode at the start. The cost applies once per conversation, so toggling fast mode off and on again later doesn't repeat it. For the mechanism, see [how fast mode interacts with the prompt cache](/docs/en/prompt-caching#turning-on-fast-mode).
8080 
8181### See where fast mode spend appears
8282 

plugin-evals Changed · +1 / -1 lines

from line 106
106106 
107107 The most common first finding is a `Δ` near zero with the case's `tool_used: Skill` grader failing, which means Claude isn't choosing your skill on natural phrasing. Adjust the skill's [`description`](/docs/en/skills#frontmatter-reference), run `claude plugin eval .` again, and compare.
108108 
109 To iterate on one case cheaply, run a single arm once. A single run is noisy, so confirm any change at the default three runs before you trust it. With one arm the table shows `SCORE` and `PASS%` columns instead of `WITH`, `W/OUT`, and `Δ`:
109 To iterate on one case with fewer runs, run a single arm once. A single run is noisy, so confirm any change at the default three runs before you trust it. With one arm the table shows `SCORE` and `PASS%` columns instead of `WITH`, `W/OUT`, and `Δ`:
110110 
111111 ```bash theme={null}
112112 claude plugin eval . --case <case-name> --runs 1 --ablation none

prompt-caching Changed · +2 / -2 lines

from line 252
252252 
253253On a Pro or Max plan, when you resume a large session after a long break, Claude Code [offers to resume from a summary](/docs/en/sessions#resume-from-a-summary) so later requests don't carry the full history.
254254 
255The time to live (TTL) controls how long a gap the cache survives. The API offers two: a five-minute TTL, and a [one-hour TTL](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#1-hour-cache-duration) that keeps the cache warm through longer breaks but [bills cache writes at a higher rate](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing). The longer TTL helps when you leave a session idle and come back to it, because you skip the reprocessing an expired prefix costs. It costs more on short bursts of work that never idle past five minutes, where the higher write rate applies and the longer cache lifetime goes unused.
255The time to live (TTL) controls how long a gap the cache survives. The API offers two: a five-minute TTL, and a [one-hour TTL](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#1-hour-cache-duration) that keeps the cache warm through longer breaks but [charges a higher rate for cache writes](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing). The longer TTL helps when you leave a session idle and come back to it, because you skip the reprocessing an expired prefix costs. It costs more on short bursts of work that never idle past five minutes, where the higher write rate applies and the longer cache lifetime goes unused.
256256 
257257### Which TTL each request gets
258258 
from line 268
268268| Main conversation | One hour | Five minutes |
269269| Everything else | Five minutes, except the server-controlled helper requests, which get one hour | Five minutes |
270270 
271Once you go over your plan's usage limit and Claude Code draws on [usage credits](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans), you are billed for that usage, so Claude Code drops the main conversation to the cheaper five-minute TTL. To keep the one-hour TTL there, [choose the TTL yourself](#choose-the-ttl-yourself).
271Once you go over your plan's usage limit and Claude Code draws on [usage credits](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans), you are billed for that usage, so Claude Code drops the main conversation to the five-minute TTL, which charges a lower rate for cache writes. To keep the one-hour TTL there, [choose the TTL yourself](#choose-the-ttl-yourself).
272272 
273273### Choose the TTL yourself
274274 

prompt-library Changed · +1 / -1 lines

from line 1338
13381338 },
13391339 "review-your-changes-before": {
13401340 title: "Review your changes before you commit",
1341 teaches: "Catch problems while they're still cheap to fix. Claude reads the changed files in full, not just the diff lines, so it spots issues a quick self-review misses.",
1341 teaches: "Catch problems while they take less work to fix. Claude reads the changed files in full, not just the diff lines, so it spots issues a quick self-review misses.",
13421342 next: "Run `/code-review` for the same check in one command",
13431343 prompt: "review my uncommitted changes and flag anything that looks risky before I commit"
13441344 },

sub-agents Changed · +2 / -2 lines

from line 16
1616* **Enforce constraints** by limiting which tools a subagent can use
1717* **Reuse configurations** across projects with user-level subagents
1818* **Specialize behavior** with focused system prompts for specific domains
19* **Control costs** by routing tasks to faster, cheaper models like Haiku
19* **Control costs** by routing tasks to faster, lower-cost models like Haiku
2020 
2121Claude uses each subagent's description to decide when to delegate tasks. When you create a subagent, write a clear description so Claude knows when to use it.
2222 
from line 1189
11891189| Permissions | Prompts surface in your terminal | [Prompts surface in your main session](#run-subagents-in-foreground-or-background) when running in the background |
11901190| Prompt cache | Shared with main session | Separate cache |
11911191 
1192Because a fork's system prompt and tool definitions are identical to the parent, its first request reuses the parent's [prompt cache](/docs/en/prompt-caching#subagents-and-the-cache). This makes forking cheaper than spawning a fresh subagent for tasks that need the same context.
1192Because a fork's system prompt and tool definitions are identical to the parent, its first request reuses the parent's [prompt cache](/docs/en/prompt-caching#subagents-and-the-cache). Because of that reuse, a fork costs less than a fresh subagent for tasks that need the same context.
11931193 
11941194When Claude spawns a fork through the Agent tool, it can pass `isolation: "worktree"` so the fork's file edits are written to a separate git worktree instead of your checkout. A fork can't spawn further forks.
11951195 
Feedback