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 Mods Explained: How They Differ From Hooks, What They Can Do, and the Permissions to Check First

Claude Code Mods Explained: How They Differ From Hooks, What They Can Do, and the Permissions to Check First

Claude Code mods (Claude Mods) are plugins that run JavaScript or TypeScript functions inside Claude Code, officially added in v2.1.287 on October 1, 2026. This article explains how a mod made of three files works, how it differs from traditional hooks written in settings.json, skills and MCP, what mods can do, such as drawing panes in the interface, creating commands that run without waiting and holding a tool call to ask the user, and limits such as run time, all based on the original text of the official docs checked on October 5 of the same year. A mod runs with your permissions outside the sandbox and can override permission decisions. A table shows that deny rules hold on Team or Enterprise or on a machine with managed settings, but on a personal plan a mod can approve even calls a deny rule refused. It also covers the results of reading the code of Anthropic's three official sample mods and counting which APIs they use, how to read claude plugin validate before installing, how to try mods, have Claude build one and turn them off, where mods run and the built-in mods, and a checklist before installing.

Setting Up Claude Code Cloud Sessions Securely: A Setup That Protects Production, and 5 Places I Got Stuck

Setting Up Claude Code Cloud Sessions Securely: A Setup That Protects Production, and 5 Places I Got Stuck

You can hand development to Claude Code cloud sessions without opening a new way into production: keep the code in a private GitHub repository, install the Claude GitHub App on that repository only, and have the production server just pull it with a read-only deploy key. This article is my record of starting to use cloud sessions on a separate development project on October 4, 2026, checked against the original text of the official docs as of that date. It explains that claude --cloud without GitHub sends the history of every branch plus uncommitted changes to tracked files (on Windows, regardless of file names), how to fix it when a different GitHub account is connected, "Only select repositories" and why public repositories appear in the list, why you should create a fresh environment per project since anyone who uses an environment can read its environment variables, that local files are invisible, and that Accept edits in the cloud stops at every command while Auto keeps going, all wrapped up in a pre-start checklist. It also shares a real case where a single instruction run autonomously used $226 of limited-time credit before I told it to stop midway, why credit drains so fast, and ways to cut costs.

How to Opt Out of Claude Code Training: Where the Setting Lives, How Each Plan Is Treated, and Whether Anthropic Trains on API Data

How to Opt Out of Claude Code Training: Where the Setting Lives, How Each Plan Is Treated, and Whether Anthropic Trains on API Data

Whether your Claude Code conversations are used to train AI models depends on your plan and your account setting. On the Free, Pro, Max, and Ultra consumer plans, your data is used for training only while the model-improvement setting in claude.ai's privacy settings is on (kept for 5 years), and turning it off stops training (kept for 30 days). The setting belongs to your account, so there's no need to change settings files on the computer running Claude Code. Based on the original text of the Claude Code docs page "Data usage," Anthropic's Privacy Center, and the Claude Platform page "API and data retention" as of October 4, 2026, this article covers where the setting is and how to turn it off, the fact that opting out doesn't remove your data from past training, how 👍👎 ratings, /feedback, and conversations flagged as policy violations are handled, and training and retention by plan, including Team, Enterprise, the API, and Bedrock. It also explains that API inputs and outputs aren't used for training by default and are deleted within 30 days, what ZDR covers and why Covered Models such as Fable require 30 days of retention, the environment variables that stop usage metrics and error reports sent separately from training, the conversation transcripts stored in plaintext on your own computer, and how to choose a setup for confidential work.

Claude Code /doctor prompt-audit: How to Audit CLAUDE.md and Skills for Stale Instructions, and What It Found in Ours

Claude Code /doctor prompt-audit: How to Audit CLAUDE.md and Skills for Stale Instructions, and What It Found in Ours

Claude Code's /doctor prompt-audit (/checkup prompt-audit is the same) has Claude read CLAUDE.md, CLAUDE.local.md, AGENTS.md, and the rules, skills, commands, and subagents under .claude/, look for prompting written for older models, references to files or commands that don't exist, and instructions that contradict each other, and return a report with proposed diffs. Nothing changes until you ask, and it requires v2.1.283 or later. Based on the official docs and CHANGELOG as of October 3, 2026 and the audit guide bundled with Claude Code, this article covers how to run it and narrow it with a path, what it counts as stale (over-strong wording, missing paths, conflicts between files, and more), its rule against deleting context and prohibitions that exist for a reason, the six fields of the report and how to read confidence levels, and how it differs from /doctor, /claude-api prompt-audit, and the terminal claude doctor command. It also shares what happened when we ran it on this site's instruction files (7 of 9 findings applied, including a real drift where we forgot to rewrite an explanation after adding a rule) and caveats such as usage allowance, run-to-run variation, and the effort of checking findings before applying them.

