File size: 207,496 Bytes
17e291c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
{
  "metadata": {
    "title": "Claude Code Master 2026",
    "description": "10 articulos curados sobre Claude Code (mayo 2026) - prompting, planning, skills, .md, MCP, novedades",
    "curated_date": "2026-05-06",
    "notebook_id": null
  },
  "generated_at": "2026-05-06T23:42:29",
  "total_chars": 195395,
  "articles": [
    {
      "id": 1,
      "title": "Best practices for Claude Code",
      "url": "https://code.claude.com/docs/en/best-practices",
      "author": "Anthropic",
      "publisher": "Anthropic Docs",
      "date": "2026 (continuously updated)",
      "official": true,
      "topics": [
        "prompting",
        "planning",
        "mcp",
        "skills",
        "claude_md",
        "subagents",
        "hooks",
        "plugins"
      ],
      "summary": "Guia oficial canonica con todos los patrones probados internamente: explore-plan-implement, CLAUDE.md tactico, permission modes, parallel sessions, fan-out, auto mode.",
      "content_markdown": "Claude Code is an agentic coding environment. Unlike a chatbot that answers questions and waits, Claude Code can read your files, run commands, make changes, and autonomously work through problems while you watch, redirect, or step away entirely. This changes how you work. Instead of writing code yourself and asking Claude to review it, you describe what you want and Claude figures out how to build it. Claude explores, plans, and implements. But this autonomy still comes with a learning curve. Claude works within certain constraints you need to understand. This guide covers patterns that have proven effective across Anthropic’s internal teams and for engineers using Claude Code across various codebases, languages, and environments. For how the agentic loop works under the hood, see## Documentation Index\n\nFetch the complete documentation index at:\n\n[https://code.claude.com/docs/llms.txt]Use this file to discover all available pages before exploring further.\n\n\n[How Claude Code works](https://code.claude.com/docs/en/how-claude-code-works).\n\nMost best practices are based on one constraint: Claude’s context window fills up fast, and performance degrades as it fills. Claude’s context window holds your entire conversation, including every message, every file Claude reads, and every command output. However, this can fill up fast. A single debugging session or codebase exploration might generate and consume tens of thousands of tokens. This matters since LLM performance degrades as context fills. When the context window is getting full, Claude may start “forgetting” earlier instructions or making more mistakes. The context window is the most important resource to manage. To see how a session fills up in practice,\n\n[watch an interactive walkthrough](https://code.claude.com/docs/en/context-window)of what loads at startup and what each file read costs. Track context usage continuously with a\n\n[custom status line](https://code.claude.com/docs/en/statusline), and see\n\n[Reduce token usage](https://code.claude.com/docs/en/costs#reduce-token-usage)for strategies on reducing token usage.\n\n## Give Claude a way to verify its work\n\nClaude performs dramatically better when it can verify its own work, like run tests, compare screenshots, and validate outputs. Without clear success criteria, it might produce something that looks right but actually doesn’t work. You become the only feedback loop, and every mistake requires your attention.| Strategy | Before | After |\n|---|---|---|\nProvide verification criteria | ”implement a function that validates email addresses\" | \"write a validateEmail function. example test cases:\n|\nVerify UI changes visually | ”make the dashboard look better\" | \"[paste screenshot] implement this design. take a screenshot of the result and compare it to the original. list differences and fix them” |\nAddress root causes, not symptoms | ”the build is failing\" | \"the build fails with this error: [paste error]. fix it and verify the build succeeds. address the root cause, don’t suppress the error” |\n\n[Claude in Chrome extension](https://code.claude.com/docs/en/chrome). It opens new tabs in your browser, tests the UI, and iterates until the code works. Your verification can also be a test suite, a linter, or a Bash command that checks output. Invest in making your verification rock-solid.\n\n## Explore first, then plan, then code\n\nLetting Claude jump straight to coding can produce code that solves the wrong problem. Use[plan mode](https://code.claude.com/docs/en/permission-modes#analyze-before-you-edit-with-plan-mode)to separate exploration from execution. The recommended workflow has four phases:\n\nExplore\n\nEnter plan mode. Claude reads files and answers questions without making changes.\n\nclaude (plan mode)\n\nPlan\n\nAsk Claude to create a detailed implementation plan.Press\n\nclaude (plan mode)\n\n`Ctrl+G`\n\nto open the plan in your text editor for direct editing before Claude proceeds.Implement\n\nSwitch out of plan mode and let Claude code, verifying against its plan.\n\nclaude (default mode)\n\nPlan mode is useful, but also adds overhead.For tasks where the scope is clear and the fix is small (like fixing a typo, adding a log line, or renaming a variable) ask Claude to do it directly.Planning is most useful when you’re uncertain about the approach, when the change modifies multiple files, or when you’re unfamiliar with the code being modified. If you could describe the diff in one sentence, skip the plan.\n\n## Provide specific context in your prompts\n\nClaude can infer intent, but it can’t read your mind. Reference specific files, mention constraints, and point to example patterns.| Strategy | Before | After |\n|---|---|---|\nScope the task. Specify which file, what scenario, and testing preferences. | ”add tests for foo.py\" | \"write a test for foo.py covering the edge case where the user is logged out. avoid mocks.” |\nPoint to sources. Direct Claude to the source that can answer a question. | ”why does ExecutionFactory have such a weird api?\" | \"look through ExecutionFactory’s git history and summarize how its api came to be” |\nReference existing patterns. Point Claude to patterns in your codebase. | ”add a calendar widget\" | \"look at how existing widgets are implemented on the home page to understand the patterns. HotDogWidget.php is a good example. follow the pattern to implement a new calendar widget that lets the user select a month and paginate forwards/backwards to pick a year. build from scratch without libraries other than the ones already used in the codebase.” |\nDescribe the symptom. Provide the symptom, the likely location, and what “fixed” looks like. | ”fix the login bug\" | \"users report that login fails after session timeout. check the auth flow in src/auth/, especially token refresh. write a failing test that reproduces the issue, then fix it” |\n\n`\"what would you improve in this file?\"`\n\ncan surface things you wouldn’t have thought to ask about.\n### Provide rich content\n\nYou can provide rich data to Claude in several ways:**Reference files with**instead of describing where code lives. Claude reads the file before responding.`@`\n\n**Paste images directly**. Copy/paste or drag and drop images into the prompt.**Give URLs**for documentation and API references. Use`/permissions`\n\nto allowlist frequently-used domains.**Pipe in data**by running`cat error.log | claude`\n\nto send file contents directly.**Let Claude fetch what it needs**. Tell Claude to pull context itself using Bash commands, MCP tools, or by reading files.\n\n## Configure your environment\n\nA few setup steps make Claude Code significantly more effective across all your sessions. For a full overview of extension features and when to use each one, see[Extend Claude Code](https://code.claude.com/docs/en/features-overview).\n\n### Write an effective CLAUDE.md\n\nCLAUDE.md is a special file that Claude reads at the start of every conversation. Include Bash commands, code style, and workflow rules. This gives Claude persistent context it can’t infer from code alone. The`/init`\n\ncommand analyzes your codebase to detect build systems, test frameworks, and code patterns, giving you a solid foundation to refine.\nThere’s no required format for CLAUDE.md files, but keep it short and human-readable. For example:\nCLAUDE.md\n\n[skills](https://code.claude.com/docs/en/skills)instead. Claude loads them on demand without bloating every conversation. Keep it concise. For each line, ask:\n\n*“Would removing this cause Claude to make mistakes?”*If not, cut it. Bloated CLAUDE.md files cause Claude to ignore your actual instructions!\n\n| ✅ Include | ❌ Exclude |\n|---|---|\n| Bash commands Claude can’t guess | Anything Claude can figure out by reading code |\n| Code style rules that differ from defaults | Standard language conventions Claude already knows |\n| Testing instructions and preferred test runners | Detailed API documentation (link to docs instead) |\n| Repository etiquette (branch naming, PR conventions) | Information that changes frequently |\n| Architectural decisions specific to your project | Long explanations or tutorials |\n| Developer environment quirks (required env vars) | File-by-file descriptions of the codebase |\n| Common gotchas or non-obvious behaviors | Self-evident practices like “write clean code” |\n\n`@path/to/import`\n\nsyntax:\nCLAUDE.md\n\n**Home folder (**: applies to all Claude sessions`~/.claude/CLAUDE.md`\n\n)**Project root (**: check into git to share with your team`./CLAUDE.md`\n\n)**Project root (**: personal project-specific notes; add this file to your`./CLAUDE.local.md`\n\n)`.gitignore`\n\nso it isn’t shared with your team**Parent directories**: useful for monorepos where both`root/CLAUDE.md`\n\nand`root/foo/CLAUDE.md`\n\nare pulled in automatically**Child directories**: Claude pulls in child CLAUDE.md files on demand when working with files in those directories\n\n### Configure permissions\n\nBy default, Claude Code requests permission for actions that might modify your system: file writes, Bash commands, MCP tools, etc. This is safe but tedious. After the tenth approval you’re not really reviewing anymore, you’re just clicking through. There are three ways to reduce these interruptions:**Auto mode**: a separate classifier model reviews commands and blocks only what looks risky: scope escalation, unknown infrastructure, or hostile-content-driven actions. Best when you trust the general direction of a task but don’t want to click through every step**Permission allowlists**: permit specific tools you know are safe, like`npm run lint`\n\nor`git commit`\n\n**Sandboxing**: enable OS-level isolation that restricts filesystem and network access, allowing Claude to work more freely within defined boundaries\n\n[permission modes](https://code.claude.com/docs/en/permission-modes),\n\n[permission rules](https://code.claude.com/docs/en/permissions), and\n\n[sandboxing](https://code.claude.com/docs/en/sandboxing).\n\n### Use CLI tools\n\nCLI tools are the most context-efficient way to interact with external services. If you use GitHub, install the`gh`\n\nCLI. Claude knows how to use it for creating issues, opening pull requests, and reading comments. Without `gh`\n\n, Claude can still use the GitHub API, but unauthenticated requests often hit rate limits.\nClaude is also effective at learning CLI tools it doesn’t already know. Try prompts like `Use 'foo-cli-tool --help' to learn about foo tool, then use it to solve A, B, C.`\n\n### Connect MCP servers\n\nWith[MCP servers](https://code.claude.com/docs/en/mcp), you can ask Claude to implement features from issue trackers, query databases, analyze monitoring data, integrate designs from Figma, and automate workflows.\n\n### Set up hooks\n\n[Hooks](https://code.claude.com/docs/en/hooks-guide)run scripts automatically at specific points in Claude’s workflow. Unlike CLAUDE.md instructions which are advisory, hooks are deterministic and guarantee the action happens. Claude can write hooks for you. Try prompts like\n\n*“Write a hook that runs eslint after every file edit”*or\n\n*“Write a hook that blocks writes to the migrations folder.”*Edit\n\n`.claude/settings.json`\n\ndirectly to configure hooks by hand, and run `/hooks`\n\nto browse what’s configured.\n### Create skills\n\n[Skills](https://code.claude.com/docs/en/skills)extend Claude’s knowledge with information specific to your project, team, or domain. Claude applies them automatically when relevant, or you can invoke them directly with\n\n`/skill-name`\n\n.\nCreate a skill by adding a directory with a `SKILL.md`\n\nto `.claude/skills/`\n\n:\n.claude/skills/api-conventions/SKILL.md\n\n.claude/skills/fix-issue/SKILL.md\n\n`/fix-issue 1234`\n\nto invoke it. Use `disable-model-invocation: true`\n\nfor workflows with side effects that you want to trigger manually.\n### Create custom subagents\n\n[Subagents](https://code.claude.com/docs/en/sub-agents)run in their own context with their own set of allowed tools. They’re useful for tasks that read many files or need specialized focus without cluttering your main conversation.\n\n.claude/agents/security-reviewer.md\n\n*“Use a subagent to review this code for security issues.”*\n\n### Install plugins\n\n[Plugins](https://code.claude.com/docs/en/plugins)bundle skills, hooks, subagents, and MCP servers into a single installable unit from the community and Anthropic. If you work with a typed language, install a\n\n[code intelligence plugin](https://code.claude.com/docs/en/discover-plugins#code-intelligence)to give Claude precise symbol navigation and automatic error detection after edits. For guidance on choosing between skills, subagents, hooks, and MCP, see\n\n[Extend Claude Code](https://code.claude.com/docs/en/features-overview#match-features-to-your-goal).\n\n## Communicate effectively\n\nThe way you communicate with Claude Code significantly impacts the quality of results.### Ask codebase questions\n\nWhen onboarding to a new codebase, use Claude Code for learning and exploration. You can ask Claude the same sorts of questions you would ask another engineer:- How does logging work?\n- How do I make a new API endpoint?\n- What does\n`async move { ... }`\n\ndo on line 134 of`foo.rs`\n\n? - What edge cases does\n`CustomerOnboardingFlowImpl`\n\nhandle? - Why does this code call\n`foo()`\n\ninstead of`bar()`\n\non line 333?\n\n### Let Claude interview you\n\nClaude asks about things you might not have considered yet, including technical implementation, UI/UX, edge cases, and tradeoffs.## Manage your session\n\nConversations are persistent and reversible. Use this to your advantage!### Course-correct early and often\n\nThe best results come from tight feedback loops. Though Claude occasionally solves problems perfectly on the first attempt, correcting it quickly generally produces better solutions faster.: stop Claude mid-action with the`Esc`\n\n`Esc`\n\nkey. Context is preserved, so you can redirect.: press`Esc + Esc`\n\nor`/rewind`\n\n`Esc`\n\ntwice or run`/rewind`\n\nto open the rewind menu and restore previous conversation and code state, or summarize from a selected message.: have Claude revert its changes.`\"Undo that\"`\n\n: reset context between unrelated tasks. Long sessions with irrelevant context can reduce performance.`/clear`\n\n\n`/clear`\n\nand start fresh with a more specific prompt that incorporates what you learned. A clean session with a better prompt almost always outperforms a long session with accumulated corrections.\n### Manage context aggressively\n\nClaude Code automatically compacts conversation history when you approach context limits, which preserves important code and decisions while freeing space. During long sessions, Claude’s context window can fill with irrelevant conversation, file contents, and commands. This can reduce performance and sometimes distract Claude.- Use\n`/clear`\n\nfrequently between tasks to reset the context window entirely - When auto compaction triggers, Claude summarizes what matters most, including code patterns, file states, and key decisions\n- For more control, run\n`/compact <instructions>`\n\n, like`/compact Focus on the API changes`\n\n- To compact only part of the conversation, use\n`Esc + Esc`\n\nor`/rewind`\n\n, select a message checkpoint, and choose**Summarize from here**. This condenses messages from that point forward while keeping earlier context intact. - Customize compaction behavior in CLAUDE.md with instructions like\n`\"When compacting, always preserve the full list of modified files and any test commands\"`\n\nto ensure critical context survives summarization - For quick questions that don’t need to stay in context, use\n. The answer appears in a dismissible overlay and never enters conversation history, so you can check a detail without growing context.`/btw`\n\n\n### Use subagents for investigation\n\nSince context is your fundamental constraint, subagents are one of the most powerful tools available. When Claude researches a codebase it reads lots of files, all of which consume your context. Subagents run in separate context windows and report back summaries:### Rewind with checkpoints\n\nClaude automatically checkpoints before changes. Double-tap`Escape`\n\nor run `/rewind`\n\nto open the rewind menu. You can restore conversation only, restore code only, restore both, or summarize from a selected message. See [Checkpointing](https://code.claude.com/docs/en/checkpointing)for details. Instead of carefully planning every move, you can tell Claude to try something risky. If it doesn’t work, rewind and try a different approach. Checkpoints persist across sessions, so you can close your terminal and still rewind later.\n\n### Resume conversations\n\nClaude Code saves conversations locally, so when a task spans multiple sittings you don’t have to re-explain the context. Run`claude --continue`\n\nto pick up the most recent session, or `claude --resume`\n\nto choose from a list. Give sessions descriptive names like `oauth-migration`\n\nso you can find them later. See [Manage sessions](https://code.claude.com/docs/en/sessions)for the full set of resume, branch, and naming controls.\n\n## Automate and scale\n\nOnce you’re effective with one Claude, multiply your output with parallel sessions, non-interactive mode, and fan-out patterns. Everything so far assumes one human, one Claude, and one conversation. But Claude Code scales horizontally. The techniques in this section show how you can get more done.### Run non-interactive mode\n\nWith`claude -p \"your prompt\"`\n\n, you can run Claude non-interactively, without a session. [Non-interactive mode](https://code.claude.com/docs/en/headless)is how you integrate Claude into CI pipelines, pre-commit hooks, or any automated workflow. The output formats let you parse results programmatically: plain text, JSON, or streaming JSON.\n\n### Run multiple Claude sessions\n\nPick the parallel approach that fits how much coordination you want to do yourself:[Worktrees](https://code.claude.com/docs/en/worktrees): run separate CLI sessions in isolated git checkouts so edits don’t collide[Desktop app](https://code.claude.com/docs/en/desktop#work-in-parallel-with-sessions): manage multiple local sessions visually, each in its own worktree[Claude Code on the web](https://code.claude.com/docs/en/claude-code-on-the-web): run sessions on Anthropic-managed cloud infrastructure in isolated VMs[Agent teams](https://code.claude.com/docs/en/agent-teams): automated coordination of multiple sessions with shared tasks, messaging, and a team lead\n\n| Session A (Writer) | Session B (Reviewer) |\n|---|---|\n`Implement a rate limiter for our API endpoints` | |\n`Review the rate limiter implementation in @src/middleware/rateLimiter.ts. Look for edge cases, race conditions, and consistency with our existing middleware patterns.` | |\n`Here's the review feedback: [Session B output]. Address these issues.` |\n\n### Fan out across files\n\nFor large migrations or analyses, you can distribute work across many parallel Claude invocations:Generate a task list\n\nHave Claude list all files that need migrating (e.g.,\n\n`list all 2,000 Python files that need migrating`\n\n)`--verbose`\n\nfor debugging during development, and turn it off in production.\n### Run autonomously with auto mode\n\nFor uninterrupted execution with background safety checks, use[auto mode](https://code.claude.com/docs/en/permission-modes#eliminate-prompts-with-auto-mode). A classifier model reviews commands before they run, blocking scope escalation, unknown infrastructure, and hostile-content-driven actions while letting routine work proceed without prompts.\n\n`-p`\n\nflag, auto mode aborts if the classifier repeatedly blocks actions, since there is no user to fall back to. See [when auto mode falls back](https://code.claude.com/docs/en/permission-modes#when-auto-mode-falls-back)for thresholds.\n\n## Avoid common failure patterns\n\nThese are common mistakes. Recognizing them early saves time:**The kitchen sink session.**You start with one task, then ask Claude something unrelated, then go back to the first task. Context is full of irrelevant information.**Fix**:`/clear`\n\nbetween unrelated tasks.**Correcting over and over.**Claude does something wrong, you correct it, it’s still wrong, you correct again. Context is polluted with failed approaches.**Fix**: After two failed corrections,`/clear`\n\nand write a better initial prompt incorporating what you learned.**The over-specified CLAUDE.md.**If your CLAUDE.md is too long, Claude ignores half of it because important rules get lost in the noise.**Fix**: Ruthlessly prune. If Claude already does something correctly without the instruction, delete it or convert it to a hook.**The trust-then-verify gap.**Claude produces a plausible-looking implementation that doesn’t handle edge cases.**Fix**: Always provide verification (tests, scripts, screenshots). If you can’t verify it, don’t ship it.**The infinite exploration.**You ask Claude to “investigate” something without scoping it. Claude reads hundreds of files, filling the context.**Fix**: Scope investigations narrowly or use subagents so the exploration doesn’t consume your main context.\n\n## Develop your intuition\n\nThe patterns in this guide aren’t set in stone. They’re starting points that work well in general, but might not be optimal for every situation. Sometimes you*should*let context accumulate because you’re deep in one complex problem and the history is valuable. Sometimes you should skip planning and let Claude figure it out because the task is exploratory. Sometimes a vague prompt is exactly right because you want to see how Claude interprets the problem before constraining it. Pay attention to what works. When Claude produces great output, notice what you did: the prompt structure, the context you provided, the mode you were in. When Claude struggles, ask why. Was the context too noisy? The prompt too vague? The task too big for one pass? Over time, you’ll develop intuition that no guide can capture. You’ll know when to be specific and when to be open-ended, when to plan and when to explore, when to clear context and when to let it accumulate.\n\n## Related resources\n\n[How Claude Code works](https://code.claude.com/docs/en/how-claude-code-works): the agentic loop, tools, and context management[Extend Claude Code](https://code.claude.com/docs/en/features-overview): skills, hooks, MCP, subagents, and plugins[Common workflows](https://code.claude.com/docs/en/common-workflows): step-by-step recipes for debugging, testing, PRs, and more[CLAUDE.md](https://code.claude.com/docs/en/memory): store project conventions and persistent context",
      "content_chars": 22463,
      "fetch_status": "ok"
    },
    {
      "id": 2,
      "title": "Equipping agents for the real world with Agent Skills",
      "url": "https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills",
      "author": "Anthropic Engineering",
      "publisher": "Anthropic",
      "date": "2025-10-16",
      "official": true,
      "topics": [
        "skills",
        "agents"
      ],
      "summary": "Anuncio y diseno conceptual de Agent Skills: carpetas con SKILL.md que el modelo descubre y carga on-demand.",
      "content_markdown": "## Get the developer newsletter\n\nProduct updates, how-tos, community spotlights, and more. Delivered monthly to your inbox.\n\n*Update: We've published* *Agent Skills**as an open standard for cross-platform portability. (December 18, 2025)*\n\nAs model capabilities improve, we can now build general-purpose agents that interact with full-fledged computing environments. [Claude Code](https://claude.com/product/claude-code), for example, can accomplish complex tasks across domains using local code execution and filesystems. But as these agents become more powerful, we need more composable, scalable, and portable ways to equip them with domain-specific expertise.\n\nThis led us to create [ Agent Skills](https://www.anthropic.com/news/skills): organized folders of instructions, scripts, and resources that agents can discover and load dynamically to perform better at specific tasks.\n\nBuilding a skill for an agent is like putting together an onboarding guide for a new hire. Instead of building fragmented, custom-designed agents for each use case, anyone can now specialize their agents with composable capabilities by capturing and sharing their procedural knowledge. In this article, we explain what Skills are, show how they work, and share best practices for building your own.\n\nTo see Skills in action, let’s walk through a real example: one of the skills that powers [Claude’s recently launched document editing abilities](https://www.anthropic.com/news/create-files). Claude already knows a lot about understanding PDFs, but is limited in its ability to manipulate them directly (e.g. to fill out a form). This [PDF skill](https://github.com/anthropics/skills/tree/main/document-skills/pdf) lets us give Claude these new abilities.\n\nAt its simplest, a skill is a directory that contains a `SKILL.md file`\n\n. This file must start with YAML frontmatter that contains some required metadata: `name`\n\nand `description`\n\n. At startup, the agent pre-loads the `name`\n\nand `description`\n\nof every installed skill into its system prompt.\n\nThis metadata is the **first level** of *progressive disclosure*: it provides just enough information for Claude to know when each skill should be used without loading all of it into context. The actual body of this file is the **second level** of detail. If Claude thinks the skill is relevant to the current task, it will load the skill by reading its full `SKILL.md`\n\ninto context.\n\nAs skills grow in complexity, they may contain too much context to fit into a single `SKILL.md`\n\n, or context that’s relevant only in specific scenarios. In these cases, skills can bundle additional files within the skill directory and reference them by name from `SKILL.md`\n\n. These additional linked files are the **third level** (and beyond) of detail, which Claude can choose to navigate and discover only as needed.\n\nIn the PDF skill shown below, the `SKILL.md`\n\nrefers to two additional files (`reference.md`\n\nand `forms.md`\n\n) that the skill author chooses to bundle alongside the core `SKILL.md`\n\n. By moving the form-filling instructions to a separate file (`forms.md`\n\n), the skill author is able to keep the core of the skill lean, trusting that Claude will read `forms.md`\n\nonly when filling out a form.\n\nProgressive disclosure is the core design principle that makes Agent Skills flexible and scalable. Like a well-organized manual that starts with a table of contents, then specific chapters, and finally a detailed appendix, skills let Claude load information only as needed:\n\nAgents with a filesystem and code execution tools don’t need to read the entirety of a skill into their context window when working on a particular task. This means that the amount of context that can be bundled into a skill is effectively unbounded.\n\nThe following diagram shows how the context window changes when a skill is triggered by a user’s message.\n\nThe sequence of operations shown:\n\n- To start, the context window has the core system prompt and the metadata for each of the installed skills, along with the user’s initial message;\n- Claude triggers the PDF skill by invoking a Bash tool to read the contents of\n`pdf/SKILL.md`\n\n; - Claude chooses to read the\n`forms.md`\n\nfile bundled with the skill; - Finally, Claude proceeds with the user’s task now that it has loaded relevant instructions from the PDF skill.\n\nSkills can also include code for Claude to execute as tools at its discretion.\n\nLarge language models excel at many tasks, but certain operations are better suited for traditional code execution. For example, sorting a list via token generation is far more expensive than simply running a sorting algorithm. Beyond efficiency concerns, many applications require the deterministic reliability that only code can provide.\n\nIn our example, the PDF skill includes a pre-written Python script that reads a PDF and extracts all form fields. Claude can run this script without loading either the script or the PDF into context. And because code is deterministic, this workflow is consistent and repeatable.\n\nHere are some helpful guidelines for getting started with authoring and testing skills:\n\n**Start with evaluation:**Identify specific gaps in your agents’ capabilities by running them on representative tasks and observing where they struggle or require additional context. Then build skills incrementally to address these shortcomings.**Structure for scale:**When the`SKILL.md`\n\nfile becomes unwieldy, split its content into separate files and reference them. If certain contexts are mutually exclusive or rarely used together, keeping the paths separate will reduce the token usage. Finally, code can serve as both executable tools and as documentation. It should be clear whether Claude should run scripts directly or read them into context as reference.**Think from Claude’s perspective:**Monitor how Claude uses your skill in real scenarios and iterate based on observations: watch for unexpected trajectories or overreliance on certain contexts. Pay special attention to the`name`\n\nand`description`\n\nof your skill. Claude will use these when deciding whether to trigger the skill in response to its current task.**Iterate with Claude:**As you work on a task with Claude, ask Claude to capture its successful approaches and common mistakes into reusable context and code within a skill. If it goes off track when using a skill to complete a task, ask it to self-reflect on what went wrong. This process will help you discover what context Claude actually needs, instead of trying to anticipate it upfront.\n\nSkills provide Claude with new capabilities through instructions and code. While this makes them powerful, it also means that malicious skills may introduce vulnerabilities in the environment where they’re used or direct Claude to exfiltrate data and take unintended actions.\n\nWe recommend installing skills only from trusted sources. When installing a skill from a less-trusted source, thoroughly audit it before use. Start by reading the contents of the files bundled in the skill to understand what it does, paying particular attention to code dependencies and bundled resources like images or scripts. Similarly, pay attention to instructions or code within the skill that instruct Claude to connect to potentially untrusted external network sources.\n\nAgent Skills are [supported today](https://www.anthropic.com/news/skills) across [Claude.ai](http://claude.ai/redirect/website.v1.3548e342-3ad6-4653-9e38-ced230ca48c6), Claude Code, the Claude Agent SDK, and the Claude Developer Platform.\n\nIn the coming weeks, we’ll continue to add features that support the full lifecycle of creating, editing, discovering, sharing, and using Skills. We’re especially excited about the opportunity for Skills to help organizations and individuals share their context and workflows with Claude. We’ll also explore how Skills can complement [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) servers by teaching agents more complex workflows that involve external tools and software.\n\nLooking further ahead, we hope to enable agents to create, edit, and evaluate Skills on their own, letting them codify their own patterns of behavior into reusable capabilities.\n\nSkills are a simple concept with a correspondingly simple format. This simplicity makes it easier for organizations, developers, and end users to build customized agents and give them new capabilities.\n\nWe’re excited to see what people build with Skills. Get started today by checking out our Skills [docs](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview) and [cookbook](https://github.com/anthropics/claude-cookbooks/tree/main/skills).\n\nWritten by Barry Zhang, Keith Lazuka, and Mahesh Murag, who all really like folders. Special thanks to the many others across Anthropic who championed, supported, and built Skills.\n\nProduct updates, how-tos, community spotlights, and more. Delivered monthly to your inbox.",
      "content_chars": 8953,
      "fetch_status": "ok"
    },
    {
      "id": 3,
      "title": "Building agents with the Claude Agent SDK",
      "url": "https://claude.com/blog/building-agents-with-the-claude-agent-sdk",
      "author": "Anthropic Engineering",
      "publisher": "Anthropic",
      "date": "2025-09-29",
      "official": true,
      "topics": [
        "agent_sdk",
        "skills",
        "novedades"
      ],
      "summary": "Guia oficial del Claude Agent SDK (renombrado desde Claude Code SDK), con best practices para construir agentes propios.",
      "content_markdown": "# Building agents with the Claude Agent SDK\n\nThe Claude Agent SDK is a collection of tools that helps developers build powerful agents on top of Claude Code. In this article, we walk through how to get started and share our best practices.\n\n\nThe Claude Agent SDK is a collection of tools that helps developers build powerful agents on top of Claude Code. In this article, we walk through how to get started and share our best practices.\n\n\n- September 29, 2025\n- 5min\n\nLast year, we shared lessons in [building effective agents](https://www.anthropic.com/engineering/building-effective-agents) alongside our customers. Since then, we've released [Claude Code](https://claude.com/product/claude-code), an agentic coding solution that we originally built to support developer productivity at Anthropic.\n\nOver the past several months, Claude Code has become far more than a coding tool. At Anthropic, we’ve been [using it](https://www.anthropic.com/news/how-anthropic-teams-use-claude-code) for deep research, video creation, and note-taking, among countless other non-coding applications. In fact, it has begun to power almost all of our major agent loops.\n\nIn other words, the agent harness that powers Claude Code (the Claude Code SDK) can power many other types of agents, too. To reflect this broader vision, we're renaming the Claude Code SDK to the Claude Agent SDK.\n\nIn this post, we'll highlight why we built the Claude Agent SDK, how to build your own agents with it, and share the best practices that have emerged from our team’s own deployments.\n\n[The key design principle](https://www.youtube.com/watch?v=vLIDHi-1PVU) behind Claude Code is that Claude needs the same tools that programmers use every day. It needs to be able to find appropriate files in a codebase, write and edit files, lint the code, run it, debug, edit, and sometimes take these actions iteratively until the code succeeds.\n\nWe found that by giving Claude access to the user’s computer (via the terminal), it had what it needed to write code like programmers do.\n\nBut this has also made Claude in Claude Code effective at *non*-coding tasks. By giving it tools to run bash commands, edit files, create files and search files, Claude can read CSV files, search the web, build visualizations, interpret metrics, and do all sorts of other digital work – in short, create general-purpose agents with a computer. The key design principle behind the Claude Agent SDK is to give your agents a computer, allowing them to work like humans do.\n\nWe believe giving Claude a computer unlocks the ability to build agents that are more effective than before. For example, with our SDK, developers can build:\n\n**Finance agents**:Build agents that can understand your portfolio and goals, as well as help you evaluate investments by accessing external APIs, storing data and running code to make calculations.**Personal assistant agents**. Build agents that can help you book travel and manage your calendar, as well as schedule appointments, put together briefs, and more by connecting to your internal data sources and tracking context across applications.**Customer support agents:**Build agents that can handle high ambiguity user requests, like customer service tickets, by collecting and reviewing user data, connecting to external APIs, messaging users back and escalating to humans when needed.**Deep research agents**: Build agents that can conduct comprehensive research across large document collections by searching through file systems, analyzing and synthesizing information from multiple sources, cross-referencing data across files, and generating detailed reports.\n\nAnd much more. At its core, the SDK gives you the primitives to build agents for whatever workflow you're trying to automate.\n\nIn Claude Code, Claude often operates in a specific feedback loop: gather context -> take action -> verify work -> repeat.\n\nThis offers a useful way to think about other agents, and the capabilities they should be given. To illustrate this, we’ll walk through the example of how we might build an email agent in the Claude Agent SDK.\n\nWhen developing an agent, you want to give it more than just a prompt: it needs to be able to fetch and update its own context. Here’s how features in the SDK can help.\n\nThe file system represents information that *could* be pulled into the model's context.\n\nWhen Claude encounters large files, like logs or user-uploaded files, it will decide which way to load these into its context by using bash scripts like `grep`\n\nand `tail`\n\n. In essence, the folder and file structure of an agent becomes a form of [context engineering](http://anthropic.com/news/context-management).\n\nOur email agent might store previous conversations in a folder called ‘Conversations’. This would allow it to search previous these for its context when asked about them.\n\n[Semantic search](https://www.anthropic.com/news/contextual-retrieval) is usually faster than agentic search, but less accurate, more difficult to maintain, and less transparent. It involves ‘chunking’ the relevant context, embedding these chunks as vectors, and then searching for concepts by querying those vectors. Given its limitations, we suggest starting with agentic search, and only adding semantic search if you need faster results or more variations.\n\nClaude Agent SDK supports subagents by default. [Subagents](https://docs.claude.com/en/api/agent-sdk/subagents) are useful for two main reasons. First, they enable parallelization: you can spin up multiple subagents to work on different tasks simultaneously. Second, they help manage context: subagents use their own isolated context windows, and only send relevant information back to the orchestrator, rather than their full context. This makes them ideal for tasks that require sifting through large amounts of information where most of it won't be useful.\n\nWhen designing our email agent, we might give it a 'search subagent' capability. The email agent could then spin off multiple search subagents in parallel—each running different queries against your email history—and have them return only the relevant excerpts rather than full email threads.\n\nWhen agents are running for long periods of time, context maintenance becomes critical. The Claude Agent SDK’s compact feature automatically summarizes previous messages when the context limit approaches, so your agent won’t run out of context. This is built on Claude Code’s [compact slash command](https://docs.claude.com/en/docs/claude-code/sdk/sdk-slash-commands#%2Fcompact-compact-conversation-history).\n\nOnce you’ve gathered context, you’ll want to give your agent flexible ways of taking action.\n\n[Tools](https://www.anthropic.com/engineering/writing-tools-for-agents) are the primary building blocks of execution for your agent. Tools are prominent in Claude's context window, making them the primary actions Claude will consider when deciding how to complete a task. This means you should be conscious about how you design your tools to maximize context efficiency. You can see more best practices in our blog post, [Writing effective tools for agents – with agents](https://www.anthropic.com/engineering/writing-tools-for-agents) .\n\nAs such, your tools should be primary actions you want your agent to take. Learn how to make [custom tools](https://docs.claude.com/en/api/agent-sdk/custom-tools) in the Claude Agent SDK.\n\nFor our email agent, we might define tools like “`fetchInbox`\n\n” or “`searchEmails`\n\n” as the agent’s primary, most frequent actions.\n\nBash is useful as a general-purpose tool to allow the agent to do flexible work using a computer.\n\nIn our email agent, the user might have important information stored in their attachments. Claude could write code to download the PDF, convert it to text, and search across it to find useful information by calling, as depicted below:\n\nThe Claude Agent SDK excels at code generation—and for good reason. Code is precise, composable, and infinitely reusable, making it an ideal output for agents that need to perform complex operations reliably.\n\nWhen building agents, consider: which tasks would benefit from being expressed as code? Often, the answer unlocks significant capabilities.\n\nFor example, our recent launch of [file creation in ](https://www.anthropic.com/news/create-files)[Claude.AI](http://claude.ai/redirect/website.v1.bdb29daa-1a07-41ec-87f6-579dc33634bd) relies entirely on code generation. Claude writes Python scripts to create Excel spreadsheets, PowerPoint presentations, and Word documents, ensuring consistent formatting and complex functionality that would be difficult to achieve any other way.\n\nIn our email agent, we might want to allow users to create rules for inbound emails. To achieve this, we could write code to run on that event:\n\nThe [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) provides standardized integrations to external services, handling authentication and API calls automatically. This means you can connect your agent to tools like Slack, GitHub, Google Drive, or Asana without writing custom integration code or managing OAuth flows yourself.\n\nFor our email agent, we might want to `search Slack messages`\n\nto understand team context, or `check Asana tasks`\n\nto see if someone has already been assigned to handle a customer request. With MCP servers, these integrations work out of the box—your agent can simply call tools like search_slack_messages or get_asana_tasks and the MCP handles the rest.\n\nThe growing [MCP ecosystem](https://github.com/modelcontextprotocol/servers) means you can quickly add new capabilities to your agents as pre-built integrations become available, letting you focus on agent behavior.\n\nThe Claude Code SDK finishes the agentic loop by evaluating its work. Agents that can check and improve their own output are fundamentally more reliable—they catch mistakes before they compound, self-correct when they drift, and get better as they iterate.\n\nThe key is giving Claude concrete ways to evaluate its work. Here are three approaches we've found effective:\n\nThe best form of feedback is providing clearly defined rules for an output, then explaining which rules failed and why.\n\n[Code linting](https://stackoverflow.com/questions/8503559/what-is-linting) is an excellent form of rules-based feedback. The more in-depth in feedback the better. For instance, it is usually better to generate TypeScript and lint it than it is to generate pure JavaScript because it provides you with multiple additional layers of feedback.\n\nWhen generating an email, you may want Claude to check that the email address is valid (if not, throw an error) and that the user has sent an email to them before (if so, throw a warning).\n\nWhen using an agent to complete visual tasks, like UI generation or testing, visual feedback (in the form of screenshots or renders) can be helpful. For example, if sending an email with HTML formatting, you could screenshot the generated email and provide it back to the model for visual verification and iterative refinement. The model would then check whether the visual output matches what was requested.\n\nFor instance:\n\n**Layout**- Are elements positioned correctly? Is spacing appropriate?**Styling**- Do colors, fonts, and formatting appear as intended?**Content hierarchy**- Is information presented in the right order with proper emphasis?**Responsiveness**- Does it look broken or cramped? (though a single screenshot has limited viewport info)\n\nUsing an MCP server like Playwright, you can automate this visual feedback loop—taking screenshots of rendered HTML, capturing different viewport sizes, and even testing interactive elements—all within your agent's workflow.\n\nYou can also have another language model “judge\" the output of your agent based on fuzzy rules. This is generally not a very robust method, and can have heavy latency tradeoffs, but for applications where any boost in performance is worth the cost, it can be helpful.\n\nOur email agent might have a separate subagent judge the tone of its drafts, to see if they fit well with the user’s previous messages.\n\nAfter you’ve gone through the agent loop a few times, we recommend testing your agent, and ensuring that it’s well-equipped for its tasks. The best way to improve an agent is to look carefully at its output, especially the cases where it fails, and to put yourself in its shoes: does it have the [right tools](https://www.anthropic.com/engineering/writing-tools-for-agents) for the job?\n\nHere are some other questions to ask as you’re evaluating whether or not your agent is well-equipped to do its job:\n\n- If your agent misunderstands the task, it might be missing key information. Can you alter the structure of your search APIs to make it easier to find what it needs to know?\n- If your agent fails at a task repeatedly, can you add a formal rule in your tool calls to identify and fix the failure?\n- If your agent can’t fix its errors, can you give it more useful or creative tools to approach the problem differently?\n- If your agent’s performance varies as you add features, build a representative test set for programmatic evaluations (or evals) based on customer usage.\n\nThe Claude Agent SDK makes it easier to build autonomous agents by giving Claude access to a computer where it can write files, run commands, and iterate on its work.\n\nWith the agent loop in mind (gathering context, taking action, and your verifying work), you can build reliable agents that are easy to deploy and iterate on.\n\nYou can [get started](https://docs.claude.com/en/api/agent-sdk/overview) with the Claude Agent SDK today. For developers who are already building on the SDK, we recommend migrating to the latest version by following [this guide](https://docs.claude.com/en/docs/claude-code/sdk/migration-guide).\n\nWritten by Thariq Shihipar with notes and editing from Molly Vorwerck, Suzanne Wang, Alex Isken, Cat Wu, Keir Bradwell, Alexander Bricken & Ashwin Bhat.\n\nGet the developer newsletter\n\nProduct updates, how-tos, community spotlights, and more. Delivered monthly to your inbox.",
      "content_chars": 14109,
      "fetch_status": "ok"
    },
    {
      "id": 4,
      "title": "How Claude remembers your project (Memory)",
      "url": "https://code.claude.com/docs/en/memory",
      "author": "Anthropic",
      "publisher": "Anthropic Docs",
      "date": "2026 (continuously updated)",
      "official": true,
      "topics": [
        "claude_md",
        "memoria",
        "auto_memory",
        "rules",
        "subagent_memory"
      ],
      "summary": "Doc canonico del sistema de memoria: CLAUDE.md vs auto memory, .claude/rules/, path-scoped rules, MEMORY.md, troubleshooting.",
      "content_markdown": "Each Claude Code session begins with a fresh context window. Two mechanisms carry knowledge across sessions:## Documentation Index\n\nFetch the complete documentation index at:\n\n[https://code.claude.com/docs/llms.txt]Use this file to discover all available pages before exploring further.\n\n\n**CLAUDE.md files**: instructions you write to give Claude persistent context**Auto memory**: notes Claude writes itself based on your corrections and preferences\n\n[Write and organize CLAUDE.md files](https://code.claude.com#claude-md-files)[Scope rules to specific file types](https://code.claude.com#organize-rules-with-claude/rules/)with`.claude/rules/`\n\n[Configure auto memory](https://code.claude.com#auto-memory)so Claude takes notes automatically[Troubleshoot](https://code.claude.com#troubleshoot-memory-issues)when instructions aren’t being followed\n\n## CLAUDE.md vs auto memory\n\nClaude Code has two complementary memory systems. Both are loaded at the start of every conversation. Claude treats them as context, not enforced configuration. The more specific and concise your instructions, the more consistently Claude follows them.| CLAUDE.md files | Auto memory | |\n|---|---|---|\nWho writes it | You | Claude |\nWhat it contains | Instructions and rules | Learnings and patterns |\nScope | Project, user, or org | Per working tree |\nLoaded into | Every session | Every session (first 200 lines or 25KB) |\nUse for | Coding standards, workflows, project architecture | Build commands, debugging insights, preferences Claude discovers |\n\n[subagent configuration](https://code.claude.com/docs/en/sub-agents#enable-persistent-memory)for details.\n\n## CLAUDE.md files\n\nCLAUDE.md files are markdown files that give Claude persistent instructions for a project, your personal workflow, or your entire organization. You write these files in plain text; Claude reads them at the start of every session.### When to add to CLAUDE.md\n\nTreat CLAUDE.md as the place you write down what you’d otherwise re-explain. Add to it when:- Claude makes the same mistake a second time\n- A code review catches something Claude should have known about this codebase\n- You type the same correction or clarification into chat that you typed last session\n- A new teammate would need the same context to be productive\n\n[skill](https://code.claude.com/docs/en/skills)or a\n\n[path-scoped rule](https://code.claude.com#organize-rules-with-claude/rules/)instead. The\n\n[extension overview](https://code.claude.com/docs/en/features-overview#build-your-setup-over-time)covers when to use each mechanism.\n\n### Choose where to put CLAUDE.md files\n\nCLAUDE.md files can live in several locations, each with a different scope. More specific locations take precedence over broader ones.| Scope | Location | Purpose | Use case examples | Shared with |\n|---|---|---|---|---|\nManaged policy | • macOS: `/Library/Application Support/ClaudeCode/CLAUDE.md` • Linux and WSL: `/etc/claude-code/CLAUDE.md` • Windows: `C:\\Program Files\\ClaudeCode\\CLAUDE.md` | Organization-wide instructions managed by IT/DevOps | Company coding standards, security policies, compliance requirements | All users in organization |\nProject instructions | `./CLAUDE.md` or `./.claude/CLAUDE.md` | Team-shared instructions for the project | Project architecture, coding standards, common workflows | Team members via source control |\nUser instructions | `~/.claude/CLAUDE.md` | Personal preferences for all projects | Code styling preferences, personal tooling shortcuts | Just you (all projects) |\nLocal instructions | `./CLAUDE.local.md` | Personal project-specific preferences; add to `.gitignore` | Your sandbox URLs, preferred test data | Just you (current project) |\n\n[How CLAUDE.md files load](https://code.claude.com#how-claude-md-files-load)for the full resolution order. For large projects, you can break instructions into topic-specific files using\n\n[project rules](https://code.claude.com#organize-rules-with-claude/rules/). Rules let you scope instructions to specific file types or subdirectories.\n\n### Set up a project CLAUDE.md\n\nA project CLAUDE.md can be stored in either`./CLAUDE.md`\n\nor `./.claude/CLAUDE.md`\n\n. Create this file and add instructions that apply to anyone working on the project: build and test commands, coding standards, architectural decisions, naming conventions, and common workflows. These instructions are shared with your team through version control, so focus on project-level standards rather than personal preferences.\n### Write effective instructions\n\nCLAUDE.md files are loaded into the context window at the start of every session, consuming tokens alongside your conversation. The[context window visualization](https://code.claude.com/docs/en/context-window)shows where CLAUDE.md loads relative to the rest of the startup context. Because they’re context rather than enforced configuration, how you write instructions affects how reliably Claude follows them. Specific, concise, well-structured instructions work best.\n\n**Size**: target under 200 lines per CLAUDE.md file. Longer files consume more context and reduce adherence. If your instructions are growing large, use\n\n[path-scoped rules](https://code.claude.com#path-specific-rules)so instructions load only when Claude works with matching files. You can also split content into\n\n[imports](https://code.claude.com#import-additional-files)for organization, though imported files still load and enter the context window at launch.\n\n**Structure**: use markdown headers and bullets to group related instructions. Claude scans structure the same way readers do: organized sections are easier to follow than dense paragraphs.\n\n**Specificity**: write instructions that are concrete enough to verify. For example:\n\n- “Use 2-space indentation” instead of “Format code properly”\n- “Run\n`npm test`\n\nbefore committing” instead of “Test your changes” - “API handlers live in\n`src/api/handlers/`\n\n” instead of “Keep files organized”\n\n**Consistency**: if two rules contradict each other, Claude may pick one arbitrarily. Review your CLAUDE.md files, nested CLAUDE.md files in subdirectories, and\n\n[periodically to remove outdated or conflicting instructions. In monorepos, use](https://code.claude.com#organize-rules-with-claude/rules/)\n\n`.claude/rules/`\n\n[to skip CLAUDE.md files from other teams that aren’t relevant to your work.](https://code.claude.com#exclude-specific-claude-md-files)\n\n`claudeMdExcludes`\n\n### Import additional files\n\nCLAUDE.md files can import additional files using`@path/to/import`\n\nsyntax. Imported files are expanded and loaded into context at launch alongside the CLAUDE.md that references them.\nBoth relative and absolute paths are allowed. Relative paths resolve relative to the file containing the import, not the working directory. Imported files can recursively import other files, with a maximum depth of five hops.\nTo pull in a README, package.json, and a workflow guide, reference them with `@`\n\nsyntax anywhere in your CLAUDE.md:\n`CLAUDE.local.md`\n\nat the project root. It loads alongside `CLAUDE.md`\n\nand is treated the same way. Add `CLAUDE.local.md`\n\nto your `.gitignore`\n\nso it isn’t committed; running `/init`\n\nand choosing the personal option does this for you.\nIf you work across multiple git worktrees of the same repository, a gitignored `CLAUDE.local.md`\n\nonly exists in the worktree where you created it. To share personal instructions across worktrees, import a file from your home directory instead:\n[.](https://code.claude.com#organize-rules-with-claude/rules/)\n\n`.claude/rules/`\n\n### AGENTS.md\n\nClaude Code reads`CLAUDE.md`\n\n, not `AGENTS.md`\n\n. If your repository already uses `AGENTS.md`\n\nfor other coding agents, create a `CLAUDE.md`\n\nthat imports it so both tools read the same instructions without duplicating them. You can also add Claude-specific instructions below the import. Claude loads the imported file at session start, then appends the rest:\nCLAUDE.md\n\n### How CLAUDE.md files load\n\nClaude Code reads CLAUDE.md files by walking up the directory tree from your current working directory, checking each directory along the way for`CLAUDE.md`\n\nand `CLAUDE.local.md`\n\nfiles. This means if you run Claude Code in `foo/bar/`\n\n, it loads instructions from `foo/bar/CLAUDE.md`\n\n, `foo/CLAUDE.md`\n\n, and any `CLAUDE.local.md`\n\nfiles alongside them.\nAll discovered files are concatenated into context rather than overriding each other. Across the directory tree, content is ordered from the filesystem root down to your working directory. For the `foo/bar/`\n\nexample, `foo/CLAUDE.md`\n\nappears in context before `foo/bar/CLAUDE.md`\n\n, so instructions closer to where you launched Claude are read last. Within each directory, `CLAUDE.local.md`\n\nis appended after `CLAUDE.md`\n\n, so your personal notes are the last thing Claude reads at that level.\nClaude also discovers `CLAUDE.md`\n\nand `CLAUDE.local.md`\n\nfiles in subdirectories under your current working directory. Instead of loading them at launch, they are included when Claude reads files in those subdirectories.\nIf you work in a large monorepo where other teams’ CLAUDE.md files get picked up, use [to skip them. Block-level HTML comments (](https://code.claude.com#exclude-specific-claude-md-files)\n\n`claudeMdExcludes`\n\n`<!-- maintainer notes -->`\n\n) in CLAUDE.md files are stripped before the content is injected into Claude’s context. Use them to leave notes for human maintainers without spending context tokens on them. Comments inside code blocks are preserved. When you open a CLAUDE.md file directly with the Read tool, comments remain visible.\n#### Load from additional directories\n\nThe`--add-dir`\n\nflag gives Claude access to additional directories outside your main working directory. By default, CLAUDE.md files from these directories are not loaded.\nTo also load memory files from additional directories, set the `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD`\n\nenvironment variable:\n`CLAUDE.md`\n\n, `.claude/CLAUDE.md`\n\n, `.claude/rules/*.md`\n\n, and `CLAUDE.local.md`\n\nfrom the additional directory. `CLAUDE.local.md`\n\nis skipped if you exclude `local`\n\nfrom [.](https://code.claude.com/docs/en/cli-reference)\n\n`--setting-sources`\n\n### Organize rules with `.claude/rules/`\n\n\nFor larger projects, you can organize instructions into multiple files using the `.claude/rules/`\n\ndirectory. This keeps instructions modular and easier for teams to maintain. Rules can also be [scoped to specific file paths](https://code.claude.com#path-specific-rules), so they only load into context when Claude works with matching files, reducing noise and saving context space.\n\nRules load into context every session or when matching files are opened. For task-specific instructions that don’t need to be in context all the time, use\n\n[skills](https://code.claude.com/docs/en/skills)instead, which only load when you invoke them or when Claude determines they’re relevant to your prompt.#### Set up rules\n\nPlace markdown files in your project’s`.claude/rules/`\n\ndirectory. Each file should cover one topic, with a descriptive filename like `testing.md`\n\nor `api-design.md`\n\n. All `.md`\n\nfiles are discovered recursively, so you can organize rules into subdirectories like `frontend/`\n\nor `backend/`\n\n:\n[are loaded at launch with the same priority as](https://code.claude.com#path-specific-rules)\n\n`paths`\n\nfrontmatter`.claude/CLAUDE.md`\n\n.\n#### Path-specific rules\n\nRules can be scoped to specific files using YAML frontmatter with the`paths`\n\nfield. These conditional rules only apply when Claude is working with files matching the specified patterns.\n`paths`\n\nfield are loaded unconditionally and apply to all files. Path-scoped rules trigger when Claude reads files matching the pattern, not on every tool use.\nUse glob patterns in the `paths`\n\nfield to match files by extension, directory, or any combination:\n| Pattern | Matches |\n|---|---|\n`**/*.ts` | All TypeScript files in any directory |\n`src/**/*` | All files under `src/` directory |\n`*.md` | Markdown files in the project root |\n`src/components/*.tsx` | React components in a specific directory |\n\n#### Share rules across projects with symlinks\n\nThe`.claude/rules/`\n\ndirectory supports symlinks, so you can maintain a shared set of rules and link them into multiple projects. Symlinks are resolved and loaded normally, and circular symlinks are detected and handled gracefully.\nThis example links both a shared directory and an individual file:\n#### User-level rules\n\nPersonal rules in`~/.claude/rules/`\n\napply to every project on your machine. Use them for preferences that aren’t project-specific:\n### Manage CLAUDE.md for large teams\n\nFor organizations deploying Claude Code across teams, you can centralize instructions and control which CLAUDE.md files are loaded.#### Deploy organization-wide CLAUDE.md\n\nOrganizations can deploy a centrally managed CLAUDE.md that applies to all users on a machine. This file cannot be excluded by individual settings.Create the file at the managed policy location\n\n- macOS:\n`/Library/Application Support/ClaudeCode/CLAUDE.md`\n\n- Linux and WSL:\n`/etc/claude-code/CLAUDE.md`\n\n- Windows:\n`C:\\Program Files\\ClaudeCode\\CLAUDE.md`\n\n\nDeploy with your configuration management system\n\nUse MDM, Group Policy, Ansible, or similar tools to distribute the file across developer machines. See\n\n[managed settings](https://code.claude.com/docs/en/permissions#managed-settings)for other organization-wide configuration options.[managed settings](https://code.claude.com/docs/en/settings#settings-files)serve different purposes. Use settings for technical enforcement and CLAUDE.md for behavioral guidance:\n\n| Concern | Configure in |\n|---|---|\n| Block specific tools, commands, or file paths | Managed settings: `permissions.deny` |\n| Enforce sandbox isolation | Managed settings: `sandbox.enabled` |\n| Environment variables and API provider routing | Managed settings: `env` |\n| Authentication method and organization lock | Managed settings: `forceLoginMethod` , `forceLoginOrgUUID` |\n| Code style and quality guidelines | Managed CLAUDE.md |\n| Data handling and compliance reminders | Managed CLAUDE.md |\n| Behavioral instructions for Claude | Managed CLAUDE.md |\n\n#### Exclude specific CLAUDE.md files\n\nIn large monorepos, ancestor CLAUDE.md files may contain instructions that aren’t relevant to your work. The`claudeMdExcludes`\n\nsetting lets you skip specific files by path or glob pattern.\nThis example excludes a top-level CLAUDE.md and a rules directory from a parent folder. Add it to `.claude/settings.local.json`\n\nso the exclusion stays local to your machine:\n`claudeMdExcludes`\n\nat any [settings layer](https://code.claude.com/docs/en/settings#settings-files): user, project, local, or managed policy. Arrays merge across layers. Managed policy CLAUDE.md files cannot be excluded. This ensures organization-wide instructions always apply regardless of individual settings.\n\n## Auto memory\n\nAuto memory lets Claude accumulate knowledge across sessions without you writing anything. Claude saves notes for itself as it works: build commands, debugging insights, architecture notes, code style preferences, and workflow habits. Claude doesn’t save something every session. It decides what’s worth remembering based on whether the information would be useful in a future conversation.Auto memory requires Claude Code v2.1.59 or later. Check your version with\n\n`claude --version`\n\n.### Enable or disable auto memory\n\nAuto memory is on by default. To toggle it, open`/memory`\n\nin a session and use the auto memory toggle, or set `autoMemoryEnabled`\n\nin your project settings:\n`CLAUDE_CODE_DISABLE_AUTO_MEMORY=1`\n\n.\n### Storage location\n\nEach project gets its own memory directory at`~/.claude/projects/<project>/memory/`\n\n. The `<project>`\n\npath is derived from the git repository, so all worktrees and subdirectories within the same repo share one auto memory directory. Outside a git repo, the project root is used instead.\nTo store auto memory in a different location, set `autoMemoryDirectory`\n\nin your user settings at `~/.claude/settings.json`\n\n:\n`~/`\n\n. This setting is accepted from policy and user settings, and from the `--settings`\n\nflag. It is not accepted from project or local settings, since both files live inside the project directory and a cloned repository could supply either to redirect auto memory writes to sensitive locations.\nThe directory contains a `MEMORY.md`\n\nentrypoint and optional topic files:\n`MEMORY.md`\n\nacts as an index of the memory directory. Claude reads and writes files in this directory throughout your session, using `MEMORY.md`\n\nto keep track of what’s stored where.\nAuto memory is machine-local. All worktrees and subdirectories within the same git repository share one auto memory directory. Files are not shared across machines or cloud environments.\n### How it works\n\nThe first 200 lines of`MEMORY.md`\n\n, or the first 25KB, whichever comes first, are loaded at the start of every conversation. Content beyond that threshold is not loaded at session start. Claude keeps `MEMORY.md`\n\nconcise by moving detailed notes into separate topic files.\nThis limit applies only to `MEMORY.md`\n\n. CLAUDE.md files are loaded in full regardless of length, though shorter files produce better adherence.\nTopic files like `debugging.md`\n\nor `patterns.md`\n\nare not loaded at startup. Claude reads them on demand using its standard file tools when it needs the information.\nClaude reads and writes memory files during your session. When you see “Writing memory” or “Recalled memory” in the Claude Code interface, Claude is actively updating or reading from `~/.claude/projects/<project>/memory/`\n\n.\n### Audit and edit your memory\n\nAuto memory files are plain markdown you can edit or delete at any time. Run[to browse and open memory files from within a session.](https://code.claude.com#view-and-edit-with-memory)\n\n`/memory`\n\n## View and edit with `/memory`\n\n\nThe `/memory`\n\ncommand lists all CLAUDE.md, CLAUDE.local.md, and rules files loaded in your current session, lets you toggle auto memory on or off, and provides a link to open the auto memory folder. Select any file to open it in your editor.\nWhen you ask Claude to remember something, like “always use pnpm, not npm” or “remember that the API tests require a local Redis instance,” Claude saves it to auto memory. To add instructions to CLAUDE.md instead, ask Claude directly, like “add this to CLAUDE.md,” or edit the file yourself via `/memory`\n\n.\n## Troubleshoot memory issues\n\nThese are the most common issues with CLAUDE.md and auto memory, along with steps to debug them.### Claude isn’t following my CLAUDE.md\n\nCLAUDE.md content is delivered as a user message after the system prompt, not as part of the system prompt itself. Claude reads it and tries to follow it, but there’s no guarantee of strict compliance, especially for vague or conflicting instructions. To debug:- Run\n`/memory`\n\nto verify your CLAUDE.md and CLAUDE.local.md files are being loaded. If a file isn’t listed, Claude can’t see it. - Check that the relevant CLAUDE.md is in a location that gets loaded for your session (see\n[Choose where to put CLAUDE.md files](https://code.claude.com#choose-where-to-put-claude-md-files)). - Make instructions more specific. “Use 2-space indentation” works better than “format code nicely.”\n- Look for conflicting instructions across CLAUDE.md files. If two files give different guidance for the same behavior, Claude may pick one arbitrarily.\n\n[. This must be passed every invocation, so it’s better suited to scripts and automation than interactive use.](https://code.claude.com/docs/en/cli-reference#system-prompt-flags)\n\n`--append-system-prompt`\n\n### I don’t know what auto memory saved\n\nRun`/memory`\n\nand select the auto memory folder to browse what Claude has saved. Everything is plain markdown you can read, edit, or delete.\n### My CLAUDE.md is too large\n\nFiles over 200 lines consume more context and may reduce adherence. Use[path-scoped rules](https://code.claude.com#path-specific-rules)to load instructions only when Claude works with matching files, or trim content that isn’t needed in every session. Splitting into\n\n[helps organization but does not reduce context, since imported files load at launch.](https://code.claude.com#import-additional-files)\n\n`@path`\n\nimports### Instructions seem lost after `/compact`\n\n\nProject-root CLAUDE.md survives compaction: after `/compact`\n\n, Claude re-reads it from disk and re-injects it into the session. Nested CLAUDE.md files in subdirectories are not re-injected automatically; they reload the next time Claude reads a file in that subdirectory.\nIf an instruction disappeared after compaction, it was either given only in conversation or lives in a nested CLAUDE.md that hasn’t reloaded yet. Add conversation-only instructions to CLAUDE.md to make them persist. See [What survives compaction](https://code.claude.com/docs/en/context-window#what-survives-compaction)for the full breakdown. See\n\n[Write effective instructions](https://code.claude.com#write-effective-instructions)for guidance on size, structure, and specificity.\n\n## Related resources\n\n[Debug your configuration](https://code.claude.com/docs/en/debug-your-config): diagnose why CLAUDE.md or settings aren’t taking effect[Skills](https://code.claude.com/docs/en/skills): package repeatable workflows that load on demand[Settings](https://code.claude.com/docs/en/settings): configure Claude Code behavior with settings files[Subagent memory](https://code.claude.com/docs/en/sub-agents#enable-persistent-memory): let subagents maintain their own auto memory",
      "content_chars": 21593,
      "fetch_status": "ok"
    },
    {
      "id": 5,
      "title": "Claude Code Changelog (oficial)",
      "url": "https://code.claude.com/docs/en/changelog",
      "author": "Anthropic",
      "publisher": "Anthropic Docs",
      "date": "Updated continuously (last entry 2026-05-06)",
      "official": true,
      "topics": [
        "novedades",
        "changelog",
        "releases"
      ],
      "summary": "Changelog oficial version por version (v2.1.x). Source of truth para que cambia mes a mes.",
      "content_markdown": "This page is generated from the## Documentation Index\n\nFetch the complete documentation index at:\n\n[https://code.claude.com/docs/llms.txt]Use this file to discover all available pages before exploring further.\n\n\n[CHANGELOG.md on GitHub](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md). Run\n\n`claude --version`\n\nto check your installed version.\n- Added\n`CLAUDE_CODE_SESSION_ID`\n\nenvironment variable to the Bash tool subprocess environment, matching the`session_id`\n\npassed to hooks - Added\n`CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1`\n\nenv var to opt out of the fullscreen alternate-screen renderer and keep the conversation in the terminal’s native scrollback - Added a “Pasting…” footer hint while a Ctrl+V image paste is being read from the clipboard\n- Fixed external SIGINT (e.g. IDE stop button,\n`kill -INT`\n\n) not running graceful shutdown — terminal modes are now restored and the`--resume`\n\nhint is printed instead of an abrupt exit - Fixed an uncaught exception when the terminal is closed or SSH disconnects mid-session under the native build\n- Fixed\n`--resume`\n\nfailing with`no low surrogate in string`\n\nwhen a tool error truncation split an emoji; pre-corrupted sessions are sanitized on load - Fixed\n`--permission-mode`\n\nflag being ignored when resuming a plan-mode session with`-p --continue`\n\n/`--resume`\n\n, and plan mode not being re-applied after`ExitPlanMode`\n\nwithin the same session - Fixed fullscreen mode showing a blank screen after laptop sleep/wake or Ctrl+Z/\n`fg`\n\nuntil the next keystroke or stream output - Fixed cursor landing mid-grapheme on Ctrl+E/A/K/U/arrow keys when an Indic conjunct or ZWJ emoji wraps across lines\n- Fixed vim operators corrupting text containing decomposed (NFD) accented characters\n- Fixed pasting text starting with\n`/`\n\nsilently swallowing the input or triggering an unknown-command reply - Fixed pasting dumping stray escape sequences into the prompt when focus events or mouse-tracking reports interleave with the bracketed paste\n- Fixed mouse wheel scrolling being too fast in Cursor and VS Code 1.92–1.104 due to an upstream xterm.js bug\n- Fixed scroll-wheel handling in JetBrains IDE 2025.2 terminals (spurious arrow keys, wrong-direction events, runaway acceleration)\n- Fixed\n`/usage`\n\nCtrl+S hanging when copying the stats screenshot to the clipboard on Linux/X11 - Fixed\n`/terminal-setup`\n\nshowing a contradictory error in Windows Terminal — Shift+Enter is natively supported there - Fixed\n`/effort`\n\npicker not reflecting the`CLAUDE_CODE_EFFORT_LEVEL`\n\nenv var override - Fixed\n`/status`\n\nshowing the wrong default model for some users - Fixed slash command autocomplete popup being capped at ~3–5 visible commands instead of scaling with terminal height\n- Fixed statusline\n`context_window`\n\ntoken counts reflecting cumulative session totals instead of current context usage - Fixed Alt+T (thinking toggle) not working on macOS terminals without “Option as Meta” enabled (iTerm2, Terminal.app defaults)\n- Fixed dead keyboard input on Windows after re-opening a background session from\n`claude agents`\n\n- Fixed unbounded memory growth (10GB+ RSS) when a stdio MCP server writes non-protocol data to stdout\n- Fixed MCP servers that connect but fail\n`tools/list`\n\nsilently showing 0 tools — they now retry once and show “connected · tools fetch failed” in`/mcp`\n\n- Fixed unauthorized claude.ai MCP connectors showing as “failed” instead of “needs auth”, and headless\n`-p`\n\nmode retrying non-transient 4xx connection failures - Improved visual consistency in slash command dialogs and\n`/login`\n\n,`/upgrade`\n\n,`/extra-usage`\n\ndialog spacing - Updated the\n`/tui fullscreen`\n\nstartup banner to describe additional renderer benefits (lower memory usage, mouse support, auto-copy on select) - Fixed Bedrock and Vertex 400 errors when\n`ENABLE_PROMPT_CACHING_1H`\n\nis set\n\n- Fixed VS Code extension failing to activate on Windows due to a hardcoded build path in the bundled SDK (\n`createRequire`\n\npolyfill bug) - Fixed Mantle endpoint authentication failing with missing\n`x-api-key`\n\nheader\n\n- Added\n`--plugin-url <url>`\n\nflag to fetch a plugin`.zip`\n\narchive from a URL for the current session - Added\n`CLAUDE_CODE_FORCE_SYNC_OUTPUT=1`\n\nenv var to force-enable synchronized output on terminals that auto-detection misses (e.g. Emacs`eat`\n\n) - Added\n`CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE`\n\n: when set on Homebrew or WinGet installations, Claude Code runs the upgrade command in the background and prompts to restart - Plugin manifests:\n`themes`\n\nand`monitors`\n\nshould now be declared under`\"experimental\": { ... }`\n\n. Top-level declarations still work but`claude plugin validate`\n\nwill warn - Gateway\n`/v1/models`\n\ndiscovery for the`/model`\n\npicker is now opt-in via`CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1`\n\n(was automatic in 2.1.126–2.1.128) - Ctrl+R history picker now defaults to searching all prompts across all projects, matching pre-2.1.124 behavior. Press Ctrl+S to narrow to the current project or session\n- Third-party deployments (Bedrock, Vertex, Foundry, or\n`ANTHROPIC_BASE_URL`\n\ngateway) no longer see spinner tips pointing at first-party Anthropic surfaces `skillOverrides`\n\nsetting now works:`off`\n\nhides from model and`/`\n\n,`user-invocable-only`\n\nhides from model only,`name-only`\n\ncollapses description- The\n`claude_code.pull_request.count`\n\nOTel metric now counts PRs/MRs created via MCP tools, not just shell commands - Policy refusal error messages now include the API Request ID for easier support debugging\n- Fixed API errors with unrecognized 400 status codes showing raw JSON instead of the underlying error message\n- Fixed\n`/clear`\n\nnot resetting the terminal tab title after a conversation - Fixed session title chip from\n`/rename`\n\ndisappearing while a permission or other dialog is active - Fixed agent panel below the prompt being hidden when subagents are running (regression in 2.1.122)\n- Fixed external-editor handoff (Ctrl+G) blanking the conversation history above the prompt\n- Fixed\n`/context`\n\ndumping its rendered ASCII visualization grid into the conversation, wasting ~1.6k tokens per call - Fixed\n`/agents`\n\nLibrary list arrow-key navigation: the highlighted agent now stays visible when the list exceeds the viewport - Fixed\n`/branch`\n\nsuccess message not including the new branch’s session id for`/resume`\n\n- Fixed bold headers with keycap/ZWJ/skin-tone emoji losing trailing characters in fullscreen mode\n- Fixed server-managed settings policy not applying for enterprise/team users whose stored OAuth credentials lacked the\n`user:inference`\n\nscope - Fixed OAuth refresh race after wake-from-sleep that could log out all running sessions\n- Fixed 1-hour prompt cache TTL being silently downgraded to 5 minutes\n- Fixed cache-miss warning appearing spuriously after\n`/clear`\n\nor compaction when changing`/effort`\n\nor`/model`\n\n- Fixed\n`Bash(mkdir *)`\n\n,`Bash(touch *)`\n\nand similar allow rules not being honored for in-project paths - Fixed\n`deniedMcpServers`\n\npatterns with a`*://`\n\nscheme wildcard not matching mixed-case hostnames - Fixed harmless WebSocket warning being logged as an error in\n`--debug`\n\nduring voice mode - [VSCode] Fixed\n`/clear`\n\nnot clearing the conversation context and displayed transcript\n\n- Bare\n`/color`\n\n(no args) now picks a random session color `/mcp`\n\nnow shows the tool count for connected servers and flags servers that connected with 0 tools`--plugin-dir`\n\nnow accepts`.zip`\n\nplugin archives in addition to directories`--channels`\n\nnow works with console (API key) authentication — console orgs with managed settings must set`channelsEnabled: true`\n\nto enable- Updated\n`/model`\n\npicker: collapsed duplicate Opus 4.7 entries, and current Opus now shows as “Opus” instead of “Opus 4.7” - Subprocesses (Bash, hooks, MCP, LSP) no longer inherit\n`OTEL_*`\n\nenvironment variables, so OTEL-instrumented apps run via the Bash tool no longer pick up the CLI’s own OTLP endpoint - MCP:\n`workspace`\n\nis now a reserved server name — existing servers with that name will be skipped with a warning - Reconnecting MCP servers no longer flood the conversation with full tool-name lists on every reconnect — re-announced tools are summarized by server prefix\n- SDK hosts now receive a persistent\n`localSettings`\n\nsuggestion for Bash permission prompts, so “Always allow” writes to`.claude/settings.local.json`\n\n`EnterWorktree`\n\nnow creates the new branch from local HEAD as documented, instead of`origin/<default-branch>`\n\n— unpushed commits are no longer dropped- Auto mode: when the classifier can’t evaluate an action, the error now includes a hint (retry,\n`/compact`\n\n, or run with`--debug`\n\n) - Fixed focus mode briefly dimming the previous response when submitting a new prompt\n- Fixed stray “4;0;” desktop notification on every\n`/exit`\n\nin Kitty and other terminals that interpret OSC 9 as a notification - Fixed Remote Control showing an empty “Opening your options…” message on rate limit instead of actionable upsell options\n- Fixed drag-and-drop image upload hanging on “Pasting text…” when the image read fails\n- Fixed crash loop when piping very large input (>10 MB) to\n`claude -p`\n\nvia stdin - Fixed long URLs not being individually clickable on every wrapped row in fullscreen mode\n- Fixed\n`/plugin`\n\nComponents panel showing “Marketplace ‘inline’ not found” for plugins loaded via`--plugin-dir`\n\n- Fixed MCP tool results dropping images when the server returns both structured content and content blocks\n- Fixed fenced code blocks inside list items carrying leading whitespace into the clipboard on copy-paste\n- Fixed tab navigation in\n`/config`\n\nstranding focus — the tab header now stays focused so arrows and Esc keep working - Fixed markdown link labels being lost on terminals without OSC 8 hyperlink support — links now render as\n`label (url)`\n\ninstead of just the URL - Fixed sessions on 1M-context models with a smaller autocompact window being falsely blocked with “Prompt is too long” before reaching the actual API limit\n- Fixed parallel shell tool calls: a failing read-only command (grep, git diff, ls) no longer cancels sibling calls\n- Fixed banner showing “with X effort” on models that don’t support effort\n- Fixed\n`/fast`\n\non 3P providers fuzzy-matching to an unrelated skill instead of showing “not available” - Fixed Bedrock default model resolving to\n`global.*`\n\ninstead of the region-appropriate prefix - Fixed vim mode:\n`Space`\n\nin NORMAL mode now moves the cursor right, matching standard vi/vim behavior - Fixed terminal progress indicator (OSC 9;4) flickering off between tool calls — stays visible across the full turn\n- Fixed\n`/rename`\n\nwithout args failing on resumed sessions whose last entry is a compact boundary - Fixed stale “remote-control is active” status lines from prior sessions appearing after\n`--resume`\n\n/`--continue`\n\n- Fixed stale\n`installed_plugins.json`\n\nentries pointing at deleted cache directories polluting PATH - Fixed MCP stdio servers receiving corrupted arguments when\n`CLAUDE_CODE_SHELL_PREFIX`\n\nis set and an argument contains spaces or shell metacharacters - Fixed sub-agent progress summaries missing the prompt cache (~3×\n`cache_creation`\n\nreduction) - Fixed\n`/plugin update`\n\nnever detecting new versions of npm-sourced plugins - Fixed sub-agent summaries firing repeatedly while a sub-agent’s transcript is static, capping worst-case token cost on idle sub-agents\n- Headless\n`--output-format stream-json`\n\n:`init.plugin_errors`\n\nnow includes`--plugin-dir`\n\nload failures in addition to dependency demotions\n\n- The\n`/model`\n\npicker now lists models from your gateway’s`/v1/models`\n\nendpoint when`ANTHROPIC_BASE_URL`\n\npoints at an Anthropic-compatible gateway -\n- Added\n`claude project purge [path]`\n\nto delete all Claude Code state for a project (transcripts, tasks, file history, config entry) — supports`--dry-run`\n\n,`-y/--yes`\n\n,`-i/--interactive`\n\n, and`--all`\n\n\n- Added\n`--dangerously-skip-permissions`\n\nnow bypasses prompts for writes to`.claude/`\n\n,`.git/`\n\n,`.vscode/`\n\n, shell config files, and other previously-protected paths (catastrophic removal commands still prompt as a safety net)`claude auth login`\n\nnow accepts the OAuth code pasted into the terminal when the browser callback can’t reach localhost (WSL2, SSH, containers)`claude_code.skill_activated`\n\nOpenTelemetry event now fires for user-typed slash commands and carries a new`invocation_trigger`\n\nattribute (`\"user-slash\"`\n\n,`\"claude-proactive\"`\n\n, or`\"nested-skill\"`\n\n)- Auto mode: the spinner now turns red when a permission check stalls, instead of looking like the tool is running\n- Host-managed deployments (\n`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`\n\n) no longer auto-disable analytics on Bedrock/Vertex/Foundry - Windows: PowerShell 7 installed via the Microsoft Store, MSI without PATH, or\n`.NET global tool`\n\nis now detected - Windows: when the PowerShell tool is enabled, Claude now treats PowerShell as the primary shell instead of defaulting to Bash\n- Read tool: removed the per-file malware-assessment reminder that could cause spurious refusals and “this is not malware” commentary on legacy models\n**Security:**Fixed`allowManagedDomainsOnly`\n\n/`allowManagedReadPathsOnly`\n\nbeing ignored when a higher-priority managed-settings source lacked a`sandbox`\n\nblock- Fixed pasting an image larger than 2000px breaking the session — images are now downscaled on paste, and oversized images in history are automatically removed and the request retried\n- Fixed showing the login screen for “OAuth not allowed for organization” errors — now shows guidance to contact your admin\n- Fixed OAuth login failing with timeout on slow or proxied connections, in IPv6-only devcontainers, and when the browser callback can’t reach localhost\n- Fixed a rare race where a concurrent credential write could clear a valid OAuth refresh token\n- Fixed API retry countdown sticking at “0s” instead of counting down between attempts\n- Fixed “Stream idle timeout” error after waking Mac from sleep mid-request\n- Fixed background and remote sessions falsely aborting with “Stream idle timeout” during long model thinking pauses\n- Fixed a hang where the assistant could finish thinking but show no output after a run of empty turns\n- Fixed overly fast trackpad scrolling in Cursor and VS Code 1.92–1.104 integrated terminals\n- Fixed claude.ai MCP connectors being suppressed by manual servers stuck in needs-auth state\n- Fixed Japanese/Korean/Chinese text rendering as garbled characters on Windows in no-flicker mode\n- Fixed\n`Ctrl+L`\n\nclearing the prompt input — it now only forces a screen redraw, matching readline behavior - Fixed deferred tools (WebSearch, WebFetch, etc.) not being available to skills with\n`context: fork`\n\nand other subagents on their first turn - Fixed plan-mode tools being unavailable in interactive sessions launched with\n`--channels`\n\n- Fixed\n`/plugin`\n\nUninstall reporting “Enabled” instead of “Uninstalled” - Bounded total size of file-modified reminders when a linter touches many files at once\n- Fixed\n`/remote-control`\n\nretries appearing stuck on “connecting…” — each retry now shows its result - Fixed Remote Control failure notification not showing the error reason for initial connection failures\n- Windows: clipboard writes no longer expose copied content in process command-line arguments visible to EDR/SIEM telemetry; also fixes >22KB selections not reaching the clipboard\n- PowerShell tool: bare\n`--`\n\n(e.g.`git diff -- file`\n\n) is no longer mis-flagged as the`--%`\n\nstop-parsing token - Fixed Agent SDK hang when the model emits a malformed tool name in a parallel tool call batch\n\n- Fixed OAuth authentication failing with a 401 retry loop when\n`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`\n\nis set\n\n- Added\n`ANTHROPIC_BEDROCK_SERVICE_TIER`\n\nenvironment variable to select a Bedrock service tier (`default`\n\n,`flex`\n\n, or`priority`\n\n), sent as the`X-Amzn-Bedrock-Service-Tier`\n\nheader - Pasting a PR URL into the\n`/resume`\n\nsearch box now finds the session that created that PR (GitHub, GitHub Enterprise, GitLab, and Bitbucket) `/mcp`\n\nnow shows claude.ai connectors hidden by a manually-added server with the same URL, with a hint to remove the duplicate- Clarified the\n`/mcp`\n\nmessage shown when an MCP server is still unauthorized after the browser sign-in flow - OpenTelemetry: numeric attributes on\n`api_request`\n\n/`api_error`\n\nlog events are now emitted as numbers, not strings - OpenTelemetry: added\n`claude_code.at_mention`\n\nlog event for`@`\n\n-mention resolution - Fixed\n`/branch`\n\nproducing forks that fail with “tool_use ids were found without tool_result blocks” when the source session contained entries from rewound timelines - Fixed\n`/model`\n\nnot showing the Effort option for Bedrock application inference profile ARNs, and those ARNs not receiving`output_config.effort`\n\n- Fixed Vertex AI / Bedrock returning\n`invalid_request_error: output_config: Extra inputs are not permitted`\n\non session-title generation and other structured-output queries - Fixed Vertex AI\n`count_tokens`\n\nendpoint returning 400 errors for users behind proxy gateways - Fixed\n`spinnerTipsOverride.excludeDefault`\n\nnot suppressing the time-based spinner tips - Fixed ToolSearch missing MCP tools that connected after session start in nonblocking mode\n- Fixed\n`!exit`\n\n/`!quit`\n\nin bash mode terminating the CLI instead of running as a shell command - Fixed images sent to newer models being resized to 2576px per side instead of the correct 2000px maximum\n- Fixed remote control session idle status redrawing twice per second, which could flood\n`tmux -CC`\n\ncontrol pipes and pause the terminal - Fixed assistant messages appearing blank in some sessions due to a stale view preference\n- Fixed a malformed hooks entry in\n`settings.json`\n\nno longer invalidating the entire file - Voice mode: keybindings bound to Caps Lock now show an error since terminals don’t deliver Caps Lock as a key event\n\n- Added\n`alwaysLoad`\n\noption to MCP server config — when`true`\n\n, all tools from that server skip tool-search deferral and are always available - Added\n`claude plugin prune`\n\nto remove orphaned auto-installed plugin dependencies;`plugin uninstall --prune`\n\ncascades - Added a type-to-filter search box to\n`/skills`\n\nso you can find a skill in long lists without scrolling - PostToolUse hooks can now replace tool output for all tools via\n`hookSpecificOutput.updatedToolOutput`\n\n(previously MCP-only) - Fullscreen mode: typing into the prompt no longer jumps scroll back to the bottom after you’ve scrolled up to read earlier output\n- Dialogs that overflow the terminal are now scrollable with arrow keys, PgUp/PgDn, home/end, and mouse wheel in both fullscreen and non-fullscreen modes\n- Clicking any line of a long URL that wraps across rows in fullscreen mode now opens the full URL\n- SDK and\n`claude -p`\n\n:`CLAUDE_CODE_FORK_SUBAGENT=1`\n\nnow works in non-interactive sessions `--dangerously-skip-permissions`\n\nno longer prompts for writes to`.claude/skills/`\n\n,`.claude/agents/`\n\n, and`.claude/commands/`\n\n`/terminal-setup`\n\nnow enables iTerm2’s “Applications in terminal may access clipboard” setting so`/copy`\n\nworks, including from tmux- MCP servers that hit a transient error during startup now auto-retry up to 3 times instead of staying disconnected\n- The terminal tab session title is now generated in your configured\n`language`\n\nsetting - Claude.ai connectors with the same upstream URL are now deduplicated instead of appearing as duplicates\n- Vertex AI: support X.509 certificate-based Workload Identity Federation (mTLS ADC)\n- Faster startup after upgrading: removed the Recent Activity panel from the release-notes splash\n- LSP diagnostic summaries now expand on click/ctrl+o and show the expand hint\n- SDK:\n`mcp_authenticate`\n\nnow supports`redirectUri`\n\nfor custom scheme completion and claude.ai connectors - OpenTelemetry: added\n`stop_reason`\n\n,`gen_ai.response.finish_reasons`\n\n, and`user_system_prompt`\n\n(gated behind`OTEL_LOG_USER_PROMPTS`\n\n) to LLM request spans - [VSCode] Voice dictation now respects the\n`accessibility.voice.speechLanguage`\n\nsetting when no Claude Code language is configured - [VSCode]\n`/context`\n\nnow opens a native token usage dialog - Fixed unbounded memory growth (multi-GB RSS) when processing many images in a session\n- Fixed\n`/usage`\n\nleaking up to ~2GB of memory on machines with large transcript histories - Fixed memory leak when long-running tools fail to emit a clear progress event\n- Fixed Bash tool becoming permanently unusable when the directory Claude was started in is deleted or moved mid-session\n- Fixed\n`--resume`\n\ncrashing on startup in external builds - Fixed\n`--resume`\n\nfailing on large sessions when a transcript line was corrupted by an unclean shutdown — the corrupt line is now skipped - Fixed\n`thinking.type.enabled is not supported`\n\nerror when using Bedrock application inference profile ARNs - Fixed Microsoft 365 MCP OAuth failing with duplicate or unsupported\n`prompt`\n\nparameter - Fixed scrollback duplication when pressing Ctrl+L or triggering a redraw in non-fullscreen mode on tmux, GNOME Terminal, Windows Terminal, and Konsole\n- Fixed claude.ai MCP connectors silently disappearing when the connector-list fetch hits a transient auth error at startup\n- Fixed “Always allow” rules for built-in tools in remote sessions not surviving worker restarts\n- Fixed\n`NO_PROXY`\n\nnot being respected for all HTTP clients when set via`managed-settings.json`\n\nunder the native build - Fixed managed settings approval prompt exiting the session even when accepted — now applies settings and continues\n- Fixed\n`/usage`\n\nreturning “rate limited” after a stale OAuth token — now refreshes automatically - Fixed invalid legacy enum values in\n`settings.json`\n\ninvalidating the entire settings file - Fixed\n`/usage`\n\ndialog content being clipped when no-flicker mode is off - Fixed\n`/focus`\n\nshowing “Unknown command” when the fullscreen renderer is off — now explains how to enable it - Fixed embedded grep/find/rg shell wrappers failing when the running binary is deleted mid-session — now falls back to installed tools\n- Reduced peak file descriptor usage during\n`find`\n\nin the Bash tool on large directory trees\n\n- Windows: Git for Windows (Git Bash) is no longer required — when absent, Claude Code uses PowerShell as the shell tool\n- Added\n`claude ultrareview [target]`\n\nsubcommand to run`/ultrareview`\n\nnon-interactively from CI or scripts — prints findings to stdout (`--json`\n\nfor raw output) and exits 0 on completion or 1 on failure - Skills can now reference the current effort level with\n`${CLAUDE_EFFORT}`\n\nin their content - Set\n`AI_AGENT`\n\nenvironment variable for subprocesses so`gh`\n\ncan attribute traffic to Claude Code - Spinner tips that recommend installing the desktop app or creating skills/agents are now hidden when you already have them\n- Show a “use PgUp/PgDn to scroll” hint when the terminal sends arrow keys instead of scroll events\n- Faster session start when you have many claude.ai connectors configured but not authorized\n- The auto mode denial message now links to the configuration docs\n`claude plugin validate`\n\nnow accepts`$schema`\n\n,`version`\n\n, and`description`\n\nat the top level of`marketplace.json`\n\nand`$schema`\n\nin`plugin.json`\n\n- Auto-compact in auto mode now displays\n`auto`\n\n(lowercase, no token count) instead of a misleading token value - Fixed pressing Esc during a stdio MCP tool call closing the entire server connection (regression in 2.1.105)\n- Fixed\n`/rewind`\n\nand other interactive overlays not responding to keyboard input after launching with`claude --resume`\n\n- Fixed terminal scrollback duplication in non-fullscreen mode (resize, dialog dismiss, long sessions)\n- Fixed\n`DISABLE_TELEMETRY`\n\n/`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`\n\nnot suppressing usage metrics telemetry for API and enterprise users - Fixed false-positive “Dangerous rm operation” permission prompts in auto mode for multi-line bash commands containing both a pipe and a redirect\n- Fixed long selection menus clipping below the terminal in fullscreen mode — the focused option now stays on screen as you scroll\n- Fixed Write tool output collapsing instead of expanding when clicking “+N lines” in fullscreen\n- Fixed slash command picker jumping while typing, and improved highlight to only match contiguous substrings in blue\n- Fixed\n`/plugin`\n\nmarketplace failing to load when one entry uses an unrecognized source format — that entry is shown but installing it prompts you to update - [VSCode]\n`/usage`\n\nnow opens the native Account & Usage dialog instead of returning plain-text session cost - [VSCode] Voice dictation now respects the\n`language`\n\nsetting in`~/.claude/settings.json`\n\n- Fixed\n`find`\n\nin the Bash tool exhausting open file descriptors on large directory trees, causing host-wide crashes (macOS/Linux native builds)\n\n`/config`\n\nsettings (theme, editor mode, verbose, etc.) now persist to`~/.claude/settings.json`\n\nand participate in project/local/policy override precedence- Added\n`prUrlTemplate`\n\nsetting to point the footer PR badge at a custom code-review URL instead of github.com - Added\n`CLAUDE_CODE_HIDE_CWD`\n\nenvironment variable to hide the working directory in the startup logo `--from-pr`\n\nnow accepts GitLab merge-request, Bitbucket pull-request, and GitHub Enterprise PR URLs`--print`\n\nmode now honors the agent’s`tools:`\n\nand`disallowedTools:`\n\nfrontmatter, matching interactive-mode behavior`--agent <name>`\n\nnow honors the agent definition’s`permissionMode`\n\nfor built-in agents- PowerShell tool commands can now be auto-approved in permission mode, matching Bash behavior\n- Hooks:\n`PostToolUse`\n\nand`PostToolUseFailure`\n\nhook inputs now include`duration_ms`\n\n(tool execution time, excluding permission prompts and PreToolUse hooks) - Subagent and SDK MCP server reconfiguration now connects servers in parallel instead of serially\n- Plugins pinned by another plugin’s version constraint now auto-update to the highest satisfying git tag\n- Vim mode: Esc in INSERT no longer pulls a queued message back into the input; press Esc again to interrupt\n- Slash command suggestions now highlight the characters that matched your query\n- Slash command picker now wraps long descriptions onto a second line instead of truncating\n`owner/repo#N`\n\nshorthand links in output now use your git remote’s host instead of always pointing at github.com- Security:\n`blockedMarketplaces`\n\nnow correctly enforces`hostPattern`\n\nand`pathPattern`\n\nentries - OpenTelemetry:\n`tool_result`\n\nand`tool_decision`\n\nevents now include`tool_use_id`\n\n;`tool_result`\n\nalso includes`tool_input_size_bytes`\n\n- Status line: stdin JSON now includes\n`effort.level`\n\nand`thinking.enabled`\n\n- Fixed pasting CRLF content (Windows clipboards, Xcode console) inserting an extra blank line between every line\n- Fixed multi-line paste losing newlines in terminals using kitty keyboard protocol sequences inside bracketed paste\n- Fixed Glob and Grep tools disappearing on native macOS/Linux builds when the Bash tool is denied via permissions\n- Fixed scrolling up in fullscreen mode snapping back to the bottom every time a tool finishes\n- Fixed MCP HTTP connections failing with “Invalid OAuth error response” when servers returned non-JSON bodies for OAuth discovery requests\n- Fixed Rewind overlay showing “(no prompt)” for messages with image attachments\n- Fixed auto mode overriding plan mode with conflicting “Execute immediately” instructions\n- Fixed async\n`PostToolUse`\n\nhooks that emit no response payload writing empty entries to the session transcript - Fixed spinner staying on when a subagent task notification is orphaned in the queue\n- Tool search is now disabled by default on Vertex AI to avoid an unsupported beta header error (opt in with\n`ENABLE_TOOL_SEARCH`\n\n) - Fixed\n`@`\n\n-file Tab completion replacing the entire prompt when used inside a slash command with an absolute path - Fixed a stray\n`p`\n\ncharacter appearing at the prompt on startup in macOS Terminal.app via Docker or SSH - Fixed\n`${ENV_VAR}`\n\nplaceholders in`headers`\n\nfor HTTP/SSE/WebSocket MCP servers not being substituted before requests - Fixed MCP OAuth client secret stored via\n`--client-secret`\n\nnot being sent during token exchange for servers requiring`client_secret_post`\n\n- Fixed\n`/skills`\n\nEnter key closing the dialog instead of pre-filling`/<skill-name>`\n\nin the prompt - Fixed\n`/agents`\n\ndetail view mislabeling built-in tools unavailable to subagents as “Unrecognized” - Fixed MCP servers from plugins not spawning on Windows when the plugin cache was incomplete\n- Fixed\n`/export`\n\nshowing the current default model instead of the model the conversation actually used - Fixed verbose output setting not persisting after restart\n- Fixed\n`/usage`\n\nprogress bars overlapping with their “Resets …” labels - Fixed plugin MCP servers failing when\n`${user_config.*}`\n\nreferences an optional field left blank - Fixed list items containing a sentence-final number wrapping the number onto its own line\n- Fixed\n`/plan`\n\nand`/plan open`\n\nnot acting on the existing plan when entering plan mode - Fixed skills invoked before auto-compaction being re-executed against the next user message\n- Fixed\n`/reload-plugins`\n\nand`/doctor`\n\nreporting load errors for disabled plugins - Fixed Agent tool with\n`isolation: \"worktree\"`\n\nreusing stale worktrees from prior sessions - Fixed disabled MCP servers appearing as “failed” in\n`/status`\n\n- Fixed\n`TaskList`\n\nreturning tasks in arbitrary filesystem order instead of sorted by ID - Fixed spurious “GitHub API rate limit exceeded” hints when\n`gh`\n\noutput contained PR titles mentioning “rate limit” - Fixed SDK/bridge\n`read_file`\n\nnot correctly enforcing size cap on growing files - Fixed PR not linked to session when working in a git worktree\n- Fixed\n`/doctor`\n\nwarning about MCP server entries overridden by a higher-precedence scope - Windows: removed false-positive “Windows requires ‘cmd /c’ wrapper” MCP config warning\n- [VSCode] Fixed voice dictation’s first recording producing nothing on macOS while the microphone permission prompt is showing\n\n- Added vim visual mode (\n`v`\n\n) and visual-line mode (`V`\n\n) with selection, operators, and visual feedback - Merged\n`/cost`\n\nand`/stats`\n\ninto`/usage`\n\n— both remain as typing shortcuts that open the relevant tab - Create and switch between named custom themes from\n`/theme`\n\n, or hand-edit JSON files in`~/.claude/themes/`\n\n; plugins can also ship themes via a`themes/`\n\ndirectory - Hooks can now invoke MCP tools directly via\n`type: \"mcp_tool\"`\n\n- Added\n`DISABLE_UPDATES`\n\nenv var to completely block all update paths including manual`claude update`\n\n— stricter than`DISABLE_AUTOUPDATER`\n\n- WSL on Windows can now inherit Windows-side managed settings via the\n`wslInheritsWindowsSettings`\n\npolicy key - Auto mode: include\n`\"$defaults\"`\n\nin`autoMode.allow`\n\n,`autoMode.soft_deny`\n\n, or`autoMode.environment`\n\nto add custom rules alongside the built-in list instead of replacing it - Added a “Don’t ask again” option to the auto mode opt-in prompt\n- Added\n`claude plugin tag`\n\nto create release git tags for plugins with version validation `--continue`\n\n/`--resume`\n\nnow find sessions that added the current directory via`/add-dir`\n\n`/color`\n\nnow syncs the session accent color to claude.ai/code when Remote Control is connected- The\n`/model`\n\npicker now honors`ANTHROPIC_DEFAULT_*_MODEL_NAME`\n\n/`_DESCRIPTION`\n\noverrides when using a custom`ANTHROPIC_BASE_URL`\n\ngateway - When auto-update skips a plugin due to another plugin’s version constraint, the skip now appears in\n`/doctor`\n\nand the`/plugin`\n\nErrors tab - Fixed\n`/mcp`\n\nmenu hiding OAuth Authenticate/Re-authenticate actions for servers configured with`headersHelper`\n\n, and HTTP/SSE MCP servers with custom headers being stuck in “needs authentication” after a transient 401 - Fixed MCP servers whose OAuth token response omits\n`expires_in`\n\nrequiring re-authentication every hour - Fixed MCP step-up authorization silently refreshing instead of prompting for re-consent when the server’s\n`insufficient_scope`\n\n403 names a scope the current token already has - Fixed an unhandled promise rejection when an MCP server’s OAuth flow times out or is cancelled\n- Fixed MCP OAuth refresh proceeding without its cross-process lock under contention\n- Fixed macOS keychain race where a concurrent MCP token refresh could overwrite a freshly-refreshed OAuth token, causing unexpected “Please run /login” prompts\n- Fixed OAuth token refresh failing when the server revokes a token before its local expiry time\n- Fixed credential save crash on Linux/Windows corrupting\n`~/.claude/.credentials.json`\n\n- Fixed\n`/login`\n\nhaving no effect in a session launched with`CLAUDE_CODE_OAUTH_TOKEN`\n\n— the env token is now cleared so disk credentials take effect - Fixed unreadable text in the “new messages” scroll pill and\n`/plugin`\n\nbadges - Fixed plan acceptance dialog offering “auto mode” instead of “bypass permissions” when running with\n`--dangerously-skip-permissions`\n\n- Fixed agent-type hooks failing with “Messages are required for agent hooks” when configured for events other than\n`Stop`\n\nor`SubagentStop`\n\n- Fixed\n`prompt`\n\nhooks re-firing on tool calls made by an agent-hook verifier subagent - Fixed\n`/fork`\n\nwriting the full parent conversation to disk per fork — now writes a pointer and hydrates on read - Fixed Alt+K / Alt+X / Alt+^ / Alt+_ freezing keyboard input\n- Fixed connecting to a remote session overwriting your local\n`model`\n\nsetting in`~/.claude/settings.json`\n\n- Fixed typeahead showing “No commands match” error when pasting file paths that start with\n`/`\n\n- Fixed\n`plugin install`\n\non an already-installed plugin not re-resolving a dependency installed at the wrong version - Fixed unhandled errors from file watcher on invalid paths or fd exhaustion\n- Fixed Remote Control sessions getting archived on transient CCR initialization blips during JWT refresh\n- Fixed subagents resumed via\n`SendMessage`\n\nnot restoring the explicit`cwd`\n\nthey were spawned with\n\n- Forked subagents can now be enabled on external builds by setting\n`CLAUDE_CODE_FORK_SUBAGENT=1`\n\n- Agent frontmatter\n`mcpServers`\n\nare now loaded for main-thread agent sessions via`--agent`\n\n- Improved\n`/model`\n\n: selections now persist across restarts even when the project pins a different model, and the startup header shows when the active model comes from a project or managed-settings pin - The\n`/resume`\n\ncommand now offers to summarize stale, large sessions before re-reading them, matching the existing`--resume`\n\nbehavior - Faster startup when both local and claude.ai MCP servers are configured (concurrent connect now default)\n`plugin install`\n\non an already-installed plugin now installs any missing dependencies instead of stopping at “already installed”- Plugin dependency errors now say “not installed” with an install hint, and\n`claude plugin marketplace add`\n\nnow auto-resolves missing dependencies from configured marketplaces - Managed-settings\n`blockedMarketplaces`\n\nand`strictKnownMarketplaces`\n\nare now enforced on plugin install, update, refresh, and autoupdate - Advisor Tool (experimental): dialog now carries an “experimental” label, learn-more link, and startup notification when enabled; sessions no longer get stuck with “Advisor tool result content could not be processed” errors on every prompt and\n`/compact`\n\n- The\n`cleanupPeriodDays`\n\nretention sweep now also covers`~/.claude/tasks/`\n\n,`~/.claude/shell-snapshots/`\n\n, and`~/.claude/backups/`\n\n- OpenTelemetry:\n`user_prompt`\n\nevents now include`command_name`\n\nand`command_source`\n\nfor slash commands;`cost.usage`\n\n,`token.usage`\n\n,`api_request`\n\n, and`api_error`\n\nnow include an`effort`\n\nattribute when the model supports effort levels. Custom/MCP command names are redacted unless`OTEL_LOG_TOOL_DETAILS=1`\n\nis set - Native builds on macOS and Linux: the\n`Glob`\n\nand`Grep`\n\ntools are replaced by embedded`bfs`\n\nand`ugrep`\n\navailable through the Bash tool — faster searches without a separate tool round-trip (Windows and npm-installed builds unchanged) - Windows: cached\n`where.exe`\n\nexecutable lookups per process for faster subprocess launches - Default effort for Pro/Max subscribers on Opus 4.6 and Sonnet 4.6 is now\n`high`\n\n(was`medium`\n\n) - Fixed Plain-CLI OAuth sessions dying with “Please run /login” when the access token expires mid-session — the token is now refreshed reactively on 401\n- Fixed\n`WebFetch`\n\nhanging on very large HTML pages by truncating input before HTML-to-markdown conversion - Fixed a crash when a proxy returns HTTP 204 No Content — now surfaces a clear error instead of a\n`TypeError`\n\n- Fixed\n`/login`\n\nhaving no effect when launched with`CLAUDE_CODE_OAUTH_TOKEN`\n\nenv var and that token expires - Fixed prompt-input undo (\n`Ctrl+_`\n\n) doing nothing immediately after typing, and skipping a state on each undo step - Fixed\n`NO_PROXY`\n\nnot being respected for remote API requests when running under Bun - Fixed rare spurious escape/return triggers when key names arrive as coalesced text over slow connections\n- Fixed SDK\n`reload_plugins`\n\nreconnecting all user MCP servers serially - Fixed Bedrock application-inference-profile requests failing with 400 when backed by Opus 4.7 with thinking disabled\n- Fixed MCP\n`elicitation/create`\n\nrequests auto-cancelling in print/SDK mode when the server finishes connecting mid-turn - Fixed subagents running a different model than the main agent incorrectly flagging file reads with a malware warning\n- Fixed idle re-render loop when background tasks are present, reducing memory growth on Linux\n- [VSCode] Fixed “Manage Plugins” panel breaking when multiple large marketplaces are configured\n- Fixed Opus 4.7 sessions showing inflated\n`/context`\n\npercentages and autocompacting too early — Claude Code was computing against a 200K context window instead of Opus 4.7’s native 1M\n\n`/resume`\n\non large sessions is significantly faster (up to 67% on 40MB+ sessions) and handles sessions with many dead-fork entries more efficiently- Faster MCP startup when multiple stdio servers are configured;\n`resources/templates/list`\n\nis now deferred to first`@`\n\n-mention - Smoother fullscreen scrolling in VS Code, Cursor, and Windsurf terminals —\n`/terminal-setup`\n\nnow configures the editor’s scroll sensitivity - Thinking spinner now shows progress inline (“still thinking”, “thinking more”, “almost done thinking”), replacing the separate hint row\n`/config`\n\nsearch now matches option values (e.g. searching “vim” finds the Editor mode setting)`/doctor`\n\ncan now be opened while Claude is responding, without waiting for the current turn to finish`/reload-plugins`\n\nand background plugin auto-update now auto-install missing plugin dependencies from marketplaces you’ve already added- Bash tool now surfaces a hint when\n`gh`\n\ncommands hit GitHub’s API rate limit, so agents can back off instead of retrying - The Usage tab in Settings now shows your 5-hour and weekly usage immediately and no longer fails when the usage endpoint is rate-limited\n- Agent frontmatter\n`hooks:`\n\nnow fire when running as a main-thread agent via`--agent`\n\n- Slash command menu now shows “No commands match” when your filter has zero results, instead of disappearing\n- Security: sandbox auto-allow no longer bypasses the dangerous-path safety check for\n`rm`\n\n/`rmdir`\n\ntargeting`/`\n\n,`$HOME`\n\n, or other critical system directories - Claude Code and installer now use\n`https://downloads.claude.ai/claude-code-releases`\n\ninstead of`https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases`\n\n- Fixed Devanagari and other Indic scripts rendering with broken column alignment in the terminal UI\n- Fixed Ctrl+- not triggering undo in terminals using the Kitty keyboard protocol (iTerm2, Ghostty, kitty, WezTerm, Windows Terminal)\n- Fixed Cmd+Left/Right not jumping to line start/end in terminals that use the Kitty keyboard protocol (Warp fullscreen, kitty, Ghostty, WezTerm)\n- Fixed Ctrl+Z hanging the terminal when Claude Code is launched via a wrapper process (e.g.\n`npx`\n\n,`bun run`\n\n) - Fixed scrollback duplication in inline mode where resizing the terminal or large output bursts would repeat earlier conversation history\n- Fixed modal search dialogs overflowing the screen at short terminal heights, hiding the search box and keyboard hints\n- Fixed scattered blank cells and disappearing composer chrome in the VS Code integrated terminal during scrolling\n- Fixed an intermittent API 400 error related to cache control TTL ordering that could occur when a parallel request completed during request setup\n- Fixed\n`/branch`\n\nrejecting conversations with transcripts larger than 50MB - Fixed\n`/resume`\n\nsilently showing an empty conversation on large session files instead of reporting the load error - Fixed\n`/plugin`\n\nInstalled tab showing the same item twice when it appears under Needs attention or Favorites - Fixed\n`/update`\n\nand`/tui`\n\nnot working after entering a worktree mid-session\n\n- Fixed a crash in the permission dialog when an agent teams teammate requested tool permission\n\n- Changed the CLI to spawn a native Claude Code binary (via a per-platform optional dependency) instead of bundled JavaScript\n- Added\n`sandbox.network.deniedDomains`\n\nsetting to block specific domains even when a broader`allowedDomains`\n\nwildcard would otherwise permit them - Fullscreen mode: Shift+↑/↓ now scrolls the viewport when extending a selection past the visible edge\n`Ctrl+A`\n\nand`Ctrl+E`\n\nnow move to the start/end of the current logical line in multiline input, matching readline behavior- Windows:\n`Ctrl+Backspace`\n\nnow deletes the previous word - Long URLs in responses and bash output stay clickable when they wrap across lines (in terminals with OSC 8 hyperlinks)\n- Improved\n`/loop`\n\n: pressing Esc now cancels pending wakeups, and wakeups display as “Claude resuming /loop wakeup” for clarity `/extra-usage`\n\nnow works from Remote Control (mobile/web) clients- Remote Control clients can now query\n`@`\n\n-file autocomplete suggestions - Improved\n`/ultrareview`\n\n: faster launch with parallelized checks, diffstat in the launch dialog, and animated launching state - Subagents that stall mid-stream now fail with a clear error after 10 minutes instead of hanging silently\n- Bash tool: multi-line commands whose first line is a comment now show the full command in the transcript, closing a UI-spoofing vector\n- Running\n`cd <current-directory> && git …`\n\nno longer triggers a permission prompt when the`cd`\n\nis a no-op - Security: on macOS,\n`/private/{etc,var,tmp,home}`\n\npaths are now treated as dangerous removal targets under`Bash(rm:*)`\n\nallow rules - Security: Bash deny rules now match commands wrapped in\n`env`\n\n/`sudo`\n\n/`watch`\n\n/`ionice`\n\n/`setsid`\n\nand similar exec wrappers - Security:\n`Bash(find:*)`\n\nallow rules no longer auto-approve`find -exec`\n\n/`-delete`\n\n- Fixed MCP concurrent-call timeout handling where a message for one tool call could silently disarm another call’s watchdog\n- Fixed Cmd-backspace /\n`Ctrl+U`\n\nto once again delete from the cursor to the start of the line - Fixed markdown tables breaking when a cell contains an inline code span with a pipe character\n- Fixed session recap auto-firing while composing unsent text in the prompt\n- Fixed\n`/copy`\n\n“Full response” not aligning markdown table columns for pasting into GitHub, Notion, or Slack - Fixed messages typed while viewing a running subagent being hidden from its transcript and misattributed to the parent AI\n- Fixed Bash\n`dangerouslyDisableSandbox`\n\nrunning commands outside the sandbox without a permission prompt - Fixed\n`/effort auto`\n\nconfirmation — now says “Effort level set to max” to match the status bar label - Fixed the “copied N chars” toast overcounting emoji and other multi-code-unit characters\n- Fixed\n`/insights`\n\ncrashing with`EBUSY`\n\non Windows - Fixed exit confirmation dialog mislabeling one-shot scheduled tasks as recurring — now shows a countdown\n- Fixed slash/@ completion menu not sitting flush against the prompt border in fullscreen mode\n- Fixed\n`CLAUDE_CODE_EXTRA_BODY`\n\n`output_config.effort`\n\ncausing 400 errors on subagent calls to models that don’t support effort and on Vertex AI - Fixed prompt cursor disappearing when\n`NO_COLOR`\n\nis set - Fixed\n`ToolSearch`\n\nranking so pasted MCP tool names surface the actual tool instead of description-matching siblings - Fixed compacting a resumed long-context session failing with “Extra usage is required for long context requests”\n- Fixed\n`plugin install`\n\nsucceeding when a dependency version conflicts with an already-installed plugin — now reports`range-conflict`\n\n- Fixed “Refine with Ultraplan” not showing the remote session URL in the transcript\n- Fixed SDK image content blocks that fail to process crashing the session — now degrade to a text placeholder\n- Fixed Remote Control sessions not streaming subagent transcripts\n- Fixed Remote Control sessions not being archived when Claude Code exits\n- Fixed\n`thinking.type.enabled is not supported`\n\n400 error when using Opus 4.7 via a Bedrock Application Inference Profile ARN\n\n- Fixed “claude-opus-4-7 is temporarily unavailable” for auto mode\n\n- Claude Opus 4.7 xhigh is now available! Use /effort to tune speed vs. intelligence\n- Auto mode is now available for Max subscribers when using Opus 4.7\n- Added\n`xhigh`\n\neffort level for Opus 4.7, sitting between`high`\n\nand`max`\n\n. Available via`/effort`\n\n,`--effort`\n\n, and the model picker; other models fall back to`high`\n\n`/effort`\n\nnow opens an interactive slider when called without arguments, with arrow-key navigation between levels and Enter to confirm- Added “Auto (match terminal)” theme option that matches your terminal’s dark/light mode — select it from\n`/theme`\n\n- Added\n`/less-permission-prompts`\n\nskill — scans transcripts for common read-only Bash and MCP tool calls and proposes a prioritized allowlist for`.claude/settings.json`\n\n- Added\n`/ultrareview`\n\nfor running comprehensive code review in the cloud using parallel multi-agent analysis and critique — invoke with no arguments to review your current branch, or`/ultrareview <PR#>`\n\nto fetch and review a specific GitHub PR - Auto mode no longer requires\n`--enable-auto-mode`\n\n- Windows: PowerShell tool is progressively rolling out. Opt in or out with\n`CLAUDE_CODE_USE_POWERSHELL_TOOL`\n\n. On Linux and macOS, enable with`CLAUDE_CODE_USE_POWERSHELL_TOOL=1`\n\n(requires`pwsh`\n\non PATH) - Read-only bash commands with glob patterns (e.g.\n`ls *.ts`\n\n) and commands starting with`cd <project-dir> &&`\n\nno longer trigger a permission prompt - Suggest the closest matching subcommand when\n`claude <word>`\n\nis invoked with a near-miss typo (e.g.`claude udpate`\n\n→ “Did you mean`claude update`\n\n?”) - Plan files are now named after your prompt (e.g.\n`fix-auth-race-snug-otter.md`\n\n) instead of purely random words - Improved\n`/setup-vertex`\n\nand`/setup-bedrock`\n\nto show the actual`settings.json`\n\npath when`CLAUDE_CONFIG_DIR`\n\nis set, seed model candidates from existing pins on re-run, and offer a “with 1M context” option for supported models `/skills`\n\nmenu now supports sorting by estimated token count — press`t`\n\nto toggle`Ctrl+U`\n\nnow clears the entire input buffer (previously: delete to start of line); press`Ctrl+Y`\n\nto restore`Ctrl+L`\n\nnow forces a full screen redraw in addition to clearing the prompt input- Transcript view footer now shows\n`[`\n\n(dump to scrollback) and`v`\n\n(open in editor) shortcuts - The “+N lines” marker for truncated long pastes is now a full-width rule for easier scanning\n- Headless\n`--output-format stream-json`\n\nnow includes`plugin_errors`\n\non the init event when plugins are demoted for unsatisfied dependencies - Added\n`OTEL_LOG_RAW_API_BODIES`\n\nenvironment variable to emit full API request and response bodies as OpenTelemetry log events for debugging - Suppressed spurious decompression, network, and transient error messages that could appear in the TUI during normal operation\n- Reverted the v2.1.110 cap on non-streaming fallback retries — it traded long waits for more outright failures during API overload\n- Fixed terminal display tearing (random characters, drifting input) in iTerm2 + tmux setups when terminal notifications are sent\n- Fixed\n`@`\n\nfile suggestions re-scanning the entire project on every turn in non-git working directories, and showing only config files in freshly-initialized git repos with no tracked files - Fixed LSP diagnostics from before an edit appearing after it, causing the model to re-read files it just edited\n- Fixed tab-completing\n`/resume`\n\nimmediately resuming an arbitrary titled session instead of showing the session picker - Fixed\n`/context`\n\ngrid rendering with extra blank lines between rows - Fixed\n`/clear`\n\ndropping the session name set by`/rename`\n\n, causing statusline output to lose`session_name`\n\n- Improved plugin error handling: dependency errors now distinguish conflicting, invalid, and overly complex version requirements; fixed stale resolved versions after\n`plugin update`\n\n;`plugin install`\n\nnow recovers from interrupted prior installs - Fixed Claude calling a non-existent\n`commit`\n\nskill and showing “Unknown skill: commit” for users without a custom`/commit`\n\ncommand - Fixed 429 rate-limit errors on Bedrock/Vertex/Foundry referencing status.claude.com (it only covers Anthropic-operated providers)\n- Fixed feedback surveys appearing back-to-back after dismissing one\n- Fixed bare URLs in bash/PowerShell/MCP tool output being unclickable when the terminal wraps them across lines\n- Windows:\n`CLAUDE_ENV_FILE`\n\nand SessionStart hook environment files now apply (previously a no-op) - Windows: permission rules with drive-letter paths are now correctly root-anchored, and paths differing only by drive-letter case are recognized as the same path\n\n- Added\n`/tui`\n\ncommand and`tui`\n\nsetting — run`/tui fullscreen`\n\nto switch to flicker-free rendering in the same conversation - Added push notification tool — Claude can send mobile push notifications when Remote Control and “Push when Claude decides” config are enabled\n- Changed\n`Ctrl+O`\n\nto toggle between normal and verbose transcript only; focus view is now toggled separately with the new`/focus`\n\ncommand - Added\n`autoScrollEnabled`\n\nconfig to disable conversation auto-scroll in fullscreen mode - Added option to show Claude’s last response as commented context in the\n`Ctrl+G`\n\nexternal editor (enable via`/config`\n\n) - Improved\n`/plugin`\n\nInstalled tab — items needing attention and favorites appear at the top, disabled items are hidden behind a fold, and`f`\n\nfavorites the selected item - Improved\n`/doctor`\n\nto warn when an MCP server is defined in multiple config scopes with different endpoints `--resume`\n\n/`--continue`\n\nnow resurrects unexpired scheduled tasks`/context`\n\n,`/exit`\n\n, and`/reload-plugins`\n\nnow work from Remote Control (mobile/web) clients- Write tool now informs the model when you edit the proposed content in the IDE diff before accepting\n- Bash tool now enforces the documented maximum timeout instead of accepting arbitrarily large values\n- SDK/headless sessions now read\n`TRACEPARENT`\n\n/`TRACESTATE`\n\nfrom the environment for distributed trace linking - Session recap is now enabled for users with telemetry disabled (Bedrock, Vertex, Foundry,\n`DISABLE_TELEMETRY`\n\n). Opt out via`/config`\n\nor`CLAUDE_CODE_ENABLE_AWAY_SUMMARY=0`\n\n. - Fixed MCP tool calls hanging indefinitely when the server connection drops mid-response on SSE/HTTP transports\n- Fixed non-streaming fallback retries causing multi-minute hangs when the API is unreachable\n- Fixed session recap, local slash-command output, and other system status lines not appearing in focus mode\n- Fixed high CPU usage in fullscreen when text is selected while a tool is running\n- Fixed plugin install not honoring dependencies declared in\n`plugin.json`\n\nwhen the marketplace entry omits them;`/plugin`\n\ninstall now lists auto-installed dependencies - Fixed skills with\n`disable-model-invocation: true`\n\nfailing when invoked via`/<skill>`\n\nmid-message - Fixed\n`--resume`\n\nsometimes showing the first prompt instead of the`/rename`\n\nname for sessions still running or exited uncleanly - Fixed queued messages briefly appearing twice during multi-tool-call turns\n- Fixed session cleanup not removing the full session directory including subagent transcripts\n- Fixed dropped keystrokes after the CLI relaunches (e.g.\n`/tui`\n\n, provider setup wizards) - Fixed garbled startup rendering in macOS Terminal.app and other terminals that don’t support synchronized output\n- Hardened “Open in editor” actions against command injection from untrusted filenames\n- Fixed\n`PermissionRequest`\n\nhooks returning`updatedInput`\n\nnot being re-checked against`permissions.deny`\n\nrules;`setMode:'bypassPermissions'`\n\nupdates now respect`disableBypassPermissionsMode`\n\n- Fixed\n`PreToolUse`\n\nhook`additionalContext`\n\nbeing dropped when the tool call fails - Fixed stdio MCP servers that print stray non-JSON lines to stdout being disconnected on the first stray line (regression in 2.1.105)\n- Fixed headless/SDK session auto-title firing an extra Haiku request when\n`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`\n\nor`CLAUDE_CODE_DISABLE_TERMINAL_TITLE`\n\nis set - Fixed potential excessive memory allocation when piped (non-TTY) Ink output contains a single very wide line\n- Fixed\n`/skills`\n\nmenu not scrolling when the list overflows the modal in fullscreen mode - Fixed Remote Control sessions showing a generic error instead of prompting for re-login when the session is too old\n- Fixed Remote Control session renames from claude.ai not persisting the title to the local CLI session\n\n- Improved the extended-thinking indicator with a rotating progress hint\n\n- Added\n`ENABLE_PROMPT_CACHING_1H`\n\nenv var to opt into 1-hour prompt cache TTL on API key, Bedrock, Vertex, and Foundry (`ENABLE_PROMPT_CACHING_1H_BEDROCK`\n\nis deprecated but still honored), and`FORCE_PROMPT_CACHING_5M`\n\nto force 5-minute TTL - Added recap feature to provide context when returning to a session, configurable in\n`/config`\n\nand manually invocable with`/recap`\n\n; force with`CLAUDE_CODE_ENABLE_AWAY_SUMMARY`\n\nif telemetry disabled. - The model can now discover and invoke built-in slash commands like\n`/init`\n\n,`/review`\n\n, and`/security-review`\n\nvia the Skill tool `/undo`\n\nis now an alias for`/rewind`\n\n- Improved\n`/model`\n\nto warn before switching models mid-conversation, since the next response re-reads the full history uncached - Improved\n`/resume`\n\npicker to default to sessions from the current directory; press`Ctrl+A`\n\nto show all projects - Improved error messages: server rate limits are now distinguished from plan usage limits; 5xx/529 errors show a link to status.claude.com; unknown slash commands suggest the closest match\n- Reduced memory footprint for file reads, edits, and syntax highlighting by loading language grammars on demand\n- Added “verbose” indicator when viewing the detailed transcript (\n`Ctrl+O`\n\n) - Added a warning at startup when prompt caching is disabled via\n`DISABLE_PROMPT_CACHING*`\n\nenvironment variables - Fixed paste not working in the\n`/login`\n\ncode prompt (regression in 2.1.105) - Fixed subscribers who set\n`DISABLE_TELEMETRY`\n\nfalling back to 5-minute prompt cache TTL instead of 1 hour - Fixed Agent tool prompting for permission in auto mode when the safety classifier’s transcript exceeded its context window\n- Fixed Bash tool producing no output when\n`CLAUDE_ENV_FILE`\n\n(e.g.`~/.zprofile`\n\n) ends with a`#`\n\ncomment line - Fixed\n`claude --resume <session-id>`\n\nlosing the session’s custom name and color set via`/rename`\n\n- Fixed session titles showing placeholder example text when the first message is a short greeting\n- Fixed terminal escape codes appearing as garbage text in the prompt input after\n`--teleport`\n\n- Fixed\n`/feedback`\n\nretry: pressing Enter to resubmit after a failure now works without first editing the description - Fixed\n`--teleport`\n\nand`--resume <id>`\n\nprecondition errors (e.g. dirty git tree, session not found) exiting silently instead of showing the error message - Fixed Remote Control session titles set in the web UI being overwritten by auto-generated titles after the third message\n- Fixed\n`--resume`\n\ntruncating sessions when the transcript contained a self-referencing message - Fixed transcript write failures (e.g., disk full) being silently dropped instead of being logged\n- Fixed diacritical marks (accents, umlauts, cedillas) being dropped from responses when the\n`language`\n\nsetting is configured - Fixed policy-managed plugins never auto-updating when running from a different project than where they were first installed\n\n- Show thinking hints sooner during long operations\n\n- Added\n`path`\n\nparameter to the`EnterWorktree`\n\ntool to switch into an existing worktree of the current repository - Added PreCompact hook support: hooks can now block compaction by exiting with code 2 or returning\n`{\"decision\":\"block\"}`\n\n- Added background monitor support for plugins via a top-level\n`monitors`\n\nmanifest key that auto-arms at session start or on skill invoke `/proactive`\n\nis now an alias for`/loop`\n\n- Improved stalled API stream handling: streams now abort after 5 minutes of no data and retry non-streaming instead of hanging indefinitely\n- Improved network error messages: connection errors now show a retry message immediately instead of a silent spinner\n- Improved file write display: long single-line writes (e.g. minified JSON) are now truncated in the UI instead of paginating across many screens\n- Improved\n`/doctor`\n\nlayout with status icons; press`f`\n\nto have Claude fix reported issues - Improved\n`/config`\n\nlabels and descriptions for clarity - Improved skill description handling: raised the listing cap from 250 to 1,536 characters and added a startup warning when descriptions are truncated\n- Improved\n`WebFetch`\n\nto strip`<style>`\n\nand`<script>`\n\ncontents from fetched pages so CSS-heavy pages no longer exhaust the content budget before reaching actual text - Improved stale agent worktree cleanup to remove worktrees whose PR was squash-merged instead of keeping them indefinitely\n- Improved MCP large-output truncation prompt to give format-specific recipes (e.g.\n`jq`\n\nfor JSON, computed Read chunk sizes for text) - Fixed images attached to queued messages (sent while Claude is working) being dropped\n- Fixed screen going blank when the prompt input wraps to a second line in long conversations\n- Fixed leading whitespace getting copied when selecting multi-line assistant responses in fullscreen mode\n- Fixed leading whitespace being trimmed from assistant messages, breaking ASCII art and indented diagrams\n- Fixed garbled bash output when commands print clickable file links (e.g. Python\n`rich`\n\n/`loguru`\n\nlogging) - Fixed alt+enter not inserting a newline in terminals using ESC-prefix alt encoding, and Ctrl+J not inserting a newline (regression in 2.1.100)\n- Fixed duplicate “Creating worktree” text in EnterWorktree/ExitWorktree tool display\n- Fixed queued user prompts disappearing from focus mode\n- Fixed one-shot scheduled tasks re-firing repeatedly when the file watcher missed the post-fire cleanup\n- Fixed inbound channel notifications being silently dropped after the first message for Team/Enterprise users\n- Fixed marketplace plugins with\n`package.json`\n\nand lockfile not having dependencies installed automatically after install/update - Fixed marketplace auto-update leaving the official marketplace in a broken state when a plugin process holds files open during the update\n- Fixed “Resume this session with…” hint not printing on exit after\n`/resume`\n\n,`--worktree`\n\n, or`/branch`\n\n- Fixed feedback survey shortcut keys firing when typed at the end of a longer prompt\n- Fixed stdio MCP server emitting malformed (non-JSON) output hanging the session instead of failing fast with “Connection closed”\n- Fixed MCP tools missing on the first turn of headless/remote-trigger sessions when MCP servers connect asynchronously\n- Fixed\n`/model`\n\npicker on AWS Bedroc\n\n---\n\n*[Changelog truncated to first 60K chars - most recent ~3-4 months. Full changelog at https://code.claude.com/docs/en/changelog]*",
      "content_chars": 60136,
      "fetch_status": "ok",
      "truncated": true,
      "original_chars": 278861
    },
    {
      "id": 6,
      "title": "The Complete Claude Code Guide (2026): Planning, Context Engineering, and High-Leverage Development",
      "url": "https://www.generative.inc/the-complete-claude-code-guide-2026-planning-context-engineering-and-high-leverage-development",
      "author": "Stan Sedberry",
      "publisher": "Generative.inc",
      "date": "2026-03-19",
      "official": false,
      "topics": [
        "planning",
        "context_engineering",
        "prompting",
        "scaling"
      ],
      "summary": "Guia comunitaria solida que sintetiza: setup, context structuring, plan mode workflows, cost optimization, scaling.",
      "content_markdown": "Most people approach AI coding tools like better autocomplete.\n\nThat's a mistake.\n\nClaude Code is not a faster editor. It's a system for orchestrating work through context, plans, and execution loops. If you use it like a chat box, you'll get mediocre results. If you treat it like an environment you actively shape, you get leverage that looks closer to managing a team of engineers than writing code yourself.\n\nThe numbers back this up. Anthropic's internal study of 132 engineers, 200,000+ session transcripts found that developers using Claude Code saw merged PRs per day increase 67%, and 27% of Claude-assisted work involved tasks that wouldn't have been attempted otherwise. Engineers weren't just coding faster. They were expanding what they were willing to take on.\n\nThis guide distills what actually matters when using Claude Code at a high level: how to set up your environment, structure context, plan work, execute reliably, manage costs, and scale beyond a single session.\n\nPart I: Foundations\n\n## What Claude Code Actually Is\n\nClaude Code is not \"AI that writes code.\"\n\nIt's a **context engine + execution agent**.\n\nIt builds a working understanding of your codebase. It operates inside a constrained context window. It executes tasks based on that context. And it improves through feedback loops of validation, rules, iteration.\n\nEverything that follows comes back to one principle:\n\n**The quality of output is a direct function of the quality of context.**\n\nIf you internalize nothing else from this guide, internalize that. Every technique here — CLAUDE.md files, plan mode, context management, subagents — exists to serve that single principle.\n\n## Getting Started the Right Way\n\n### System Requirements\n\nClaude Code runs on macOS 10.15+, Ubuntu 20.04+ / Debian 10+, or Windows 10+ (with WSL or Git for Windows). You need Node.js 18+, at least 4GB RAM, and an internet connection. Bash, Zsh, PowerShell, and CMD are all supported.\n\n### Installation\n\nFive ways to install, depending on your environment:\n\n**npm (standard — recommended for most users):**\n\n`npm install -g @anthropic-ai/claude-code`\n\n\nDo NOT use `sudo`\n\n. It causes permission and security issues.\n\n**Homebrew (macOS/Linux):**\n\n`brew install claude-code`\n\n\n**Native binary (macOS/Linux/WSL):**\n\n`curl -fsSL https://claude.ai/install.sh | bash`\n\n\nSupports version pinning: `bash -s 1.0.58`\n\n.\n\n**Windows PowerShell:**\n\n`irm https://claude.ai/install.ps1 | iex`\n\n\n**WinGet (Windows):**\n\n`winget install Anthropic.ClaudeCode`\n\n\nAfter installing, run `claude doctor`\n\nto verify everything works and `claude --version`\n\nto check your build.\n\nTwo update channels exist: `\"latest\"`\n\n(default, immediate features) and `\"stable\"`\n\n(one-week delay, skips releases with regressions). If you're doing production work, consider `\"stable\"`\n\n.\n\n### Authentication\n\nClaude Code requires a Pro ($20/mo), Max ($100-200/mo), Teams, Enterprise, or Console (API) account. The free Claude.ai tier doesn't include access.\n\nOn first run, `claude`\n\nopens your browser for login. You'll choose between:\n\n**Anthropic Console**— API-based, requires active billing. Best for teams that want usage-based pricing.**Claude App**— Pro/Max subscription. Best for individuals. The Max plan at $100/month is widely considered the best value for heavy users.**Enterprise backends**— AWS Bedrock (`CLAUDE_CODE_USE_BEDROCK=1`\n\n), Google Vertex AI (`CLAUDE_CODE_USE_VERTEX=1`\n\n), or Microsoft Foundry.\n\nUse `/login`\n\nto switch accounts later.\n\n### Your First Session\n\nAlways start from your project root:\n\n```\ncd your-project\nclaude\n```\n\n\nThis matters. Claude packages your project context from the directory where you launch it. Wrong directory = incomplete context.\n\nThen run:\n\n`/init`\n\n\nThis generates a `CLAUDE.md`\n\nfile by scanning your codebase — detecting frameworks, patterns, dependencies. Use the output as a starting point, then edit aggressively. The auto-generated version is a scaffold, not a finished product.",
      "content_chars": 3967,
      "fetch_status": "ok"
    },
    {
      "id": 7,
      "title": "50 Claude Code Tips and Best Practices For Daily Use",
      "url": "https://www.builder.io/blog/claude-code-tips-best-practices",
      "author": "Vishwas Gopinath",
      "publisher": "Builder.io",
      "date": "2026-03-20",
      "official": false,
      "topics": [
        "prompting",
        "planning",
        "tips_diarios",
        "productividad"
      ],
      "summary": "50 tacticas concretas y reproducibles para uso diario - la mayoria son micro-prompts y ajustes que se aplican en segundos.",
      "content_markdown": "You've been using [Claude Code](https://www.builder.io/blog/claude-code) long enough to know it works, and now you're hunting for every edge you can find. I put together 50 Claude Code best practices and tips that help whether you're one week in or several months deep, sourced from [Anthropic's official docs](https://code.claude.com/docs/en/best-practices), Boris Cherny (the person who built it), community experience, and a year of my own daily usage.\n\n## 1. Set up the cc alias\n\nThis is how I start every Claude Code session. Add this to your `~/.zshrc`\n\n(or `~/.bashrc`\n\n):\n\nRun `source ~/.zshrc`\n\nto load it. Now you type `cc`\n\ninstead of `claude`\n\n, and you skip every permission prompt. The flag name is intentionally scary. Only use it after you fully understand what Claude Code can and will do to your codebase. I covered this and more aliases in [customizing Claude Code](https://www.builder.io/blog/claude-code-settings).\n\n## 2. Prefix ! to run bash commands inline\n\nType `!git status`\n\nor `!npm test`\n\nand the command runs immediately. The command and its output land in context, so Claude can see the result and act on it. It's faster than asking Claude to run a command.\n\n## 3. Hit Esc to stop Claude. Hit Esc+Esc to rewind anything.\n\nEsc stops Claude mid-action without losing context. You can redirect immediately.\n\nEsc+Esc (or `/rewind`\n\n) opens a scrollable menu of every checkpoint Claude has created. You can restore the code, the conversation, or both. \"Undo that\" works too. Four restore options: code and conversation, conversation only, code only, or summarize from a checkpoint forward.\n\nThis means you can try the approach you're only 40% sure about. If it works, great. If not, rewind. Zero damage done. One caveat: checkpoints only track file edits. Changes from bash commands (migrations, database operations) aren't captured.\n\nTo pick up where you left off, `claude --continue`\n\nresumes your most recent conversation and `claude --resume`\n\nopens a session picker.\n\n## 4. Give Claude a way to check its own work\n\nGive Claude a feedback loop so it catches its own mistakes. Include test commands, linter checks, or expected outputs in your prompt.\n\nClaude runs the tests, sees failures, and fixes them without you stepping in. Boris Cherny [says this alone gives a 2-3x quality improvement](https://x.com/bcherny/status/2007179861115511237). For UI changes, set up the [Playwright MCP server](https://www.builder.io/blog/claude-code-playwright-mcp-server) so Claude can open a browser, interact with the page, and verify the UI works as expected. That feedback loop catches issues that unit tests miss.\n\n## 5. Install a code intelligence plugin for your language\n\nLSP plugins give Claude automatic diagnostics after every file edit. Type errors, unused imports, missing return types. Claude sees and fixes issues before you even notice them. This is the single highest-impact plugin you can install.\n\nPick yours and run the install command:\n\nPlugins for C#, Java, Kotlin, Swift, PHP, Lua, and C/C++ are also available. Run `/plugin`\n\nand go to the Discover tab to browse the full list. You'll need the corresponding language server binary installed on your system (the plugin will tell you if it's missing).\n\n## 6. Use the gh CLI and teach Claude any CLI tool\n\nThe `gh`\n\n[ CLI](https://cli.github.com/) handles PRs, issues, and comments without a separate MCP server. CLI tools are more context-efficient than MCP servers because they don't load tool schemas into your context window. Same applies to `jq`\n\n, `curl`\n\n, and other standard CLI tools.\n\nFor tools Claude doesn't know yet: \"Use 'sentry-cli --help' to learn about it, then use it to find the most recent error in production.\" Claude reads the help output, figures out the syntax, and runs the commands. Even niche internal CLIs work.\n\n## 7. Add \"ultrathink\" for complex reasoning\n\nIt's a keyword that sets effort to high and triggers adaptive reasoning on Opus 4.6. Claude dynamically allocates thinking based on the problem. Use it for architecture decisions, tricky debugging, multi-step reasoning, or anything where you want Claude to think before acting.\n\nYou can also set effort permanently with `/effort`\n\n. For less complex tasks, lower effort levels keep things fast and cheap. Match the effort to the problem. There's no point burning thinking tokens on a variable rename.\n\n## 8. Leverage skills for on-demand knowledge\n\nSkills are markdown files that extend Claude's knowledge on demand. Unlike [CLAUDE.md](http://claude.md/) which loads every session, skills load only when relevant to the current task. This keeps your context lean.\n\nCreate skills in `.claude/skills/`\n\nor install plugins that bundle pre-built skills (run `/plugin`\n\nto browse what's available). Use skills for specialized domain knowledge (API conventions, deployment procedures, coding patterns) that Claude needs sometimes but not always.\n\n## 9. Control Claude Code from your phone\n\nRun `claude remote-control`\n\nto start a session, then connect to it from [claude.ai/code](https://claude.ai/code) or the Claude app on iOS/Android. The session runs locally on your machine. The phone or browser is just a window into it. You can send messages, approve tool calls, and monitor progress from anywhere.\n\nIf you're using the `cc`\n\nalias from tip #1, Claude already has full permissions and won't need approval for each action. That makes remote control even smoother: kick off a task, walk away, and check in from your phone only when Claude finishes or hits something unexpected.\n\n## 10. Extend your context window to 1M tokens\n\nBoth Sonnet 4.6 and Opus 4.6 support 1M token context windows. On Max, Team, and Enterprise plans, Opus is automatically upgraded to 1M context. You can also switch models mid-session with `/model opus[1m]`\n\nor `/model sonnet[1m]`\n\n.\n\nIf you're concerned about quality at larger context sizes, start at 500k and work up gradually. Higher context means more room before compaction kicks in, but response quality can vary depending on the task. Use `CLAUDE_CODE_AUTO_COMPACT_WINDOW`\n\nto control when compaction triggers, and `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`\n\nto set the percentage threshold. Find the sweet spot for your workflow.\n\n## 11. Use Plan Mode when you're not sure how to approach something\n\nUse [Plan Mode](https://www.builder.io/blog/claude-code-plan-mode) for multi-file changes, unfamiliar code, and architectural decisions. The overhead is real (a few extra minutes upfront), but it prevents Claude from spending 20 minutes confidently solving the wrong problem entirely.\n\nSkip it for small, clear-scope tasks. If you can describe the diff in one sentence, just do it directly. You can switch into Plan Mode anytime with `Shift+Tab`\n\nto cycle between Normal, Auto-Accept, and Plan permission modes without leaving the conversation.\n\n## 12. Run /clear between unrelated tasks\n\nA clean session with a sharp prompt beats a messy three-hour session. Different task? `/clear`\n\nfirst.\n\nI know it feels like throwing away progress, but you'll get better results starting fresh. Sessions degrade because accumulated context from earlier work drowns out your current instructions. The five seconds it takes to `/clear`\n\nand write a focused starting prompt saves you from 30 minutes of diminishing returns.\n\n## 13. Stop interpreting bugs for Claude. Paste the raw data.\n\nDescribing a bug in words is slow. You watch Claude guess, correct it, and repeat.\n\nPaste the error log, CI output, or Slack thread directly and say \"fix.\" Claude reads logs from distributed systems and traces where things break. Your interpretation adds abstraction that often loses the detail Claude needs to pinpoint the root cause. Give Claude the raw data and get out of the way.\n\nThis works for CI too. \"Go fix the failing CI tests\" with a paste of the CI output is one of the most reliable patterns. You can also paste a PR URL or number and ask Claude to check the failing checks and fix them. With the `gh`\n\nCLI from tip #6 installed, Claude handles the rest.\n\nYou can also pipe output directly from the terminal:\n\n## 14. Use /btw for quick side questions\n\n`/btw`\n\npops up an overlay for a quick question without entering your conversation history. I use it for clarifications about the current session: \"Why did you choose this approach?\" or \"What's the tradeoff with the other option?\" The answer shows in a dismissible overlay, your main context stays lean, and Claude keeps working.\n\n## 15. Use --worktree for isolated parallel branches\n\n`claude --worktree feature-auth`\n\ncreates an isolated working copy with a new branch. Claude handles the git worktree setup and cleanup for you.\n\nThe Claude Code team calls this [one of the biggest productivity unlocks](https://x.com/bcherny/status/2017742743125299476). Spin up 3-5 worktrees, each running its own Claude session in parallel. I usually run 2-3. Each worktree gets its own session, its own branch, and its own file system state.\n\nThe ceiling on local worktrees is your machine. Multiple dev servers, builds, and Claude sessions all competing for CPU. [Builder.io](https://www.builder.io/) moves each agent to its own cloud container with a browser preview, so your machine stays free for the work that needs your brain.\n\n## 16. Stash your prompt with Ctrl+S\n\nYou're halfway through writing a long prompt and realize you need a quick answer first. `Ctrl+S`\n\nstashes your draft. Type your quick question, submit it, and your stashed prompt restores automatically.\n\n## 17. Background long-running tasks with Ctrl+B\n\nWhen Claude kicks off a long bash command (a test suite, a build, a migration), press `Ctrl+B`\n\nto send it to the background. Claude continues working while the process runs, and you can keep chatting. The result appears when the process finishes.\n\n## 18. Add a live status line\n\nThe status line is a shell script that runs after every Claude turn. It displays live information at the bottom of your terminal: current directory, git branch, context usage color-coded by how full the window is.\n\nThe fastest way to set one up is `/statusline`\n\ninside Claude Code. It'll ask what you want to display and generate the script for you. I covered the full setup with a copy-paste script in [customizing Claude Code](https://www.builder.io/blog/claude-code-settings).\n\n## 19. Use subagents to keep your main context clean\n\n\"Use subagents to figure out how the payment flow handles failed transactions.\" This spawns a separate Claude instance with its own context window. It reads all the files, reasons about the codebase, and reports back a concise summary.\n\nYour main session stays clean with plenty of room to build something. A deep investigation can consume half your context window before you write any code. Subagents keep that cost out of your main session. Built-in types include Explore (Haiku, fast file search) and Plan (read-only analysis). For the full picture, see our guide on [subagents and agent teams](https://www.builder.io/blog/claude-code-agents).\n\n## 20. Agent teams for multi-session coordination\n\nExperimental but powerful. Enable it first by adding `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS`\n\nto your settings or environment. Then tell Claude to create a team: \"Create an agent team with 3 teammates to refactor these modules in parallel.\" A team lead distributes work to teammates, each with their own context window and a shared task list. Teammates can message each other directly to coordinate.\n\nStart with 3-5 teammates and 5-6 tasks per teammate. Avoid assigning tasks that modify the same files. Two teammates editing the same file leads to overwrites. Start with research and review tasks (PR reviews, bug investigations) before attempting parallel implementation.\n\n## 21. Guide compaction with instructions\n\nWhen context compacts (automatically or via `/compact`\n\n), tell Claude what to preserve: \"/compact focus on the API changes and the list of modified files.\" You can also add standing instructions to your [CLAUDE.md](http://claude.md/): \"When compacting, preserve the full list of modified files and current test status.\"\n\n## 22. Use /loop for recurring checks\n\n`/loop 5m check if the deploy succeeded and report back`\n\nschedules a recurring prompt that fires in the background while your session stays open. The interval is optional (defaults to 10 minutes) and supports `s`\n\n, `m`\n\n, `h`\n\n, and `d`\n\nunits. You can also loop over other commands: `/loop 20m /review-pr 1234`\n\n. Tasks are session-scoped and expire after 3 days, so a forgotten loop won't run forever. Use `/loop`\n\nfor monitoring deploys, watching CI pipelines, or polling an external service while you focus on something else.\n\n## 23. Use voice dictation for richer prompts\n\nRun `/voice`\n\nto enable push-to-talk, then hold `Space`\n\nto dictate. Your speech transcribes live into the prompt, and you can mix voice and typing in the same message. Spoken prompts naturally include more context than typed ones because you explain the background, mention constraints, and describe what you want without cutting corners to save keystrokes. Requires a [Claude.ai](http://claude.ai/) account (not API key). You can rebind the push-to-talk key to a modifier combo like `meta+k`\n\nin `~/.claude/keybindings.json`\n\nto skip the hold-detection warmup.\n\n## 24. After 2 corrections on the same thing, start fresh\n\nWhen you and Claude are going down a rabbit hole of corrections and the issue still isn't fixed, the context is now full of failed approaches that are actively hurting the next attempt. `/clear`\n\nand write a better starting prompt that incorporates what you learned. A clean session with a sharper prompt almost always outperforms a long session weighed down by accumulated dead ends.\n\n## 25. Tell Claude exactly which files to look at\n\nUse `@`\n\nto reference files directly: `@src/auth/middleware.ts has the session handling.`\n\nThe `@`\n\nprefix resolves to the file path automatically, so Claude knows exactly where to look.\n\nClaude can grep and search your codebase on its own, but it still has to narrow down candidates and identify the right file. Every search step costs tokens and context. Pointing Claude at the right files from the start skips that entire process.\n\n## 26. Explore unfamiliar code with vague prompts\n\n\"What would you improve in this file?\" is a great exploration prompt. Not every prompt needs to be specific. When you want fresh eyes on existing code, a vague question gives Claude room to surface things you wouldn't have thought to ask about.\n\nI use this when onboarding onto an unfamiliar repo. Claude points out patterns, inconsistencies, and improvement opportunities that I'd miss on a first read.\n\n## 27. Edit plans with Ctrl+G\n\nWhen Claude presents a plan, `Ctrl+G`\n\nopens it in your text editor for direct editing. Add constraints, remove steps, redirect the approach before Claude writes a single line of code. Useful when the plan is mostly right but you want to tweak a few steps without re-explaining the whole thing.\n\n## 28. Run /init, then cut the result in half\n\n[CLAUDE.md](http://claude.md/) is a markdown file at the root of your project that gives Claude persistent instructions: build commands, coding standards, architectural decisions, repo conventions. Claude reads it at the start of every session. `/init`\n\ngenerates a starter version based on your project structure. It picks up build commands, test scripts, and directory layout.\n\nThe output tends to be bloated. If you can't explain why a line is there, delete it. Trim the noise and add what's missing. For more on structuring these files, see [how to write a great CLAUDE.md file](https://www.builder.io/blog/claude-md-guide).\n\n## 29. The litmus test for every CLAUDE.md line\n\nFor every line in your CLAUDE.md, ask: would Claude make a mistake without this? If Claude already does something correctly on its own, the instruction is noise. Every unnecessary line dilutes the ones that matter. There's roughly a 150-200 instruction budget before compliance drops off, and the system prompt already uses about 50 of those.\n\n## 30. After Claude makes a mistake, say \"Update your CLAUDE.md so this doesn't happen again\"\n\nWhen Claude makes a mistake, say \"update the CLAUDE.md file so this doesn't happen again.\" Claude writes its own rule. Next session, it follows it automatically.\n\nOver time your CLAUDE.md becomes a living document shaped by real mistakes. To keep it from growing indefinitely, use `@imports`\n\n(tip #32) to reference a separate file like `@docs/solutions.md`\n\nfor patterns and fixes. Your CLAUDE.md stays lean, and Claude reads the details on demand.\n\n## 31. Use .claude/rules/ for rules that only apply sometimes\n\nPlace markdown files in `.claude/rules/`\n\nto organize instructions by topic. By default, every rule file loads at the start of each session. To make a rule load only when Claude works on specific files, add `paths`\n\nfrontmatter:\n\nThis keeps your main [CLAUDE.md](http://claude.md/) lean. TypeScript rules load when Claude reads `.ts`\n\nfiles, Go rules when it reads `.go`\n\nfiles. Claude never wades through conventions for languages it isn't touching.\n\n## 32. Use @imports to keep CLAUDE.md lean\n\nReference docs with `@docs/git-instructions.md`\n\n. You can also reference `@README.md`\n\n, `@package.json`\n\n, or even `@~/.claude/my-project-instructions.md`\n\n.\n\nClaude reads the file when it needs it. Think of `@imports`\n\nas \"here's more context if you need it\" without bloating the file Claude reads every session.\n\n## 33. Allowlist safe commands with /permissions\n\nStop clicking \"approve\" on `npm run lint`\n\nfor the hundredth time. `/permissions`\n\nlets you allowlist trusted commands so you stay in flow. You'll still get prompted for anything not on the list.\n\n## 34. Use /sandbox when you want Claude to work freely\n\nRun `/sandbox`\n\nto enable OS-level isolation. Writes are restricted to your project directory, and network requests are limited to domains you approve. It uses Seatbelt on macOS and bubblewrap on Linux, so restrictions apply to every subprocess Claude spawns. In auto-allow mode, sandboxed commands run without permission prompts, which gives you near-full autonomy with guardrails.\n\nFor unsupervised work (overnight migrations, experimental refactors), run Claude in a Docker container. Containers give you full isolation, easy rollback, and the confidence to let Claude run for hours.\n\n## 35. Create custom subagents for recurring tasks\n\nDifferent from using subagents on the fly (#19), custom subagents are pre-configured agents saved in `.claude/agents/`\n\n. For example, a security-reviewer agent with Opus and read-only tools, or a quick-search agent with Haiku for speed.\n\nUse `/agents`\n\nto browse and create them. You can set `isolation: worktree`\n\nfor agents that need their own file system.\n\n## 36. Pick the right MCP servers for your stack\n\nThe MCP servers worth starting with: **Playwright** for browser testing and UI verification, **PostgreSQL/MySQL** for direct schema queries, **Slack** for reading bug reports and thread context, and **Figma** for design-to-code workflows.\n\nClaude Code supports dynamic tool loading, so servers only load their definitions when Claude needs them. For a comprehensive list of what's available, see our guide on [the best MCP servers in 2026](https://www.builder.io/blog/best-mcp-servers-2026).\n\n## 37. Set your output style\n\nRun `/config`\n\nand select your preferred style. The built-in options are Explanatory (detailed, step-by-step), Concise (brief, action-focused), and Technical (precise, jargon-friendly).\n\nYou can also create custom output styles as files in `~/.claude/output-styles/`\n\n.\n\n## 38. Use [CLAUDE.md](http://claude.md/) for suggestions, hooks for requirements\n\n## 39. Auto-format with a PostToolUse hook\n\nEvery time Claude edits a file, your formatter should run automatically. Add a PostToolUse hook in `.claude/settings.json`\n\nthat runs Prettier (or your formatter) on any file after Claude edits or writes it:\n\nThe `|| true`\n\nprevents hook failures from blocking Claude. You can chain other tools too — add `npx eslint --fix`\n\nas a second hook entry.\n\nIf you have an editor open to the same files, consider turning off format-on-save while Claude is working. Some developers have reported that editor saves can invalidate the prompt cache, forcing Claude to re-read files. Let the hook handle formatting instead.\n\n## 40. Block destructive commands with PreToolUse hooks\n\nBlock `rm -rf`\n\n, `drop table`\n\n, and `truncate`\n\npatterns with a PreToolUse hook on Bash. Claude won't even try. The hook fires before Claude executes the tool, so destructive commands get caught before they cause damage.\n\nAdd this to `.claude/settings.json`\n\nin your project. You can set it up interactively with `/hooks`\n\n, or just tell Claude: \"Add a PreToolUse hook that blocks rm -rf, drop table, and truncate commands.\"\n\n## 41. Preserve important context across compaction with hooks\n\nWhen context compacts during long sessions, Claude can lose track of what you're working on. A Notification hook with a `compact`\n\nmatcher automatically re-injects your key context every time compaction fires.\n\nTell Claude: \"Set up a Notification hook that after compaction reminds you of the current task, modified files, and any constraints.\" Claude will create the hook in your settings. Good candidates for re-injection: the current task description, the list of files you've modified, and any hard constraints (\"don't modify migration files\").\n\nThis is most valuable during multi-hour sessions where you're deep in a feature and can't afford Claude losing the thread.\n\n## 42. Always manually review auth, payments, and data mutations\n\nClaude is good at code. These decisions need a human. Auth flows, payment logic, data mutations, destructive database operations. Review these regardless of how good the rest looks. A wrong auth scope, a misconfigured payment webhook, or a migration that drops a column silently can cost you users, money, or trust. No amount of automated testing catches every one of these.\n\n## 43. Use /branch to try a different approach without losing your current one\n\n`/branch`\n\n(or `/fork`\n\n) creates a copy of your conversation at the current point. Try the risky refactor in the branch. If it works, keep it. If it doesn't, your original conversation is untouched. This is different from rewind (#3) because both paths stay alive.\n\n## 44. Let Claude interview you when you can't fully spec a feature\n\nYou know what you want to build, but you feel like you don't have all the details Claude needs to build it well. Let Claude ask the questions.\n\nOnce the spec is done, start a fresh session to execute with clean context and a complete spec.\n\n## 45. Have one Claude write, another Claude review\n\nFirst Claude implements the feature, second Claude [reviews from fresh context like a staff engineer](https://x.com/bcherny/status/2017742745365057733). The reviewer has no knowledge of the implementation shortcuts and will challenge every one of them.\n\nSame idea works for TDD. Session A writes tests, Session B writes the code to pass them.\n\n## 46. Review PRs conversationally\n\nDon't ask Claude for a one-shot PR review (although you can if you want). Open the PR in a session and have a conversation about it. \"Walk me through the riskiest change in this PR.\" \"What would break if this runs concurrently?\" \"Is the error handling consistent with the rest of the codebase?\"\n\nConversational reviews catch more issues because you can drill into the areas that matter. One-shot reviews tend to flag style nits and often miss the architectural problems.\n\n## 47. Name and color-code your sessions\n\n`/rename auth-refactor`\n\nputs a label on the prompt bar so you know which session is which. `/color red`\n\nor `/color blue`\n\nsets the prompt bar color. Available colors: red, blue, green, yellow, purple, orange, pink, cyan. When you're running 2-3 parallel sessions, naming and coloring them takes five seconds and saves you from typing into the wrong terminal.\n\n## 48. Play a sound when Claude finishes\n\nAdd a Stop hook that plays a system sound when Claude completes a response. Kick off a task, switch to something else, and hear a ping when it's done.\n\nOn Linux, replace with `paplay`\n\nor `aplay`\n\n. Other good macOS sounds: `Submarine.aiff`\n\n, `Purr.aiff`\n\n, `Pop.aiff`\n\n.\n\n## 49. Fan-out with claude -p for batch operations\n\nLoop through a list of files with non-interactive mode. `--allowedTools`\n\nscopes what Claude can do per file. Run them in parallel with `&`\n\nfor maximum throughput.\n\nThis is great for converting file formats, updating imports across a codebase, and running repetitive migrations where each file is independent of the others.\n\n## 50. Customize the spinner verbs (the fun one)\n\nWhile Claude thinks, the terminal shows a spinner with verbs like \"Flibbertigibbeting...\" and \"Flummoxing...\". You can replace them with whatever you want. Tell Claude:\n\nReplace my spinner verbs in user settings with these: Hallucinating responsibly, Pretending to think, Confidently guessing, Blaming the context window\n\n\nYou don't have to provide a list either. Just tell Claude what vibe you're going for: \"Replace my spinner verbs with Harry Potter spells.\" Claude generates the list. It's a small thing that makes the wait more enjoyable.\n\n## How to share Claude Code best practices across your team?\n\nMake them team defaults. Following these 50 tips yourself is the easy part. Getting the whole engineering team to follow them takes onboarding, a shared `CLAUDE.md`\n\n, and standardized hooks. The hardest part is getting everyone else on the team into the Claude Code workflow at all.\n\nA designer drops a spacing fix in Slack. A PM edits copy in a Google Doc. A QA lead files edge cases in Linear. All of that work funnels back to you because nobody else on the team runs Claude Code, and the best practices above don't travel with changes that never pass through it.\n\n[Builder 2.0](https://www.builder.io/blog/builder-2) opens the workflow to the whole team. A designer pushes layout changes directly to the branch through Builder's visual canvas, and the generated code runs through your `CLAUDE.md`\n\nrules and your custom subagents the same way your own sessions do. A PM prompts a copy change from Slack. Builder spins up a branch, your team's agents handle it, and the result lands as a PR. A QA agent runs browser tests on every branch and returns failures as videos. Every change anyone on the team makes ships as reviewable code that follows the guidelines you set.\n\nThe 50 tips above describe strong Claude Code habits for one developer. Builder 2.0 is what those habits look like when everyone on the team gets the same guardrails.\n\n[See how Builder 2.0 extends Claude Code to your whole team →](https://www.builder.io/blog/builder-2)\n\n## Wrapping up\n\nYou don't need all 50. Pick the one that solves the thing that annoyed you most in your last session, and try it tomorrow. One tip that sticks is worth more than fifty you bookmarked.",
      "content_chars": 27010,
      "fetch_status": "ok"
    },
    {
      "id": 8,
      "title": "How Claude Code Builds a System Prompt",
      "url": "https://www.dbreunig.com/2026/04/04/how-claude-code-builds-a-system-prompt.html",
      "author": "Drew Breunig",
      "publisher": "dbreunig.com",
      "date": "2026-04-04",
      "official": false,
      "topics": [
        "prompting",
        "internals",
        "system_prompt"
      ],
      "summary": "Analisis tecnico profundo de como Claude Code ensambla dinamicamente su system prompt - util para entender que tunear y que no.",
      "content_markdown": "# How Claude Code Builds a System Prompt\n\nI like reading [system prompts](https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools), either when they’re published as part of open-source software, exfiltrated via crafty prompting, [explicitly shared](https://platform.claude.com/docs/en/release-notes/system-prompts), or (in the case of last week) accidentally leaked. They’re often the best manual for how an app is intended to work.\n\nWe’ve touched on system prompts in the past, [introducing them and breaking down Claude’s](https://www.dbreunig.com/2025/05/07/claude-s-system-prompt-chatbots-are-more-than-just-models.html), [showing how system prompt changes over time reveal product priorities](https://www.dbreunig.com/2025/06/03/comparing-system-prompts-across-claude-versions.html), and [diving deep with an analysis of coding agent prompts and variations](https://www.dbreunig.com/2026/02/10/system-prompts-define-the-agent-as-much-as-the-model.html).\n\nBut one thing that’s been hard is understanding *how system prompts are assembled*. System prompts generally aren’t static strings; they’re dynamically assembled contexts with many conditional statements determining what makes it in the prompt. It’s true, we can look at open source harnesses or apps to understand approaches. But for the big company apps we can only get the big picture. We can extract a final prompt, but we can’t see how it was built.\n\nWith the [accidental leak of Claude Code’s source code last week](https://read.engineerscodex.com/p/diving-into-claude-codes-source-code), we can see for the first time how Claude Code assembles a context. It’s incredibly impressive, illustrating how complex context engineering can be and the importance of harnesses.\n\nI won’t share the code here, but after poring over it I’ve assembled a visualization below. It lists each component used to assemble the system prompt. Some components are always included (the rows with a solid blue dot) while others are conditional (the hollow blue dots). Components may have variations. For example, the “Using Your Tools” section only contains information regarding available tools.\n\nTake a look yourself. Click a row for more details.\n\nAnd this is just the system prompt! There’s similar logic to assemble for…\n\n**Tool definitions:**There’s ~50 tools to manage descriptions for (not including MCPs!) and many tools have several conditions for if and how they make it into the context.**User content:**CLAUDE.md or AGENT.md files, user provided instructions.**Conversation history:**All the messages you’ve previously sent, the reasoning and tool calls the agent has produced, and more. All managed by about a dozen different methods for compaction, offloading, and summarizing the conversation so far.**Attachments:**Additional items appended to user messages that specify specific behaviors (Are we still in plan mode? Are there tasks left on our list?) or user specified parameters like @-mentioned files, MCPs, agents, or skills.**Skills:**Finally, any relevant or user-specified skills are appended.\n\nWhen you type instructions and hit ‘Enter’, Claude Code assembles a rich context to increase the odds that it obtains a successful response from Opus or Sonnet. As we can see, [agents are more than just models](https://www.dbreunig.com/2026/02/10/system-prompts-define-the-agent-as-much-as-the-model.html). Context engineering is critical.",
      "content_chars": 3410,
      "fetch_status": "ok"
    },
    {
      "id": 9,
      "title": "Claude Code & Agent Memory: Best Practices for 2026",
      "url": "https://orchestrator.dev/blog/2026-04-06--claude-code-agent-memory-2026/",
      "author": "Orchestrator.dev",
      "publisher": "orchestrator.dev",
      "date": "2026-04-06",
      "official": false,
      "topics": [
        "claude_md",
        "memoria",
        "subagent_memory",
        "memory_tool",
        "novedades"
      ],
      "summary": "Cuatro capas de memoria, auto memory, Memory Tool para API agents, y subagent memory con frontmatter - cobertura comunitaria de la novedad de v2.1.33+.",
      "content_markdown": "# Claude Code & Agent Memory: Best Practices for 2026\n\n## Introduction\n\nEvery Claude Code session starts with a clean slate. No memory of the codebase you spent last week mapping. No record of the architecture decision you made on Tuesday. No recollection of the cryptic build flag that took three hours to debug. Just… nothing.\n\nIf you’ve used Claude Code seriously, you’ve felt this friction. You correct the same mistakes session after session — “we use `pnpm`\n\n, not `npm`\n\n”, “the tests live in `/test/integration/`\n\n, not `/tests/`\n\n”. Each correction costs tokens and focus. It turns an autonomous agent into a patient who keeps waking up with amnesia.\n\nThe good news: this problem is almost entirely solved — if you know how to solve it. Claude Code has a sophisticated, layered memory system that most developers use at perhaps 10% of its capability. This article covers the full architecture: what each layer does, how they interact, and the production patterns that separate teams shipping faster from teams debugging the same context failures week after week.\n\nBy the end, you’ll understand how to configure `CLAUDE.md`\n\nso it actually works, how auto memory and the Memory Tool complement each other, how to survive context compaction without losing critical state, and how subagents get their own persistent knowledge stores. All of this is current as of Claude Code v2.1.92 (April 2026).\n\nThis article assumes familiarity with Claude Code's basic setup and CLI usage. You should be comfortable running `claude`\n\nfrom the terminal and have a working Anthropic subscription (Pro, Max, or Team). Code examples target Claude Code v2.1.x and the Messages API with the `memory_20250818`\n\ntool for API-based agents. Subagent memory (`memory:`\n\nfrontmatter) requires v2.1.33 or later.\n\n## The Four-Layer Memory Architecture\n\nBefore getting into tactics, it helps to have a clear mental model of what Claude Code actually stores — and where. There are four distinct layers, each with different persistence characteristics, audience, and purpose.\n\n**Layer 1 — CLAUDE.md** is the explicit, human-authored layer. You write it. It loads at the start of every session. It’s the source of truth for things you always want Claude to know: build commands, coding conventions, architecture decisions, project-specific rules.\n\n**Layer 2 — Auto Memory ( MEMORY.md)** is the implicit, learned layer. Claude Code discovers project-specific patterns during your sessions and writes them back autonomously. The first 200 lines or 25KB of MEMORY.md, whichever comes first, load at the start of each session.\n\n**Layer 3 — The Memory Tool** is the API layer, designed for long-running programmatic agents. Rather than loading everything upfront, agents store what they learn and pull it back on demand — keeping the active context focused on what’s currently relevant.\n\n**Layer 4 — Subagent Memory** gives each named subagent a persistent knowledge store, scoped to either the user or the project. Introduced in Claude Code v2.1.33 (February 2026), this field gives each subagent its own persistent markdown-based knowledge store. Before this, every agent invocation started from scratch.\n\n## Layer 1: Engineering Your `CLAUDE.md`\n\n\n- Keep it under 300 lines — every line competes with actual work for context budget\n- The golden rule: would removing this line cause Claude to make a mistake? If not, cut it\n- Reference separate files for domain-specific docs; don't inline large content\n- Check CLAUDE.md into git so your team can contribute and refine it over time\n\n`CLAUDE.md`\n\nis loaded before every conversation, which sounds simple until you internalize what that means for the context window. A fresh session consumes roughly 20,000 tokens loading the system prompt, tool definitions, and CLAUDE.md before you type anything.\n\nThe most common mistake is treating `CLAUDE.md`\n\nlike a wiki dump. The `/init`\n\ncommand generates a starter file based on your project structure — the counterintuitive step is to delete most of what it generates. The default file includes obvious things: yes, Claude, this is a TypeScript project, that’s visible from the package.json. Every line in CLAUDE.md competes for attention with the actual work. Target: under 300 lines.\n\n### What Actually Belongs in CLAUDE.md\n\nThe right content falls into four categories: project identity, commands, style, and guardrails.\n\n```\n# My Project — CLAUDE.md\n## Project Context\nNext.js 14 e-commerce platform with Stripe, Postgres, and Redis.\nMonorepo: apps/web (Next), apps/api (Express), packages/shared.\n## Commands\n- Test: `pnpm test:integration` (NOT pytest or npm test)\n- Build: `make build-docker`\n- Lint: `npm run lint:fix`\n- Database migrations: `pnpm db:migrate`\n## Code Style\n- ES modules only, named exports preferred\n- 2-space indentation, TypeScript strict mode\n- Error handling: always use AppError class in packages/shared/errors\n## Guardrails\n- Never force push (--force-with-lease only)\n- Never commit to main; always use feature branches\n- Never edit auto-generated files in src/generated/\n## Domain References\n- Payments: read docs/payment-architecture.md before touching Stripe code\n- Auth: read docs/auth-flow.md before touching session handling\n```\n\n\nNotice the last section: rather than inlining 2,000 words of payment architecture, you point Claude to a separate file. For domain-specific guidance, reference a separate file instead of inlining it. Claude reads that file only when it enters that part of the codebase. Never embed large documentation files directly into CLAUDE.md.\n\n### The CLAUDE.md Hierarchy\n\nClaude Code respects a three-level configuration hierarchy:\n\n| File | Location | Scope | Commit to Git? |\n|---|---|---|---|\n`~/.claude/CLAUDE.md` | Home dir | All projects | Personal — no |\n`./CLAUDE.md` | Project root | This project | Yes |\n`./CLAUDE.local.md` | Project root | This machine only | No (gitignored) |\n\nYour `~/.claude/CLAUDE.md`\n\nis for personal preferences: commit message style, your preferred testing approach, things you always want regardless of project. Your `./CLAUDE.md`\n\nis for team-shared conventions, checked into version control. `CLAUDE.local.md`\n\nhandles machine-specific overrides.\n\nFor teams with many conventions, use the `.claude/rules/`\n\ndirectory with path-specific frontmatter. A file like `.claude/rules/payments.md`\n\nwith `globs: [\"**/payment/**\"]`\n\nonly loads when Claude enters payment-related files — keeping the default context clean and loading domain knowledge just-in-time.\n\n## Layer 2: Auto Memory — Let Claude Write Its Own Docs\n\nAuto memory is one of Claude Code’s most underused features. While you’re working, Claude observes patterns and writes them back to `MEMORY.md`\n\nwithout any manual intervention. The next session, those learnings are automatically loaded.\n\nClaude Code is reasonably selective about what it auto-saves. The target is durable, non-obvious knowledge — things that would waste time to rediscover, and that aren’t visible in the codebase itself. This includes environment-specific error patterns and fixes, specific command flags needed to make tools work correctly, undocumented dependencies, architectural notes about what certain modules do or should never do, and files to treat carefully.\n\nThe key distinction between `CLAUDE.md`\n\nand `MEMORY.md`\n\n:\n\n- Explicit requirements and team-agreed rules\n- Commands Claude must know from session one\n- Architecture guardrails and conventions\n- Best for: stable, deliberate knowledge\n\n- Patterns discovered during actual work\n- Implicit conventions from observed behavior\n- Bug patterns and workarounds found in practice\n- Best for: emergent, experiential knowledge\n\nThe best practice is to treat them as complementary: CLAUDE.md holds “your requirements,” while Auto Memory holds “what Claude has observed about how you actually work.”\n\n### Managing Auto Memory\n\nAuto memory requires some stewardship. Only the first 200 lines are auto-loaded, so review `MEMORY.md`\n\nperiodically, verify what Claude has learned, and remove outdated entries. A bloated `MEMORY.md`\n\nhas the same problem as a bloated `CLAUDE.md`\n\n.\n\nYou can guide what Claude writes to memory with explicit instructions:\n\n```\n\"Only write down information relevant to our testing infrastructure\nin your memory system.\"\n\"Before starting, review your memory. After finishing, update your\nmemory with any new patterns you discovered.\"\n```\n\n\nExplicit prompting at session boundaries — asking Claude to read memory before starting and update it before finishing — is particularly effective for long-running projects. This combines skills (static knowledge at startup) with memory (dynamic knowledge built over time).\n\n## Layer 3: The Memory Tool for API Agents\n\nFor programmatic agents built on the Messages API, the Memory Tool (`memory_20250818`\n\n) provides a structured file system for cross-session persistence. This is distinct from Claude Code’s auto memory — it’s designed for custom agents you build with the SDK.\n\n### Bootstrapping Long-Running Projects\n\nThe most important pattern for API agents running across many sessions is the **initializer + coding agent** pattern. The core challenge of long-running agents is that they must work in discrete sessions, with each new session beginning with no memory of what came before. Imagine a software project staffed by engineers working in shifts, where each new engineer arrives with no memory of what happened on the previous shift.\n\nClaude’s failures without this pattern manifested in two ways: the agent tended to try to do too much at once, often running out of context mid-implementation and leaving the next session to start with a feature half-implemented and undocumented. The second pattern was marking features complete without proper end-to-end testing.\n\n`claude-progress.txt`\n\nlog, a feature checklist defining scope, an `init.sh`\n\nscript, and an initial git commit. This is the baseline all future sessions recover from.`claude-progress.txt`\n\n, and git logs. This recovers full project state in seconds without re-exploring the codebase from scratch.`claude-progress.txt`\n\nwith what was completed, what remains, and any blocking issues. The next session picks up exactly where this one left off.Here is what the coding agent system prompt looks like in practice:\n\n```\nIMPORTANT: ALWAYS VIEW YOUR MEMORY DIRECTORY BEFORE DOING ANYTHING ELSE.\nMEMORY PROTOCOL:\n1. Use the view command on your memory directory to check for progress.\n2. Read claude-progress.txt and git logs to understand current state.\n3. Choose the highest-priority incomplete feature from the checklist.\n4. Work incrementally. Commit after each meaningful change.\n5. Before finishing, update claude-progress.txt with what you completed\nand what comes next.\nASSUME INTERRUPTION: Your context window may reset at any moment.\nAll progress not recorded in memory is at risk of being lost.\n```\n\n\nFor long-running agentic workflows, consider using both: compaction keeps the active context manageable without client-side bookkeeping, and memory persists important information across compaction boundaries so nothing critical is lost in the summary. Neither alone is sufficient for truly long-running work spanning multiple sessions.\n\n## Layer 4: Per-Agent Memory with Subagents\n\nThe v2.1.33 `memory:`\n\nfrontmatter gives each subagent a persistent knowledge store that accumulates across invocations. A code reviewer agent can now build genuine expertise about your codebase’s patterns over time.\n\n```\n---\nname: code-reviewer\ndescription: Reviews code for quality, security, and best practices\ntools: Read, Write, Edit, Bash\nmodel: sonnet\nmemory: user\n---\nYou are a code reviewer. As you review code, update your agent memory\nwith patterns, conventions, and recurring issues you discover.\nBefore starting any review:\n1. Read your memory directory for relevant patterns\n2. Apply accumulated knowledge to this review\n3. After finishing, update your memory with new insights\n```\n\n\nOn startup, the first 200 lines of the agent’s MEMORY.md are injected into its system prompt. Read, Write, and Edit tools are auto-enabled so the agent can manage its memory during execution.\n\nThe `memory:`\n\nfield accepts three scopes:\n\n| Scope | Directory | Best For |\n|---|---|---|\n`user` | `~/.claude/agent-memory/<name>/` | Personal agents across all projects |\n`project` | `.claude/agent-memory/<name>/` | Team agents specific to this codebase |\n`local` | `.claude/agent-memory.local/<name>/` | Machine-specific, not committed |\n\nThe memory directory structure is clean by design:\n\n```\n~/.claude/agent-memory/code-reviewer/\n├── MEMORY.md # Primary file (first 200 lines loaded)\n├── react-patterns.md # Topic-specific accumulated knowledge\n└── security-checklist.md # Domain-specific reference\n```\n\n\n## Surviving Context Compaction\n\nContext management is where good memory hygiene either pays off or fails. Understanding compaction mechanics helps you design agents that degrade gracefully rather than catastrophically.\n\nContext rot shows up in subtle ways before it becomes obvious. Early signs: Claude gives slightly inconsistent answers to the same question, references a file structure that has been reorganized, or suggests an approach you already ruled out. Later-stage rot is harder to miss — Claude produces code that breaks established patterns, loses track of the overall goal, or forgets which modules it has already touched.\n\n### What Compaction Preserves (and Doesn’t)\n\nCompaction reliably preserves the current task goal, recent tool outputs and file reads, and the most recent code changes. Decision context is the first casualty of compression — compaction optimizes for “what to do next,” not “why we did what we did.”\n\nThis has a direct implication for memory design: **anything you need Claude to remember across compaction boundaries must live outside the conversation** — in `CLAUDE.md`\n\n, `MEMORY.md`\n\n, or the Memory Tool — not inline chat.\n\nThe `/compact`\n\ncommand is your manual escape valve. Use it with a focus hint to guide what survives:\n\n`/compact Focus on the auth migration plan and the database schema changes`\n\n\nWatch for: Claude re-asks questions already answered, suggests approaches previously ruled out, references outdated file paths, or starts contradicting earlier decisions. At 70%+ context fill, precision begins degrading. At 85%+, hallucinations increase noticeably. Run `/compact`\n\nproactively between 70–90%; use `/clear`\n\nas a last resort at 90%+.\n\n### The 1M Context Window Changes the Calculus\n\nAs of March 2026, the 1M token context window is generally available for Opus 4.6 and Sonnet 4.6 with no pricing premium. With 1M tokens, you have roughly 5x the usable space before the compaction threshold arrives. Claude can now see both your API layer and the frontend consuming it, both the migration and the schema it modifies — simultaneously, without manual file management.\n\nFor most single-session workflows, the 1M window makes aggressive context management unnecessary. But for multi-session agents and 24/7 autonomous workflows, the patterns above still apply — the initializer/recovery architecture remains essential regardless of window size.\n\n## Multi-Agent Memory Coordination\n\nWhen running multiple agents in parallel — via agent teams or your own orchestration — memory isolation becomes important to get right.\n\nSubagents do not share memory with the coordinator or each other. Critical isolation principle: subagents operate in independent context windows. This is by design — it prevents context contamination where one agent’s domain-specific knowledge pollutes another’s decision-making.\n\nThe shared `claude-progress.txt`\n\nacts as the coordination substrate — not a shared context window. Each agent reads it at startup and writes to it at completion. In agent teams, agents communicate via peer-to-peer messaging through a mailbox system, with context windows remaining isolated while explicit messaging enables direct coordination.\n\n## Common Pitfalls and How to Avoid Them\n\n### Bloated CLAUDE.md Degrades Compliance\n\nClaude Code's own system prompt consumes roughly 50 of the ~150–200 effective instruction slots before compliance degrades. Claude also filters what it follows rather than treating everything as a persistent command — add \"always address me as Captain\" to CLAUDE.md and watch how many messages pass before Claude stops using it. When context fills, that rule and everything near it loses influence. If everything is marked important, nothing is.\n\n### Security Rules Lost to Compaction\n\nA concrete failure mode: a 24/7 server agent would \"forget\" access control rules after compaction. The rules were in the initial prompt, but after compression the model lost them and started responding to requests it should have blocked. The fix: move all security-critical rules into CLAUDE.local.md — which is re-read after every compaction event, unlike conversation history.\n\n### The “One-Shot Everything” Anti-Pattern\n\nClaude’s tendency to try to do too much at once often leads to the model running out of context mid-implementation, leaving the next session to start with a feature half-implemented and undocumented. Scope restriction in the system prompt solves this:\n\n```\nWork on ONE feature at a time. When you complete a feature:\n1. Verify it works end-to-end (not just unit tests — test as a human user would)\n2. Commit with a descriptive message\n3. Update claude-progress.txt\n4. STOP and report back. Do not start the next feature until instructed.\n```\n\n\n### Memory File Sprawl\n\nIf you observe Claude creating cluttered memory files, include this instruction: “When editing your memory folder, always keep its content up-to-date, coherent, and organized. Rename or delete files that are no longer relevant. Do not create new files unless necessary.” Left without guidance, agents tend to create one file per topic, producing dozens of tiny files rather than a coherent knowledge base.\n\n## Conclusion\n\nClaude Code’s memory system is genuinely powerful, but the power is distributed across four distinct layers that serve different purposes. The teams getting the most out of it treat memory engineering with the same discipline as any other infrastructure concern.\n\nThe practical prescription comes down to four habits: keep `CLAUDE.md`\n\nunder 300 lines focused on things Claude would get wrong without it; let auto memory do its job organically but review `MEMORY.md`\n\nperiodically; for API agents, bootstrap a progress log in the first session and make recovery from a clean context window the default design assumption; and compact proactively at 60% context fill — don’t wait for context rot to manifest.\n\nThe 1M context window changes the day-to-day friction significantly for single-session work, but it doesn’t change the fundamental architecture: sessions are ephemeral, and anything that matters must live outside the conversation. The memory layers are where that state lives.\n\n**This week:** Run `/init`\n\nin your main project, then delete everything the generated CLAUDE.md includes that Claude could infer from the codebase itself. What remains is your real CLAUDE.md. **This month:** Review your MEMORY.md after a week of active use — you'll find both gems and outdated entries. Trim to under 200 lines. **For API builders:** Read Anthropic's *Effective Harnesses for Long-Running Agents* — the initializer pattern is the highest-impact single change you can make to multi-session agents.\n\n**References:**\n\n[Anthropic — Memory Tool Documentation](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool)— Primary reference for Memory Tool API, multi-session patterns, and bootstrapping[Anthropic Engineering — Effective Harnesses for Long-Running Agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents)— Case study and architecture patterns for the initializer/coding agent pattern[Claude Code Official Docs — How Claude Code Works](https://code.claude.com/docs/en/how-claude-code-works)— Authoritative source on context window budget, auto memory, and compaction behavior[Shanraisshan — Claude Agent Memory Report](https://github.com/shanraisshan/claude-code-best-practice/blob/main/reports/claude-agent-memory.md)— Detailed breakdown of subagent memory frontmatter (v2.1.33, Feb 2026)[MindStudio — What Is Claude Code Auto-Memory](https://www.mindstudio.ai/blog/what-is-claude-code-auto-memory)— Practical guide to what auto-memory stores and how to guide it[Florian Bruniaux — Claude Code Ultimate Guide](https://github.com/FlorianBruniaux/claude-code-ultimate-guide)— Community-maintained comprehensive reference with context management thresholds[Anthropic Docs — Context Windows](https://platform.claude.com/docs/en/build-with-claude/context-windows)— Official documentation on compaction, context rot, and 1M window rollout",
      "content_chars": 20869,
      "fetch_status": "ok"
    },
    {
      "id": 10,
      "title": "The Best Claude Code Plugins, Skills & MCP Servers I Use Every Day",
      "url": "https://www.turbodocx.com/blog/best-claude-code-skills-plugins-mcp-servers",
      "author": "Nicolas Fry",
      "publisher": "TurboDocx",
      "date": "2026-03-11",
      "official": false,
      "topics": [
        "skills",
        "mcp",
        "plugins",
        "stack_recomendado"
      ],
      "summary": "Stack practico de 7 plugins/skills/MCP servers de uso diario, con cuando usar cada uno y como combinarlos.",
      "content_markdown": "I wrote about [how I use Claude Code to ship features in one session](https://www.turbodocx.com/blog/how-i-use-claude-code-to-ship-features-in-one-session) — the Director/Manager/Team mental model and the four-step workflow that changed how I build software. But that post covers the *methodology*. This one covers the *toolkit*.\n\nA Director of Engineering is only as good as the team they hire. These seven plugins, skills, and MCP servers are that team. Each one handles a specific job — from feature architecture to live documentation lookup — and together they turn a single Claude Code session into something that feels like an entire engineering org. A [well-structured CLAUDE.md](https://www.turbodocx.com/blog/how-to-write-claude-md-best-practices) is the foundation that makes all of them effective.\n\n| Tool | Type | What It Does | Best For |\n|---|---|---|---|\n| feature-dev | Plugin | Guided 7-phase feature development with multi-agent exploration | New features |\n| frontend-design | Plugin | Production-grade UI that avoids generic AI aesthetics | User-facing work |\n| /batch | Built-in | Parallel execution across isolated worktrees with auto PR creation | Multi-file changes |\n| /simplify | Built-in | Three parallel review agents for reuse, quality, and efficiency | Post-implementation |\n| /code-review | Plugin | Four independent reviewers with confidence scoring | Pre-merge gate |\n| Context7 | MCP Server | Live, version-specific library documentation from Upstash | Third-party libraries |\n| Context Hub | MCP Server | Curated API specs with agent annotations from Andrew Ng’s team | API integrations |\n\n## Official Skills (Build Phase)\n\n### feature-devPlugin\n\nThis is the skill that turns a feature brief into working code. With over 89,000 installs, it's the most popular Claude Code plugin for a reason: it imposes the same structured process that senior engineers use instinctively.\n\nWhen you invoke `/feature-dev`\n\n, Claude doesn't just start writing code. It runs a seven-phase workflow: requirements gathering, codebase exploration (using parallel agents to study your architecture, existing patterns, and conventions), architecture design, implementation, testing, review, and documentation. It's the difference between asking someone to “build a thing” and handing them a rigorous engineering process.\n\nWhen to use it\n\nAny feature larger than a quick fix. If you're adding a new page, building an integration, or creating a component system, feature-dev is the right starting point. For trivial changes — typo fixes, config tweaks, single-line edits — it's smart enough to skip the full workflow.\n\n### frontend-designPlugin\n\nEvery developer who's used AI for frontend work has seen the result: perfectly functional code that looks like every other AI-generated page. Same layouts, same gradients, same generic feel. frontend-design exists to fix that.\n\nThe skill guides Claude through four design dimensions — purpose, tone, constraints, and differentiation — before writing a single line of CSS. It pushes for unexpected font pairings, asymmetric layouts, orchestrated scroll-triggered animations, and layered visual depth. The output feels intentional and branded, not templated.\n\nThink of it as a design team in your pocket. It doesn't just build what you describe — it gives you mockups and alternative suggestions, speeding up the entire UX cycle. Instead of going back and forth with a designer for days, you iterate on layouts, spacing, and interaction patterns in minutes.\n\nI pair this with feature-dev for full-stack features: feature-dev handles the architecture and backend logic, frontend-design handles the interface layer. They complement each other naturally — one cares about how it works, the other cares about how it feels.\n\nWorth knowing about: Garry Tan's gstack\n\nY Combinator CEO Garry Tan open-sourced [gstack](https://github.com/garrytan/gstack) — six Claude Code skills that bundle planning, review, and shipping into one installable package. Where our toolkit separates building (feature-dev, frontend-design) from review (/simplify, /code-review), gstack takes a different angle: CEO-level product thinking, automated PR shipping, and browser-based QA. They're complementary, not competitive. I wrote a [full comparison of gstack vs. our approach](https://www.turbodocx.com/blog/garry-tan-gstack), and you can see how the [Director/Manager/Team model](https://www.turbodocx.com/blog/how-i-use-claude-code-to-ship-features-in-one-session) maps to both.\n\n## Built-In Commands (Orchestration & Quality)\n\n### /batchBuilt-in\n\n`/batch`\n\nis the command that makes Claude Code feel like it has a team behind it. Give it a description of what needs to change, and it decomposes the work into 5–30 independent units, spins up isolated git worktrees for each, executes them in parallel, and creates pull requests automatically.\n\nThe key insight is the **isolation model**. Each unit runs in its own worktree with no context bleed from the others. This means a failure in one unit doesn't contaminate the rest. It's the same principle I use when [running multiple features in parallel with worktrees](https://www.turbodocx.com/blog/how-i-use-claude-code-to-ship-features-in-one-session) — but automated.\n\n# Refactor across the entire codebase /batch replace all lodash imports with native equivalents # Add types to an untyped codebase /batch add TypeScript type annotations to all untyped function parameters # Build out a feature across multiple files /batch add comprehensive error handling to all API route handlers\n\nWhen to use it\n\nAny task with independent sub-problems: multi-file refactors, migration scripts, test suite generation, or [workflow automations](https://www.turbodocx.com/use-cases/automators) that touch many endpoints. If the units of work don't depend on each other, /batch can parallelize them.\n\n### /simplifyBuilt-in\n\nAfter every implementation, before I even think about committing, I run `/simplify`\n\n. It spawns three parallel review agents that look at your changed files from different angles:\n\nReuse Checker\n\nFinds duplicate logic, missed abstractions, and opportunities to use existing utilities\n\nQuality Checker\n\nCatches logic errors, missing edge cases, and integration issues\n\nEfficiency Checker\n\nSpots unnecessary iterations, missed concurrency, and redundant operations\n\nIn my experience, /simplify catches three to five real issues per feature branch. Not cosmetic nitpicks — the kind of bugs that slip through manual review and surface in production two weeks later. I treat it like a [senior staff engineer reviewing every PR](https://www.turbodocx.com/blog/how-i-use-claude-code-to-ship-features-in-one-session) before it ships.\n\n### /code-reviewPlugin\n\nWhile /simplify is your post-implementation sanity check, /code-review is the final gate before merge. It runs four independent agents in parallel, each analyzing from a different angle: two agents audit for CLAUDE.md compliance (redundancy for thoroughness), one scans for obvious bugs in changes, and one analyzes git blame and history for context-based issues.\n\nWhat makes it powerful is the **confidence scoring system**. Every finding gets a score from 0–100, and only issues above the threshold (default 80) make it into the report. This filters out the noise that plagues traditional linters and gives you a focused list of things that actually matter — security vulnerabilities, performance regressions, [API contract violations](https://www.turbodocx.com/resources/api-integration-best-practices).\n\nHow to install\n\n/code-review is a free plugin from Anthropic's [official plugin marketplace](https://github.com/anthropics/claude-plugins-official). Install it and the command is available in any Claude Code session — no plan gate required.\n\n## MCP Servers (Context & Documentation)\n\nSkills handle code generation. MCP (Model Context Protocol) servers handle *knowledge*. They give Claude Code access to external tools, databases, and live documentation that would otherwise be stale or missing from its training data. These two solve the most common frustration with AI coding assistants: outdated API references and hallucinated parameters.\n\n### Context7MCP Server\n\nBuilt by [Upstash](https://github.com/upstash/context7) (open source), Context7 delivers up-to-date, version-specific library documentation directly into your Claude Code session. Instead of relying on training data that might be months old, Claude gets the actual docs for the exact version of React, Next.js, Prisma, or whatever library you're using.\n\nIt exposes two core tools: `resolve-library-id`\n\nto look up a library, and `query-docs`\n\nto fetch specific documentation. When Claude uses Context7, it stops guessing at API signatures and starts referencing the actual source of truth.\n\nWhen to use it\n\nAny work involving third-party libraries — especially fast-moving ones where APIs change between versions. If you've ever had Claude write code using a deprecated method or a parameter that doesn't exist in your version, Context7 is the fix.\n\n### Context HubMCP Server\n\nBuilt by [Andrew Ng's team](https://www.marktechpost.com/2026/03/09/andrew-ngs-team-releases-context-hub-an-open-source-tool-that-gives-your-coding-agent-the-up-to-date-api-documentation-it-needs/) (open source), Context Hub tackles a related but different problem. While Context7 focuses on library documentation, Context Hub provides curated, versioned **API specifications** — the kind of documentation you need when you're consuming external services, not just importing packages.\n\nThe registry currently covers 68+ APIs, and it's growing. What sets it apart is the **agent annotation system**: when Claude discovers a workaround or undocumented behavior during a coding session, it can save that note back to Context Hub. Over time, the documentation gets smarter with every session. It's a feedback loop between your AI coding agent and the docs it relies on.\n\nThis is particularly valuable when building [API integrations](https://www.turbodocx.com/use-cases/developers) — consuming payment processors, CRM APIs, or services like our own [TurboDocx document generation API](https://www.turbodocx.com/products/api-and-sdk). Context Hub ensures Claude uses the current API spec, not whatever was in its training data.\n\n## How They Work Together\n\nThese seven tools aren't isolated utilities. They map directly to the [Director/Manager/Team model](https://www.turbodocx.com/blog/how-i-use-claude-code-to-ship-features-in-one-session) from my workflow post:\n\nYou write the brief (Director)\n\nDefine the problem, acceptance criteria, and constraints. Your [CLAUDE.md](https://www.turbodocx.com/resources/claude-md-guide) provides the codebase context.\n\n/batch orchestrates the work (Engineering Manager)\n\nDecomposes into parallel units. Each unit can use **feature-dev** for architecture, **frontend-design** for UI, and **Context7** + **Context Hub** for live documentation.\n\n/simplify reviews the output (Staff Engineer)\n\nThree parallel agents catch reuse opportunities, quality issues, and efficiency problems before you even look at the diff.\n\n/code-review is the final gate (Security, QA, Deep Staff Review)\n\nFour independent agents with confidence scoring ensure nothing ships that shouldn't — security issues, performance regressions, standards violations.\n\nThe beauty of this stack is that each tool has a clear lane. There's no overlap, no redundancy. Feature-dev and frontend-design handle the *building*. Context7 and Context Hub handle the *knowledge*. /simplify and /code-review handle the *quality*. And /batch ties it all together. It's the same separation of concerns we apply when building software like our [open-source tools](https://www.turbodocx.com/blog/the-power-of-maintaining-open-source) — just applied to the development process itself. Garry Tan's [gstack](https://github.com/garrytan/gstack) takes a similar role-based approach with different packaging — bundling planning, review, and shipping into a single skill set rather than separating build from review.\n\n## Related Resources\n\n\n### Ship Features in One Session with Claude Code\n\nThe workflow methodology that these tools power. Brief, delegate, review, ship — in 45-90 minutes.\n\n\n### How to Write a CLAUDE.md That Actually Works\n\nThe foundation that makes every tool on this list effective. Structure, progressive disclosure, and best practices.\n\n\n### The Developer's Guide to CLAUDE.md\n\nComprehensive reference covering file types, @imports system, structure patterns, and comparisons with other AI config files.\n\n\n### API Integration Best Practices\n\nProduction-ready patterns for authentication, error handling, webhooks, and rate limiting.\n\n## Build Faster with the Right Toolkit\n\nThese are the same tools we use to build TurboDocx. See how document automation and e-signatures can accelerate your team.",
      "content_chars": 12885,
      "fetch_status": "ok"
    }
  ]
}