โ Frequently Asked Questions
Installation and Getting Startedโ
Q. I installed Claude Code, but the claude command is not found.โ
Your npm global install path is not on your PATH.
# Check the global prefix
npm config get prefix
# Add to ~/.bashrc or ~/.zshrc
export PATH="$PATH:$(npm config get prefix)/bin"
# Apply
source ~/.bashrc
Q. I get an error saying my Node.js version is incompatible.โ
Claude Code requires Node.js 18 or later.
node --version # Check your current version
# Upgrade with nvm
nvm install 20
nvm use 20
Q. I get a permission error on macOS.โ
To install without sudo, fix the ownership of the npm global directory.
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
npm install -g @anthropic-ai/claude-code
API Keysโ
Q. Where do I get an API key?โ
Go to console.anthropic.com โ API Keys. You need to sign up for an account and register a payment method.
Q. I set my API key but keep getting authentication errors (401).โ
- Check for leading/trailing whitespace in the key
- Check for typos in the
ANTHROPIC_API_KEYenvironment variable name - Verify in the dashboard that the key is in "active" status
- If it still fails, issue a new key and try again
Q. Can I share an API key with teammates?โ
Not recommended for security reasons. Have each person issue their own key, or split organization API keys by purpose. If a key leaks, deactivate it immediately and issue a new one.
Pricing and Costsโ
Q. How much does Claude Code cost?โ
Claude Code can be used in two ways:
- Subscription plans (Pro/Max/Team): usage included in a monthly flat fee
- API key: pay-as-you-go billing based on Anthropic API usage
Check current pricing on the Anthropic pricing page.
Q. I don't know how much I'll spend per month. Can I set a cap?โ
You can set a monthly spend limit (Usage Limit) in the Anthropic Console. Go to console.anthropic.com โ Settings โ Limits.
Q. Can I check how much I've spent so far during a session?โ
Type the /cost command during a Claude Code conversation to see the cumulative token usage and estimated cost for the current session.
Errors During Useโ
Q. I get a "Context window exceeded" error.โ
The context (conversation content) has exceeded the model's maximum length.
- Summarize the conversation with the
/compactcommand, or - Start fresh with
/clear - Storing key information in CLAUDE.md lets you keep context across new sessions
Q. Claude keeps repeating the same mistakes.โ
Add explicit "do not" rules to CLAUDE.md.
## Cautions
- Never modify `package-lock.json` manually
- Do not delete test files
- Do not include `console.log` debug code in commits
Q. I modified a file and want to revert it.โ
Files modified by Claude Code are tracked by git.
git diff # Review the changes
git restore . # Revert everything
git restore <file> # Revert a specific file only
Q. Claude stops responding mid-answer.โ
- This can happen when the network is unstable
- If the response is very long, break the task into smaller requests
- Run the
/doctorcommand to diagnose your installation and connection status
IDE Integrationโ
Q. I can't find the Claude Code extension in VS Code.โ
Search for "Claude Code" in the VS Code Extensions marketplace, or run claude in the terminal and choose the IDE integration option.
Q. Can I use it with JetBrains IDEs (IntelliJ, PyCharm, etc.)?โ
Install the Claude Code plugin from the JetBrains plugin marketplace. It connects with the same API key.
Agent SDKโ
Q. How do I use the Agent SDK?โ
The Agent SDK is a tool for running Claude Code programmatically. There are three ways to use it:
- CLI:
claude -p "prompt"(simplest) - Python SDK:
pip install claude-code, then call it from Python - TypeScript SDK: install the npm package, then call it from TypeScript
For details, see the official Agent SDK documentation.
Q. Does Claude Code need to be installed to run the Agent SDK?โ
Yes. The Agent SDK uses Claude Code's agentic loop. It is not a direct API call โ it controls Claude Code programmatically.
Q. Can I run multiple agents concurrently with a single API key?โ
Yes, you can. However, you may hit rate limits depending on the number of concurrent requests, so apply queuing if you run many agents.
Miscellaneousโ
Q. Who owns the copyright of code generated by Claude Code?โ
According to Anthropic's terms of service, ownership of the output you generate belongs to you. That said, always consult a legal professional on licensing matters.
Q. Can I use it offline?โ
Claude Code requires an internet connection to the Anthropic API. It cannot be used in fully offline environments.
Q. If I ask in Korean, does it answer in Korean?โ
Yes, Claude fully supports Korean. If you ask in Korean it answers in Korean, and adding Primary Language: Korean to CLAUDE.md makes responses more consistently Korean.
Q. Did the /review command disappear?โ
No, it's available again as a built-in command. As of v2.1.202, /review is back as a fast single-pass review, and multi-agent review has been split into a separate /code-review command:
/review <pr#> # Fast single-pass review
/code-review <level> <pr#> # Multi-agent review with a specified effort level
As of v2.1.215, Claude no longer runs /code-review (or /verify) on its own, so invoke them yourself when needed.
Q. What is Fast Mode?โ
A high-speed mode toggled with /fast. It runs the same model faster and is billed separately. It's well suited for live debugging or rapid iteration. You can disable it with CLAUDE_CODE_DISABLE_FAST_MODE=1.
Q. How do I diagnose my installation?โ
Run the /doctor command to automatically diagnose your Claude Code installation, configuration, and connection status.