Table of Contents
At a Glance (Claude Code not working)
- Three commands solve most cases:
claude --version,claude doctor(from your normal shell), and/status(inside a session). - Four buckets cover most Claude Code errors: installation and PATH problems, authentication and credential conflicts, capacity and usage limits, and network or proxy trouble.
- A stray
ANTHROPIC_API_KEYis a classic culprit. It can override a subscription login and trigger billing or “organization disabled” errors. - Not every red message is your fault. 500 and 529 errors are server-side, and Claude Code already retries many of them automatically.
- When to escalate: Run
claude doctor, then/feedback, followed by a GitHub issue or support request with your OS, command, and full error text. - Everything below comes from official Claude Code documentation and public issue reports. Check the linked pages for your version.

Why a Troubleshooting Guide Like This Exists
Claude Code is Anthropic’s agentic coding tool, and it runs in several places: a terminal, a desktop app, IDE extensions, and cloud sessions. More customization also means more components that may need troubleshooting. A PATH entry that’s missing in one shell, a leftover environment variable from a former project, a corporate proxy that rewrites certificates, or a plan limit that quietly runs out can each produce a confusing message.
This guide gathers the failure modes into one place and explains the reasoning behind each fix, not just the commands. The article draws on Anthropic’s published guidance, help-center resources, and issue reports available to the public. It isn’t a lab report, and it doesn’t describe personal experiments. Version numbers, wording, and behavior change often, so treat the linked documentation as the final word and keep Claude Code updated.
The 60-Second Triage
Before you chase a specific message, run these three checks. They sort most problems into the right bucket.
claude --versionshows whether the binary launches at all. If the shell says it can’t findclaude, you have an installation or PATH issue.claude doctoris a read-only diagnostic. Anthropic’s documentation says to run it from your normal shell, not from inside a Claude session. It checks installation type, version, search functionality, configuration warnings, and, on macOS, whether the Keychain is writable./statusinside a session shows which credential is active. Many “it worked yesterday” problems turn out to be the wrong credential winning.
Quick Triage Table
| What you see | Most likely bucket | First move |
|---|---|---|
command not found: claude | Install/PATH | Check that ~/.local/bin is on PATH and open a new terminal. |
syntax error near unexpected token '<' | Install | The install URL returned a web page; use another installer. |
Killed / exit code 137 during install | Install/memory | Free memory or add swap. |
| OAuth error: Invalid code | Login | Retry quickly, or copy the URL and finish in a local browser. |
| Credit balance is too low with a subscription | Credentials | Check for a stray ANTHROPIC_API_KEY. |
| API Error: 529 Overloaded | Server capacity | Check the status page, retry, or switch models. |
| You’ve hit your session limit | Plan limits | Wait for the reset, or add usage credits. |
| Unable to connect to API | Network/proxy | Check reachability and proxy settings. |
| Prompt is too long | Context | Use /compact or /clear. |
Installation Errors
The install step fails for reasons that are mostly about your environment, not about Claude Code itself. The official installer places the claude launcher at ~/.local/bin/claude on macOS and Linux, and at %USERPROFILE%\.local\bin\claude.exe on Windows.
“command not found: claude” After Installing
This is a common message. The installation finished, but your shell can’t find the launcher, so the installation directory isn’t on your PATH. The messages differ by platform: zsh: command not found: claude, bash: claude: command not found, or 'claude' is not recognized in Windows shells.
Check and fix on macOS or Linux:
echo $PATH | tr ':' '\n' | grep -Fx "$HOME/.local/bin"
If nothing prints, add the directory to your shell configuration. For Zsh:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Bash on Linux uses ~/.bashrc. Bash on macOS is different: Terminal starts it as a login shell that ignores ~/.bashrc, so the line belongs in ~/.bash_profile (or whichever of ~/.bash_login or ~/.profile already exists). Confirm the fix with claude --version.
On Windows PowerShell, add the installation directory to the user PATH and restart the terminal:
$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')
One subtle trap: the VS Code extension bundles its own private copy of the CLI for its chat panel and doesn’t add it to PATH. If you only installed the extension, ~/.local/bin/claude won’t exist, so run the standalone installation to get a terminal command.
A related Windows case appears after an update. If claude disappears right after Claude Code updates, the update process may have left a backup file named claude.exe.old.<timestamp> without a working claude.exe. You can recover the setup by restoring the most recent backup to its original name or running the installer again through PowerShell.
The Install Script Returns HTML
If you see syntax error near unexpected token '<' or <!DOCTYPE html>, the installation URL returned a web page or an error instead of a script. PowerShell shows the same problem as parse errors quoting HTML or CSS. A bare curl: (22) ... 403 can also appear.
Anthropic’s documentation lists a few possible causes. One is that Claude Code isn’t available in your region, in which case the page says “App unavailable in region” and you can check Anthropic’s supported-countries page. Another is a proxy or network filter blocking the download host. A third is a temporary routing or service problem.
Reasonable moves are to try another installer—Homebrew’s brew install --cask claude-code on macOS, or winget install Anthropic.ClaudeCode on Windows—and retry after a few minutes. You can check reachability with:
curl -sI https://downloads.claude.ai/claude-code-releases/latest
A first line showing 200 means you reached the server. On Windows PowerShell, call curl.exe explicitly, since plain curl is an alias that rejects those flags.
“curl: (56) Failure Writing Output to Destination”
This means the piped installer didn’t receive the whole script. Exit code 56 points to an interrupted download, and 23 usually means the shell exited early. Check connectivity first, then retry or try another installation method.
Installation Killed on a Small Server
On low-memory Linux servers, you may see Killed and a message ending with exit code 137. That is the operating system’s out-of-memory killer. Anthropic’s documentation says the installation step needs roughly 512 MB of free memory, and Claude Code itself needs at least 4 GB of RAM to run comfortably.
Adding swap space lets the installation finish on small instances:
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Then retry the installer. In Docker, installing as root from / can cause hangs, so set a working directory such as /tmp before the installation command, and give Docker Desktop’s VM more memory if builds are starved.
Permission Denied During Installation
On macOS and Linux, the installer writes to several locations, including ~/.local/bin, ~/.local/share/claude, ~/.claude, and ~/.claude.json. If one isn’t writable, fix ownership rather than reaching for repeated sudo runs:
sudo mkdir -p ~/.local/bin
sudo chown -R $(whoami) ~/.local
If you previously installed through npm and hit npm-specific permission errors, the documentation recommends switching to the native installer.
TLS and Certificate Errors During Installation
Messages like curl: (35) TLS connect error, schannel: next InitializeSecurityContext failed, or SELF_SIGNED_CERT_IN_CHAIN mean the TLS handshake failed. The usual suspects are outdated CA certificates, an old TLS setting on Windows, and corporate proxies that inspect traffic.
On Ubuntu or Debian, update certificates with:
sudo apt-get install ca-certificates
Behind an inspecting proxy, point the installer at your corporate CA. Once Claude Code is installed, set NODE_EXTRA_CA_CERTS so API requests trust the same certificate bundle.
On Windows, CRYPT_E_NO_REVOCATION_CHECK errors mean your network blocks certificate revocation lookups. The documentation suggests the PowerShell installer or WinGet as ways around curl’s check.
Wrong Command for the Wrong Shell on Windows
A frequent self-inflicted problem is copying a command meant for another shell:
| Error | What happened | Fix |
|---|---|---|
'irm' is not recognized | You’re in CMD. | Open PowerShell, or use the CMD installer. |
&& is not a valid statement separator | A CMD command was pasted into PowerShell. | Use irm https://claude.ai/install.ps1 | iex. |
Parameter error mentioning fsSL | A macOS/Linux curl command was used in PowerShell. | Use the PowerShell installer. |
| Command prints script text | You ran only the download half. | Run the complete command. |
Git Bash, PowerShell, and 32-Bit Windows
Windows users need a compatible shell for Claude Code, such as Git Bash or PowerShell. Git is optional, because Claude Code can use its PowerShell tool when Git Bash isn’t available.
If you see an error saying neither was found, add PowerShell’s directory to PATH, install PowerShell 7, or install Git for Windows and select “Add to PATH.” If Git exists but isn’t detected, set CLAUDE_CODE_GIT_BASH_PATH in settings.json to the full path of bash.exe.
Note that the variable only accepts a file named bash.exe, sh.exe, bash, or sh; Git’s git-bash.exe launcher doesn’t qualify.
“Claude Code does not support 32-bit Windows” often appears on a 64-bit machine because you opened the “Windows PowerShell (x86)” entry. Launch the standard Windows PowerShell application again, then run the installation command once more.
WSL Problems
Two WSL issues stand out. On WSL1, cannot execute binary file: Exec format error is a known native-binary regression, and converting the distribution to WSL2 (wsl --set-version <DistroName> 2) is the cleanest fix.
For npm installations inside WSL, exec: node: not found usually means WSL is picking up the Windows Node.js installation. If which node shows a path starting with /mnt/c/, install Node.js through your Linux package manager or nvm instead.
Conflicting or Leftover Installations
Multiple copies can cause version mismatches. List everything on PATH with which -a claude (or where.exe claude on Windows) and look at the three usual sources: the native installation at ~/.local/bin/claude, a legacy local installation under ~/.claude/local/, and an npm global installation.
Keep one, preferably the native installation, and remove the rest.
Crashes on Startup: Missing Libraries, Old CPUs, and Old macOS
- Error loading shared library on Linux: This can mean the wrong binary variant (glibc vs. musl) was selected. On Alpine and other musl systems, install the required packages, including
libgcc,libstdc++, andripgrep. - Illegal instruction: This can mean an architecture mismatch or a CPU without the AVX instruction set, which affects older processors and some virtual machines that don’t pass AVX through to the guest.
dyld: Symbol not foundon macOS: This indicates the operating system is too old. The documentation lists macOS 13.0 or later as the requirement.
npm-Specific Errors
If you installed through npm and see "claude native binary not installed", the platform-specific optional dependency or the postinstall step was skipped. Causes include --omit=optional, --ignore-scripts, and some pnpm configurations. A corporate npm mirror that lacks the platform packages can also cause this.
On Windows, “running scripts is disabled on this system” is PowerShell’s execution policy blocking npm’s .ps1 launchers. Calling claude.cmd, or using the PowerShell installer, avoids it.
An ENOTEMPTY error during an update means a leftover package directory needs deleting before reinstalling.
Login and Authentication Errors
Authentication failures are about which credential Claude Code is sending, and that can differ from the one you think you set up.
Reset the Login First
When the cause isn’t obvious, a clean re-authentication fixes many cases: run /logout, close Claude Code, restart with claude, and sign in again.
If the browser doesn’t open, press c at the login prompt to copy the OAuth URL.
OAuth Error: Invalid Code
This message means the login code expired or was truncated when pasted. Retry and finish the sign-in promptly.
In WSL2, SSH, or container sessions, the browser often opens on a different machine than the one running Claude Code, so copy the URL and open it locally. If pasting into the prompt does nothing, try your terminal’s alternate paste shortcut, or use claude auth login, which reads the pasted code from standard input.
The Stray API Key Problem
This issue warrants a separate section because it can trigger several errors that are difficult to interpret:
- Credit balance is too low even though you have a paid subscription.
- This organization has been disabled even though your subscription is active.
- Your organization has disabled API key authentication.
Anthropic’s documentation explains the pattern: an environment variable such as ANTHROPIC_API_KEY takes precedence over a saved subscription login once approved, and in non-interactive -p mode the key is always used when present. An old key from a previous employer or project, left in a shell profile or a .env file, can silently win.
The fix is to run /status to see the active credential and look at the API-key row. Then unset the variable and remove it from your shell profile:
unset ANTHROPIC_API_KEY
claude
On Windows PowerShell, use:
Remove-Item Env:ANTHROPIC_API_KEY
Tools like direnv and IDE terminals can reload a stale key from project files, so check those too.
Access and Organization Errors
| Message | Meaning | Who fixes it |
|---|---|---|
| Claude Code access has not been granted for this account | An Enterprise custom role doesn’t grant Claude Code. | An organization Owner. |
| Your organization has disabled Claude subscription access | A server-side organization setting blocks subscription sign-in. | An admin, or use an API key if permitted. |
| Your organization has disabled API key authentication | The Console admin turned off key authentication. | Unset the key and run /login, if subscription login is permitted. |
| 403 Forbidden after login | Inactive subscription, missing Console role, or proxy interference. | Check plan, role, and network settings. |
These are server-side policy settings, so no local flag overrides them.
macOS Keychain Trouble
If Claude Code keeps asking you to log in, check your system clock first, because token validation depends on accurate timestamps.
On macOS, a locked or out-of-sync Keychain can push credentials into a plaintext fallback file. claude doctor reports “macOS Keychain is not writable” when that happens. The documented sequence is to unlock the login Keychain, resync its password with your account password if needed, and then sign out and in again.
Helper Scripts and Cloud Providers
If you configured apiKeyHelper, remember that its output takes precedence over a saved login, so /login won’t help while the setting exists. Run the script directly and check that it prints only a valid key and exits cleanly.
For cloud providers, the “could not load credentials” family of errors usually means the provider’s own CLI isn’t authenticated in the current shell. Typical checks are:
- Amazon Bedrock:
aws sts get-caller-identity - Google Cloud’s Agent Platform:
gcloud auth application-default login - Microsoft Foundry:
az login
If credentials work in a terminal but not in an IDE extension, the IDE probably didn’t inherit your shell environment.
Runtime Errors: Servers, Retries, and Timeouts
Once Claude Code starts, most runtime errors map to an underlying API error. Anthropic’s error reference notes that these apply across the CLI, the Desktop app, and cloud sessions, since all three wrap the same CLI.
500 and 529 Errors
A 5xx response indicates an unexpected server-side failure, not a problem with your prompt, settings, or account. A 529 means the API is temporarily at capacity across users, and it doesn’t count against your quota.
The recommended steps are consistent:
- Check
status.claude.com(or the provider status page named in the message). - Wait a minute and resend. For a long prompt, typing
try againis enough. - For repeated 529s, switch models with
/model, since capacity is tracked per model. - If it persists with no posted incident, run
/feedback.
What the Automatic Retries Do
According to the documentation, Claude Code retries transient failures up to 10 times with exponential backoff before showing an error. Retried cases include server errors and overloads that arrive before any response, dropped connections, many stalled streams, and temporary 429 throttles.
It deliberately doesn’t retry some failures, such as certificate validation errors, which it reports at once so you can fix the setup. It also doesn’t resend a request that fails after tool calls were completed mid-response, because that could execute the same tool calls twice.
You can tune this with environment variables:
CLAUDE_CODE_MAX_RETRIESchanges the retry count.API_TIMEOUT_MSchanges the per-request timeout (default ten minutes).CLAUDE_CODE_RETRY_WATCHDOG=1suits unattended jobs by retrying capacity errors indefinitely.
“The Response Above May Be Incomplete”
Messages such as “Connection lost mid-response” mean a stream broke after Claude had finished some blocks. Claude Code keeps what completed and appends the notice.
In an interactive session, read what’s on screen and reply with continue. In non-interactive mode, resume the session and send continue once the connection is stable.
“No Response from API” and Timeouts
If the API sends no response headers within the first-byte deadline, Claude Code aborts and retries once. If a proxy or gateway holds responses until they finish, raising API_TIMEOUT_MS (and CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS where relevant) lets the wait run longer.
Usage Limits and Billing Messages
These errors are about quota, not breakage. They’re easy to misread because several look alike.
| Message | What it means | Practical response |
|---|---|---|
| You’ve hit your session limit / weekly limit | Plan allowance used, shared across models. | Wait for the reset time, or add usage credits. |
| You’ve hit your Opus limit / Sonnet limit | Limit for that model family only. | Switch to a model outside that family with /model. |
| Server is temporarily limiting requests | Short-lived server throttle, unrelated to your plan. | Wait briefly and retry. |
| Request rejected (429) | Rate limit on your API key or cloud project. | Check credentials, limits, and concurrency. |
| You’ve hit your monthly spend limit | Usage-credit spend cap reached. | Raise it in settings, or ask an admin. |
| Usage credits required for 1M context | The plan includes the extended context window only through credits. | Switch to standard context with /model, or enable credits. |
Useful commands: /usage shows plan limits and reset times, and /usage-credits lets Pro and Max users buy extra usage or lets Team and Enterprise users request it from an admin.
A subtle point from the documentation is that switching models doesn’t restore access after a session or weekly limit, because those apply across models. Also, when an interactive session is signed in with a subscription, Claude Code can wait and continue after the reset, and you can turn automatic continue off in /config.
For 429s, run /status first, because a stray API key can send requests through a lower-tier key instead of your subscription.
Network, Proxy, and Certificate Problems
Error messages such as “Unable to connect to API,” “Connection refused,” “Socket is closed,” or “Streaming response ended before any complete data was received” can indicate a network communication problem between your computer and the API service.
Start troubleshooting in the following order:
- Check API connectivity: Verify that your machine can establish a connection to
api.anthropic.com, the hostname Anthropic identifies in its network troubleshooting guidance. - Check proxy settings: If you’re behind a proxy, set
HTTPS_PROXYandHTTP_PROXYbefore starting Claude Code. - Check certificates: For errors such as
unable to get local issuer certificate, setNODE_EXTRA_CA_CERTSto your corporate CA bundle. - Check the gateway: Find out whether a gateway cuts streams short or rewrites responses, since that can cause several streaming errors.
- Check cloud-session restrictions: For sessions in the cloud, a 403 with
host_not_allowedpoints to an allowlist restriction.
If it only fails on one network, compare against a direct connection to confirm whether a proxy is responsible.
Context and Request Errors
“Prompt Is Too Long”
This means the conversation exceeds the model’s context window. The recommended options are /compact, which summarizes the current context, and /clear, which resets the conversation.
If automatic compaction fails, a new session is the clean exit. A related warning appears in /context output when a configuration, such as a very large CLAUDE.md or heavy MCP token use, is consuming space. /doctor flags context-usage warnings of that kind.
Oversized Files and Unsupported Inputs
Messages like Request too large, Image was too large, PDF too large, PDF is password protected, and pdftoppm is not installed are input-side limits or missing dependencies.
Reduce or split the input, remove password protection, or install the missing tool.
Model Errors
| Model error | Possible explanation |
|---|---|
| “There’s an issue with the selected model” / “Model not found” | The model name may be invalid, discontinued, or unavailable for your account. |
| “Claude Opus is not available with the Claude Pro plan” | The requested model may fall outside the subscription’s available model options. |
| “Model … is restricted by your organization’s settings” | Your organization’s administrator has restricted model access. |
| “Claude Code … does not support this model; version … or newer is required” | Your installed Claude Code version needs an update. |
For the last error, updating Claude Code is the direct fix.
Feature-Level Problems: IDEs, MCP, and Permissions
IDE Integration
Public issue reports describe cases where /ide reports no available IDEs even though the extension is installed. Because behavior differs by version and environment, the practical advice is to confirm the extension is installed and running, launch Claude from the IDE’s integrated terminal, check the IDE’s output panel for errors, and run claude doctor.
If an error mentions the launcher, such as “Could not locate the Claude CLI on PATH,” the PATH fixes above apply.
MCP Servers
MCP-related messages usually involve sign-in or configuration. If the message “MCP server needs you to sign in again” appears, use /mcp to authenticate again.
A public issue also highlights a configuration trap: MCP settings can be accepted from multiple locations, so verify where your config lives and avoid copying files over ~/.claude.json, which holds authentication and project settings. When troubleshooting MCP, a backup before editing is cheap insurance.
Permission and Trust Warnings
Warnings such as “workspace has not been trusted” or messages about malformed permission rules mean Claude Code skipped some settings for safety or because they didn’t parse.
These are configuration issues, so the right place to look is your settings files, not the network.
How These Products Compare: Installation Methods
Different installation routes trade convenience for control. This table summarizes what the documentation says.
| Method | Platform | Notes from the documentation |
|---|---|---|
| Native installer (script) | macOS, Linux, Windows | Recommended route; places the launcher in a per-user directory. |
Homebrew cask claude-code | macOS | Tracks the stable channel and is typically about a week behind the latest release. |
Homebrew cask claude-code@latest | macOS | For the newest version. |
WinGet (Anthropic.ClaudeCode) | Windows | Useful when curl-based installs fail. |
| npm global package | Cross-platform | Works through a platform-specific optional dependency; has more failure modes. |
| Desktop app | macOS, Windows, Linux | Graphical alternative that avoids the terminal. |
Our Analysis: Patterns Worth Knowing
Reading across the official pages and public issue reports, a few patterns stand out. These are interpretations of public documentation, not measurements.
Most problems are environmental. PATH entries, shell configuration files, proxies, and old environment variables account for a large share of the documented fixes. The program is rarely the faulty piece.
Credential precedence is the quiet source of confusion. Because environment variables and helper scripts can outrank a saved login, the same account can behave differently in different shells. That explains why /status appears so often in the recommended steps.
Error messages have become more specific over time. The documentation repeatedly notes older versions with vaguer wording and newer versions that name the failure category. That is a reason to stay current: an update can turn an opaque message into a precise one.
One displayed failure notification can represent multiple retry attempts rather than a single unsuccessful request. Waiting a minute before changing settings is usually better than assuming a configuration fault.
Some restrictions imposed by an administrator cannot be overridden through local settings. Messages about organization policy are a signal to contact an administrator instead of reinstalling.
When You’re Still Stuck: Escalation Path
- Run
claude doctorfrom your normal shell. Addclaude --debugwhen you can reproduce the problem, to get more detail in the log. - Search GitHub issues for the exact message, and note your Claude Code version.
- Use
/feedbackinside a session to send the transcript and a description to Anthropic. It needs working authentication. - Open a GitHub issue with your OS, installation method, the exact command, and the full error text.
- Contact support for account-level problems such as login loops or an unrecognized subscription, through the “Get help” option after signing in.
A good bug report names the version, platform, what you expected, and what happened.
A Prevention Checklist
- Keep one installation, preferably the native one.
- Keep Claude Code updated, since newer versions often give clearer errors.
- Don’t leave old API keys in shell profiles or project
.envfiles. - Use
/statuswhenever you switch accounts, devices, or working environments. - Keep
CLAUDE.mdfiles and MCP settings concise to avoid consuming too much context. - Back up
~/.claude.jsonbefore manual edits. - Note which network you’re on when a problem appears.
Where Troubleshooting Is Heading
These are informed expectations from visible trends, not promises.
- More self-diagnosis:
claude doctorand/doctoralready cover installation, configuration, and context warnings, and the documentation points toward more checks. - Automation around limits: Features that wait for a usage reset and continue show a direction toward fewer manual restarts.
- Clearer error wording: Version notes in the documentation repeatedly show vague messages replaced with specific ones.
- More administrator-level controls: Organization policies for sign-in methods, models, and cloud sessions are growing, so more errors will be about policy than about software.
- Multiple surfaces, one engine: Because the CLI, Desktop app, and cloud sessions share the same core, fixes learned in one place tend to carry over.
Frequently Asked Questions (Claude Code not working – Common Errors and Fixes)
Q: Why Does Claude Code Say “Command Not Found” After I Installed It?
A: The installation directory usually isn’t on your PATH. Add ~/.local/bin (or %USERPROFILE%\.local\bin on Windows) to PATH, open a new terminal, and run claude --version.
Q: What Does claude doctor Actually Do?
A: It’s a read-only diagnostic of your installation. The output includes installation and version details, search-related information, configuration warnings, context-budget alerts, and macOS Keychain write-permission status.
Q: Why Am I Told My Credit Balance Is Too Low When I Have a Subscription?
A: A stray ANTHROPIC_API_KEY is likely routing requests through that key instead of your subscription. Run /status, unset the variable, remove it from your shell profile, and sign in with /login.
Q: Is a 529 Error My Fault?
A: No. It means the API is at capacity, and it doesn’t count against your usage quota. Check the status page, retry, or switch models.
Q: What’s the Difference Between a Session Limit and a Rate Limit?
A: A session or weekly limit is your plan’s usage allowance. A 429 “Request rejected” is a rate limit on your API key or cloud project. They need different fixes.
Q: Does Switching Models Help When I Hit a Session Limit?
A: No. Session and weekly limits apply across models. Model-specific limits, such as Opus or Sonnet, are different, and switching to another family can keep you working.
Q: Why Does Login Fail Over SSH or in WSL2?
A: The browser usually opens on a different machine from the one running Claude Code. Copy the OAuth URL, sign in on your local browser, and paste the code back, or use claude auth login.
Q: How Do I Fix “Prompt Is Too Long”?
A: Use /compact to summarize the conversation or /clear to start fresh. Check for oversized instruction files or heavy MCP usage consuming context.
Q: Can a Proxy Break Claude Code?
A: Yes. Proxies can block downloads, rewrite certificates, or hold streamed responses. Set the proxy variables, supply your corporate CA through NODE_EXTRA_CA_CERTS, and consider raising API_TIMEOUT_MS.
Q: Should I Install with npm or the Native Installer?
A: The documentation recommends the native installer. The npm route works but adds failure modes around optional dependencies, postinstall scripts, and permissions.
Q: Where Do I Report a Bug?
A: Use /feedback in a session for transcripts, or open a GitHub issue with your version, platform, command, and full error output.
Conclusion: Final Thoughts
When Claude Code not working, the fastest path is to classify the problem before changing anything. Check whether the binary launches, look at the diagnostic output, and confirm which credential is active. After that, most errors fall into a handful of buckets: PATH and installation, credential conflicts, server capacity, plan limits, and network paths.
Three habits pay off. First, treat claude --version, claude doctor, and /status as a standard opening move. Second, remember that environment variables can silently override your login, so stale keys are worth hunting down early. Third, give transient server errors a minute, because Claude Code may already have retried several times.
Anthropic’s documentation changes quickly, so use this guide as a map and the official pages as the source of truth. When an error falls outside the documented cases, the escalation procedure above helps direct the issue details to the people best equipped to handle them.
