Skip to content
AI Tools

Claude Code Guide: Setup, Features & Error Fixes

How to use Claude Code, Anthropic's coding agent: permissions and sandboxing, usage limits and costs, hooks and subagents, and fixes for common errors.

71 articles

Sort articles to find what you need

Articles in Claude Code

Claude Code repeats "court" infinitely and halts with Response stalled mid-stream: causes and fixes

Claude Code repeats "court" infinitely and halts with Response stalled mid-stream: causes and fixes

When you work in Claude Code for a long stretch, the response can suddenly repeat the same word — "court court court…" — dozens to hundreds of times, then halt with "API Error: Response stalled mid-stream. The response above may be incomplete." This is not a mistake in your prompt; it is two separate known bugs chaining together: (1) the model emitting the same token over and over — repetition (degeneration), GitHub #68740/#65823/#66950 — and (2) "Response stalled mid-stream," where the flood of output or a connection problem stops the response stream (#70840 and the official error reference). "court" means nothing; the model just fixated on that token, and it carries the area:model label as a model-side bug. This article breaks down the two layers, how it differs from the "court/invoke tag leak" type (a separate article), the trigger conditions (long sessions, large context, prose right before a tool call, unstable connections, long output), how to stop it now (interrupt with Esc, escape to a new session or /clear, call tools with no preamble, split the task), developer measures (read timeout, repetition-detection guard, retry without keeping broken history, a max_tokens cap), how to tell it apart from Connection closed mid-response and Prompt is too long, and the official status as of July 2026, where no permanent fix is confirmed — all based on the official docs and the actual issues.

API Error: 400 Output blocked by content filtering policy: Causes and Fixes (Claude Code)

API Error: 400 Output blocked by content filtering policy: Causes and Fixes (Claude Code)

The "API Error: 400 Output blocked by content filtering policy" that suddenly appears in Claude Code and the API is not a usage limit and not a context overflow — it means the safety filter held back the "output" Claude was about to return. Its main purpose is preventing verbatim reproduction of existing copyrighted material, and it often trips a false positive with no ill intent — generating the full text of standard licenses like MIT/Apache, doing "match this existing source" work, or duplicating long documents. This article draws on Anthropic's official explanation (an output-stage filter that detects reproduction of copyrighted material and blocks it with a 400) and real Claude Code issue reports of false positives (initial OSS-repo setup, reconciling lists, and a 400 at the end of a long agent run misdiagnosed as a token limit), then lays out how to fix it now (don't make the model copy verbatim — fetch with a tool; rephrase the prompt toward generation/summarization; stop the retry loop with Esc; split the task; report false positives to support) and how to tell it apart from Prompt is too long, usage limit, 529 Overloaded, and max_tokens.

Does Claude Code's Weekly Limit Really Reset Every 7 Days? Investigating Early Recovery (September 2026)

Does Claude Code's Weekly Limit Really Reset Every 7 Days? Investigating Early Recovery (September 2026)

You hit Claude Code's weekly token limit, yet the allowance fully replenished before seven days passed — more than once. Online there are even "hidden-mechanism" write-ups claiming the weekly limit resets every 72 hours. Is that true? This article traces the phenomenon to primary sources. But Anthropic has not documented the internal reset mechanism, and the limits keep changing, so we clearly label three kinds of information: facts confirmable from official sources, events multiple users reproducibly observe but that Anthropic never addressed, and single-source unconfirmed speculation. The core: early full recovery is, in most cases, Anthropic's irregular global resets (announced repeatedly by @ClaudeDevs); the displayed reset time is also demonstrably unstable; and the circulating "72-hour cadence" is single-observer, unreproduced, and contradicted by another observation (24h), so it cannot be taken as fact. Since September 2026 there is also a new kind of reset you are given and use whenever you choose ("Reset for free" under Settings > Usage on the web or in Claude Desktop; Claude Code in the terminal has no button for it). Where something can't be stated, we say so — an investigation current as of September 2026.

Claude Code Sandbox: Scope, Settings, and Limits

Claude Code Sandbox: Scope, Settings, and Limits

The Claude Code sandbox restricts file and network access by sandboxed shells and their child processes at the OS level. Learn /sandbox setup, write locations, denied reads, allowed domains, and regular versus auto-allow permissions. Built-in Read/Edit/Write, MCP, hooks, excluded commands, and unsandboxed retries are separate routes. It does not guarantee prevention of every destructive action, transmission within allowed areas, or secret leak; the guide explains mode-specific handling of unknown hosts and exception settings.