What Is Claude Code /code-review? How to Use It, Choosing a Level, ultra Pricing, Downsides, and Results From Actually Using It

What Is Claude Code /code-review? How to Use It, Choosing a Level, ultra Pricing, Downsides, and Results From Actually Using It

Claude Code's /code-review is a bundled skill that reads your commits ahead of upstream plus uncommitted changes (or a PR, branch, or path you pass), hunts for correctness bugs, and reports them. /review is an alias, the review runs as a background subagent, and its cost counts toward your normal usage. This article covers how to pass a target, how to choose between low (only high-confidence findings) and medium to max (wider coverage, but you need to sort the results), the rule that leaving out the level reuses the last level you typed, the caveat that --fix edits made in the background can't be undone with /rewind, and where --comment posts on GitHub and GitLab. It also explains ultra, where multiple agents in the cloud return only verified findings (about 15 to 25 minutes; 3 one-time free runs on Pro, Max, and Ultra, then typically $5 to $25 per run in usage credits), and how /code-review differs from /simplify, /security-review, the GitHub App's Code Review, and claude-code-action, based on the original text of the official documentation and CHANGELOG as of October 2, 2026 (the level descriptions as of October 14). Finally, it shares the results of running /code-review high once on the code for this site's AI image checker tool (9 of 10 findings were real bugs, all fixed) and the downsides, including usage, the work of checking findings, and how to undo --fix.

ChatGPT, Codex, and Claude Code Image Generation: How They Differ, Pro Usage Limits, and a Practical Workflow

ChatGPT, Codex, and Claude Code Image Generation: How They Differ, Pro Usage Limits, and a Practical Workflow

Even with the same Pro subscription, image generation draws from different usage pools in regular ChatGPT Chat versus Codex and Work. Claude models do not directly create photos or illustrations, but Claude Code can produce images through HTML, SVG, code, or external image APIs. The article diagrams each entry point and walks through a practical method: set the display size first, then specify the composition, separate reference material from new content, and select from a few outputs by checking them at full size and at the actual display size.

safeguards flagged this message: What It Means and What to Do When a Safety Classifier Stops Claude Code

safeguards flagged this message: What It Means and What to Do When a Safety Classifier Stops Claude Code

If Claude Code shows "API Error: Opus 5.5's safeguards flagged this message" or "safeguards flagged this session," a safety classifier attached to the model has reacted to the content of your conversation and stopped that model from responding. Issue titles also call it "Message flagged by safeguards." The classifiers run on the server side and look not just at your last sentence but at the whole conversation, the files that were read, and even CLAUDE.md, so an ordinary message like "hi" can get stopped, and Anthropic acknowledges false positives. Drawing on the official error reference, the model configuration documentation, the API's Refusals and fallback page and the Help Center, we lay out what the cyber, bio, reasoning_extraction, general_harms and frontier_llm categories in the Details field mean, when Claude Code automatically switches to another model and when it simply stops, how to use Esc twice to rewind, /clear, /model, --safe-mode and /feedback, the October 6, 2026 expansion of CVP into three tiers that also cover Opus 5.5 and Sonnet 5.5, and how stopped requests are billed. GitHub reports filed since September 22 are kept separate from the official explanations and treated as unconfirmed cases.

I Tried Claude Code Projects: Strengths and Pitfalls of Parallel Threads, Learned by Having It Build an Entire Website

I Tried Claude Code Projects: Strengths and Pitfalls of Parallel Threads, Learned by Having It Build an Entire Website

I had Claude Code Projects (public beta) build an entire website for looking up how much memory local LLMs need. From creation to the last merge took about 20 hours: 10 threads, 11 PRs, about 23,000 lines, and about 190 million tokens (97.7% of them cache reads). Three tasks ran in parallel overnight, the threads coordinated with each other through the coordinator, and once I switched to instructions that handed things over, it decided the next tasks by itself. On the other hand, nobody built the logic that decides "can this be published?" at the boundary between the data collection and page threads, so production showed zero models. Real data also exposed bugs that sample-data tests never showed, and deploying to a server reachable only over SSH hit a wall. I record it all from measurements: where I tripped getting started, the difference between approving every step and handing it over, how the setup credit ran down, and what kinds of work it suits and does not suit.

