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

What Is Claude Code Artifacts? Turn a Session into a Live Shared Page

What Is Claude Code Artifacts? Turn a Session into a Live Shared Page

On June 18, 2026, Anthropic announced Claude Code Artifacts, a feature that turns a terminal coding session into a live web page your team can share. Instead of streaming endless git diff and logs as text, Claude Code can publish an annotated PR walkthrough, a self-updating dashboard, an incident timeline, a release checklist that checks itself off, or an architecture map as one page at a private claude.ai URL. This article explains what Artifacts is (built from the whole session and MCP-connector data, and the open page refreshes in place as work progresses), how it differs from 2024 claude.ai canvas Artifacts (session-sourced, self-updating, private by default), what it is good for, how to use it (no /artifact command — you ask in plain language, Claude writes a .html, publishes it and prints the URL, Ctrl+] reopens, each update is a new version at the same URL, Share grants org access or a public link), its limits (a capture of work — no backend, a strict CSP limits external requests, single page, only .html/.htm/.md, 16 MiB cap, more tokens), and availability (Pro/Max/Ultra/Team/Enterprise, must be signed in via /login so API keys cannot publish, Anthropic API only and not Bedrock/Vertex/Foundry, disabled under CMEK/HIPAA/ZDR, plus admin controls and an audit log) — all based on the official documentation.

Claude Code "Can't reach the API server" / "Connection refused": Causes and Fixes for Network, Proxy and TLS Errors (Unable to connect)

Claude Code "Can't reach the API server" / "Connection refused": Causes and Fixes for Network, Proxy and TLS Errors (Unable to connect)