Claude Code Permission Rules (allow/ask/deny) and settings.json Guide

Claude Code Permission Rules (allow/ask/deny) and settings.json Guide

Claude Code permission rules control tool calls through allow, ask, and deny in settings.json. Learn settings precedence, command and path matching, and practical examples. The guide also explains alternate Bash spellings, arbitrary scripts, Read/Edit negation patterns, and decision changes by mods, distinguishing these rules from a guarantee that secret files or network access are blocked through every route.

What Are Claude Code Permission Modes? Manual, Accept Edits, Plan, Auto, Bypass

What Are Claude Code Permission Modes? Manual, Accept Edits, Plan, Auto, Bypass

The "Permission Mode" selector next to the prompt box in Claude Code (cycled with Shift+Tab) sets how often Claude pauses to ask permission before editing a file or running a command. This guide covers what permission modes are (the oversight-vs-autonomy tradeoff; with v2.1.283 or later, terminal and VS Code sessions start in Auto on every plan (earlier, only on Pro, Max, Ultra, and Team), while claude -p and the Agent SDK start in Manual; protected paths like .git and .claude are never auto-approved outside bypass), the five selector modes (Manual = default, reads only auto-approved; Accept edits = acceptEdits, auto-approves edits and common filesystem commands such as mkdir, rm, and mv inside your working dir; Plan = plan, explores and proposes a plan without editing; Auto = auto, a separate classifier blocks dangerous actions while running everything else without prompts; Bypass permissions = bypassPermissions, nearly everything with no checks, isolated environments only) plus a sixth, dontAsk, which never appears in the Shift+Tab cycle and is set by flag or in settings, how to switch (Shift+Tab cycles Manual, Accept edits, and Plan, with Bypass and Auto joining after Plan when available; the --permission-mode flag; and defaultMode in settings, where auto and bypassPermissions don't take effect from project settings), auto mode in depth (the classifier's allow/block defaults, available by default on Team and Enterprise unless an admin turns it off, supported models Opus 4.6+, Sonnet 4.6+, or Fable, conversational boundaries honored as block signals, and the 3-consecutive / 20-total block fallback), which mode to use when and safety (bypass has no prompt-injection protection so it's isolated-only; Auto is the right answer for everyday prompt fatigue; hooks still run in bypass; with bypass available in a terminal, plan mode doesn't stop edits), and how permission mode relates to the effort setting (permission mode = how much it asks, effort = how hard it thinks). Based on the official docs and the desktop app's UI as of October 5, 2026.

What Is Claude Code's "Effort" Setting? A Guide to Faster vs Smarter

What Is Claude Code's "Effort" Setting? A Guide to Faster vs Smarter

That "Effort" slider next to the model name in Claude Code — the Faster-to-Smarter dial — sets how much work (thinking, tool calls, and response text) the AI puts into each reply. This guide covers what effort is; the slider's 5 levels and labels (the API has 5 levels, low to max; the slider reads Low, Medium, High, Extra, Max, where "Extra" = xhigh and the top effort is "Max"); what persists (low–xhigh are saved per model when you confirm with Enter, Max is session-only); model support and auto-downgrade (xhigh needs a relatively recent model such as Fable 5.1, Opus 5.5, or Sonnet 5.5; Opus 4.6 and Sonnet 4.6 have no xhigh and downgrade to high; the legacy Haiku 4.5 has no effort control while Haiku 5.5 supports every level; Claude Code's default varies by model: medium on Opus 5.5, Sonnet 5.5, and Haiku 5.5, high on Fable 5.1); how to set it (/effort slider and direct values, /effort auto, /model, --effort, the CLAUDE_CODE_EFFORT_LEVEL env var as highest priority, the modelSettings and effortLevel settings, and skill/subagent frontmatter); a quick-reference table; an in-depth look at Ultracode (not an effort step but an on/off switch that works at any level and has Claude build multi-agent dynamic workflows on its own; limited to xhigh-capable models; turned on with /effort ultracode, the Tab key, or "ultracode": true in settings; when to use it, cost cautions, and what changed in v2.1.284); and related features (ultrathink, /fast). Based on official docs (as of September 2026) and the live UI.

What Are Claude Code Checkpointing and /rewind? Roll Back Changes

What Are Claude Code Checkpointing and /rewind? Roll Back Changes