How to Bulk Change the Model and Effort for All Sessions in Claude Code Desktop and Codex: Just Ask the Assistant, What It Can Reach, and 4 Checks

How to Bulk Change the Model and Effort for All Sessions in Claude Code Desktop and Codex: Just Ask the Assistant, What It Can Reach, and 4 Checks

Opening your sessions one by one to switch the model and effort every time a new model comes out is a chore. When I tried it in my own setup on September 24, 2026, asking the assistant to "change them all to this" worked in both Claude Code Desktop and Codex, without me touching each session. In Claude Code Desktop, the tools the app gives the assistant changed the sessions without sending a message, and the changes survived an app restart. However, it only sees local desktop sessions, the default is the 20 most recent, and it can't change the session making the request. In Codex, the default for new chats was changed in config.toml, and the assistant used internal machinery to change the 115 existing chats in my setup one by one. Chats that were open in the app each received one confirmation message. This article covers how the two differ, what they can and can't reach, example prompts, and 4 checks: keep the old values, define the scope, re-read everything, and check one with your own eyes.

What Are Claude Code Cloud Sessions? How They Keep Running With Your Laptop Closed, How to Start, and What They Cost

What Are Claude Code Cloud Sessions? How They Keep Running With Your Laptop Closed, How to Start, and What They Cost

Claude Code cloud sessions came out of research preview and became generally available on September 23, 2026. Your GitHub repository is cloned into a virtual machine in Anthropic's cloud, where Claude fixes the code and pushes a branch, so the work doesn't stop when you close your laptop. Usage comes out of the same limits as your regular plan, with no separate charge for the VM. Existing Pro and Max subscribers were offered a one-time $100 or $250 credit, which expired on November 4 at 11:59 PM PT; the promotion has ended. This article uses the official documentation and posts from the official account to cover how cloud sessions differ from local Claude Code and Remote Control (which settings come along and which don't, permission modes, the four network access levels and where to keep secrets), how to start from the browser and the terminal, what the ended credit covered and the caveats in its full offer terms, and which jobs they suit and which they don't.

claude.ai connectors are disabled: Meaning and Fix — When ANTHROPIC_API_KEY Takes Precedence Over Your claude.ai Login in Claude Code

claude.ai connectors are disabled: Meaning and Fix — When ANTHROPIC_API_KEY Takes Precedence Over Your claude.ai Login in Claude Code

If Claude Code shows “claude.ai connectors are disabled because ANTHROPIC_API_KEY or another auth source is set and takes precedence over your claude.ai login,” a credential such as the ANTHROPIC_API_KEY environment variable is taking precedence over your saved claude.ai login, and the connectors you added in claude.ai are not being loaded. Your login is not gone; it just isn’t used because of precedence. Based on the official authentication and MCP documentation and the CHANGELOG, this article covers authentication precedence, how to check which credential is in use with /status and environment variables, where the key comes from (shell config, .env, env and apiKeyHelper in settings files), how to remove the key, restart, and confirm, what you lose by staying on an API key (connectors, Remote Control, /schedule) and how billing differs, and how to stop the warning with disableClaudeAiConnectors. Points not in the official docs are shown separately as things we checked in the Claude Code binary itself.

API Error: The response stopped arriving — What It Means and How to Fix It When Claude Code's Response Data Stops Midway

API Error: The response stopped arriving — What It Means and How to Fix It When Claude Code's Response Data Stops Midway

If Claude Code shows "API Error: The response stopped arriving. The response above may be incomplete." partway through a response, the connection stayed open but data stopped arriving, and Claude Code's watchdog timer cut it off. Completed output is kept, so check the state of your work and reply continue to pick up where it left off. This message is the renamed version of what was shown as "Response stalled mid-stream" before v2.1.227. Based on the official error reference and network configuration documentation, we cover how it differs from Connection lost mid-response, The response stalled before a response was produced, and Streaming response ended before any complete data was received; why it is not resent; how -p and subagents handle it; how to check your version, network path, and watchdog timers; and what to record when you report it. Five GitHub reports we read are treated separately from the official explanation, as unconfirmed cases.