On a corporate machine or over VPN, Claude Code fails with "Can't reach the API server — check your internet or DNS (ENOTFOUND)", "Connection refused — a firewall or proxy may be blocking it (ConnectionRefused)", "SSL certificate verification failed", or "fetch failed" — network errors where the request never reached Anthropic's server (api.anthropic.com), unlike auth (401/403), server overload (529/500), and rate limiting (429). Before v2.1.227 the same errors read "Unable to connect to API (ECONNREFUSED)" with only a code. This article covers what each current message means (including No internet route, Couldn't connect through your proxy, and Connection dropped), the first-run "Unable to connect to Anthropic services" exit (checking the named proxy variable, and the possibility that your country or region isn't supported), the "Streaming response ended before any complete data was received" warning when a proxy or gateway alters the response, the three enterprise blockers (unconfigured proxy, TLS inspection, firewall) plus DNS/VPN/Docker, proxy setup (HTTPS_PROXY/HTTP_PROXY/NO_PROXY, SOCKS unsupported, NTLM/Kerberos via an LLM gateway), TLS and corporate CAs (the v2.1.273 certificate messages, the "SSL certificate error" at /login and startup, NODE_EXTRA_CA_CERTS, mTLS), why never to use NODE_TLS_REJECT_UNAUTHORIZED=0, the firewall allowlist, and a diagnostic workflow — all based on the official error reference.

Claude Code "command not found: claude": Install and PATH Error Fixes

Claude Code "command not found: claude": Install and PATH Error Fixes

If Claude Code prints "zsh: command not found: claude" or "is not recognized", the install folder (~/.local/bin, or %USERPROFILE%\.local\bin on Windows) is usually just missing from PATH, and the official installer does not edit PATH itself. This guide covers how to check and fix PATH on macOS zsh and bash, Linux, fish, Windows PowerShell and CMD; how the native installer differs from npm (claude native binary not installed on npm 12, EACCES, execution policy); removing duplicate installs; cause and fix for each install error message; Windows shell mix-ups; and what to do about "Auto-update failed", following the official docs.

Not logged in · Please run /login: Claude Code Auth & Login Errors (Invalid API key) — Causes and Fixes

Not logged in · Please run /login: Claude Code Auth & Login Errors (Invalid API key) — Causes and Fixes

A Claude Code authentication error comes down to which credential sent the request and how the message begins. This guide explains how to read /status, gives message → cause → first-step tables for subscription, API key, cloud, and organization settings (based on the official Error reference), shows why ANTHROPIC_API_KEY outranks your login, where credentials are stored, and how to sign in again with the macOS Keychain, on WSL, and over SSH.

Claude Code "529 Overloaded" and "500" Server Errors: Causes and Fixes

Claude Code "529 Overloaded" and "500" Server Errors: Causes and Fixes

When Claude Code suddenly stops with "API Error: 529 {\"type\":\"overloaded_error\",\"message\":\"Overloaded\"}" or "500 Internal server error", these are transient server-side events — not a mistake in your request or settings, and not your usage running out. This article explains the meaning of 529 Overloaded (Anthropic API temporarily over capacity, congestion across all users) and 500 (an unexpected internal error, with related 504 timeout_error; 502/503 usually come from upstream infrastructure), the fact that neither consumes your usage quota, how Claude Code auto-retries up to 10 times with exponential backoff before showing anything (Retrying in Ns, attempt x/y; CLAUDE_CODE_MAX_RETRIES default 10, API_TIMEOUT_MS default 10 minutes), the user fixes (wait and retry, switch model with /model since capacity is per model so Sonnet often works when Opus is busy, check status.claude.com, /feedback with request_id if a 500 persists), how to tell it apart from confusable errors (529/500 = server-side and no quota used, 429 = your rate limit with a retry-after header and quota, usage limit = plan allowance, 400 = a bad request), developer guidance (typed SDK exceptions and auto-retry, exponential backoff plus jitter, honoring retry-after on 429, --fallback-model, Priority Tier/Batch), and how to tell a transient spike from a continuing incident — all based on official information.

Claude Code MCP Server Will Not Connect (failed / needs authentication): Causes and Fixes

Claude Code MCP Server Will Not Connect (failed / needs authentication): Causes and Fixes

When a Claude Code MCP server will not connect, check the status, connection method, and Issue details together. failed can indicate a stdio startup failure, an HTTP communication failure, or a rejected fixed authentication header. This article explains Connection closed, environment variables and undefined references, project configuration and approval, npx startup on Windows, debug logs, and operation checks after reconnecting. It also explains why zero tools is not necessarily an error and why a standalone launch does not guarantee a successful MCP connection.

Claude Code "Prompt is too long": Causes and Fixes for the Context Window Error

Claude Code "Prompt is too long": Causes and Fixes for the Context Window Error

Claude Code reports “Prompt is too long” (“Context limit reached” in the interactive interface) when total input, including history, files and tool results, exceeds the context window. This guide decodes each second half of the message (automatic compaction failed, single exchange, auto-compact is off) with the first step to take, shows where auto-compaction runs for each model and setting and how to use /autocompact, explains summarizing only the earlier part with /rewind, and fixes a mismatch between the assumed and real window behind a gateway or with a custom model ID, based on the official docs and changelog.

You've hit your session limit / 5-hour limit in Claude Code: Fixes

You've hit your session limit / 5-hour limit in Claude Code: Fixes

Claude Code's "You've hit your 5-hour limit · resets 3:45pm" means your plan's 5-hour usage window ran out; it is not a bug. Before v2.1.312 (October 27, 2026) it read "You've hit your session limit", and around 2025 "Claude usage limit reached". This article lists every limit message (5-hour, weekly, Opus, Sonnet, Fable and monthly spend limit, with old and new wording), how limits differ on Pro, Max and Ultra (verified Ultra accounts have no 5-hour limit), where to see what is left (/usage, the status line, Settings → Usage), your options when you hit a limit (wait for automatic continue, usage credits, a limit reset, switching models, an API key or an upgrade) and what to check before switching to an API key, all checked against the official changelog, error reference and help center.

Claude Code Prints "court" and Raw invoke Tags — Why Tool Calls Do Not Run, and How to Fix It

Claude Code Prints "court" and Raw invoke Tags — Why Tool Calls Do Not Run, and How to Fix It

When Claude Code prints "court" and raw invoke tags and the command never runs, the model wrote its tool call in a broken format and Claude Code rejected it; a broken call is never executed. As of November 14, 2026 there is no model-side fix, but Claude Code retries up to twice on its own from v2.1.307 and removes broken output from the conversation from v2.1.314. This guide covers the reported patterns (more common in long sessions, with exceptions), what changed by version, how to check your version, when to say "continue" or switch sessions, using /autocompact, and spotting leaks in your own agent.

What Is the Claude Code /loop Command? Usage, Polling, and Scheduling Compared

What Is the Claude Code /loop Command? Usage, Polling, and Scheduling Compared

/loop is a Claude Code skill that repeats an instruction inside your conversation at an interval. This guide covers its three forms (interval + prompt, prompt only, nothing), how Claude picks each wait between 1 minute and 1 hour and stops itself when the work is done, why built-in commands such as /clear don't loop, jitter (every 5 minutes runs 4 min 45 s after the previous run; every 10 minutes is 0–5 min late), why on an API key the 5-minute cache makes re-reading the conversation cheaper every 5 minutes than every 10, which loops Esc stops and which it doesn't, the 7-day expiry, and when to use Desktop or cloud scheduled tasks instead, checked against the official docs on November 12, 2026.

Claude Code Common Errors and Fixes — The Complete Reference

Claude Code Common Errors and Fixes — The Complete Reference

You can tell which family a Claude Code error belongs to from how its message starts, and each family has a set first move. This entry point puts common error messages into tables of meaning, first move, and detailed article. It covers the difference between /doctor inside Claude Code and claude doctor in the shell, how to sort "limit" errors into your allowance, the server side, and the API key side, and tables for authentication, conversation length, cut-off responses, network, installation, MCP, permissions, and safeguards, plus which official page to search for errors not listed. Messages were checked against the official Error reference and related pages on November 13, 2026.

Cursor vs Claude Code vs GitHub Copilot vs Codex: A Full Comparison — How to Choose an AI Coding Tool

Cursor vs Claude Code vs GitHub Copilot vs Codex: A Full Comparison — How to Choose an AI Coding Tool

Cursor, Claude Code, GitHub Copilot, and Codex used to be explained by type: editor, plugin, CLI, and cloud. But when we reread all four vendors' official documentation on September 22, 2026, every one of them runs in the terminal, the IDE, a desktop app, the cloud, and on your phone, and they even run inside one another. This article lays out, with sources, the three things that now set them apart: available models (Cursor and Copilot span multiple vendors, Claude Code is Claude only, Codex is OpenAI only), how pricing and usage are counted (free tiers, monthly prices from Go at $8 up to $200, monthly allowances versus 5-hour and weekly limits, and how you pay when you go over), and home base (their own editor, GitHub, and the Claude and ChatGPT subscriptions). It also covers the differences in GitHub PRs and reviews, how to choose across eight scenarios, how to use them together, and a 30-minute way to compare them on your own repository. Errors in the previous version, such as "Copilot is the cheapest" and "about 4x more token-efficient," are corrected at the end.