Claude Code creates a checkpoint with every prompt that starts a turn, so files Claude changed with its file editing tools can be returned to that point. Open the menu with /rewind (aliases /checkpoint and /undo) or double Esc on an empty input, then choose Restore code, Restore conversation, both, or a summarize option. Files only Bash changed, subagent edits (except a forked skill in the foreground), manual or concurrent-session edits, and linked files are not restored. Snapshots cover the 100 most recent checkpoints and are deleted after about 30 days (cleanupPeriodDays), after which restores can fail with No files were restored. This guide covers the restore table, a Git workflow, common rewind failures, VS Code, cloud sessions, the Agent SDK, and recovering from 400 errors.

What Are Claude Code Hooks? Run Shell Commands Deterministically

What Are Claude Code Hooks? Run Shell Commands Deterministically

Claude Code hooks make Claude Code itself run your commands at defined points, every time. This guide tables all 33 events in the official Hooks reference (when each fires, whether exit code 2 blocks it, and what JSON it can return), explains the three-level settings.json format, matcher rules, locations, default timeouts, and exit codes 0, 2, and 1, and gives six ready-to-use examples with settings and scripts in the official style: blocking dangerous commands, protecting files, formatting after edits, notifications, re-injecting context after compaction, and requiring passing tests. It ends with a troubleshooting table and safety notes such as workspace trust in -p runs.

What Are Claude Design and /design-sync? Bridging Design and Code

What Are Claude Design and /design-sync? Bridging Design and Code

Claude Design is an Anthropic Labs design tool where you describe what you want in conversation and Claude generates UI designs, prototypes, and one-pagers, which you refine via chat, inline comments, direct edits, and sliders (launched April 17, 2026 as a research preview, with over a million users in the first week). The June 17, 2026 major overhaul sharply shrank the designer-developer round-trip, and since the September 16, 2026 merger of Cowork and chat it works inside any conversation. This article covers what Claude Design is (it ran on Opus 4.7 at the April launch, but the June announcement does not restate the model so we do not assert it), the June overhaul (design-system imports from a GitHub repo / design files / raw uploads so Claude builds with your real components and checks its output, bringing the design system in with /design-sync and handing off to Claude Code, direct canvas editing with drag/resize/align and many stability fixes, a token-burning fix via shared usage limits with chat/Cowork/Claude Code, enterprise brand controls where an admin approves and locks a standard system, and expanded export to Adobe/Base44/Canva/Gamma/Lovable/Miro/Replit/Vercel/Wix and PDF/PowerPoint/HTML), how /design-sync and /design split the work (/design-sync brings your repo's React design system into Claude Design and verifies every component on the first sync; the handoff to Claude Code and /design carry a finished design into code without rebuilding from a screenshot and turn code into a live prototype; since August /design is also a bundled Claude Code skill that drafts artboards), availability as of October 12, 2026 (out of beta since October 8, 2026 and available on every plan including Free, on by default for Enterprise from October 15, drawing from the same usage limits as chat, reachable from any conversation / the Artifacts tab / Claude Code / the mobile apps, the standalone claude.ai/design closing on December 14, 2026, and /design-sync and /design in Claude Code), and why it matters (closing the rebuild-from-a-screenshot gap and connecting designers and developers in one line) — all based on official information, with uncertainties flagged.

Claude Code Subagents vs Agent Teams: The Difference and Which to Use

Claude Code Subagents vs Agent Teams: The Difference and Which to Use

In Claude Code, subagents let Claude hand work to a helper with its own context inside one conversation and get back only a summary. Agent Teams let a lead start separate Claude Code sessions as teammates that coordinate through a shared task list and messages; they are experimental and run only in interactive sessions with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 set. Working from the official docs, this article gives a decision table, what each receives at startup (conversation history, CLAUDE.md, skills, MCP), the limits (20 subagents at once, three levels of nesting, teams starting at 3–5) and how cost adds up, the catch that named subagents launch as teammates once teams are enabled, and which fields apply when one .claude/agents/ definition is used for both.

What Are Claude Code Plugins and Marketplaces? How to Use, Build, and Publish Them

What Are Claude Code Plugins and Marketplaces? How to Use, Build, and Publish Them

A Claude Code plugin packages skills, subagents, hooks, MCP servers, and more so you can install and remove them as one unit; a marketplace is the catalog that says where to fetch each one. Based on the official docs, this guide covers how to tell the official, community, and third-party marketplaces apart from the Claude Marketplace website and the claude.ai directory, how to review a plugin before installing it, a minimal one-skill build, the three ways to publish, and distribution through repository settings, managed settings, and organization marketplaces on claude.ai.