Claude Code FAQ
How to use TokenFlow in the VS Code CC extension
- Make sure you have completed the Environment Check and that your Claude Code CLI is working. If something is wrong, configure it following the guide first.
- Press
Win + R, type the following and press Enter to open the Claude Code config directory:
%userprofile%\.claude
- The directory contents look like the image below. If there is no
config.json, create it manually and open it.config.json: configures some behavior of the Claude Code extension for VS Code.

- Write the following into
config.jsonand save:
json
{ "primaryApiKey": "TokenFlow" }- Restart VS Code and enjoy!
Common Claude Code commands
| Command | Description |
|---|---|
claude | Start an interactive REPL in the current directory and use Claude Code conversationally. |
claude "explain this project" | Start the REPL with an initial question, so Claude analyzes the project on entry. |
claude -p "explain this function" | Use print mode for a one-off Q&A: output the result and exit, handy for scripts / CI. |
cat logs.txt | claude -p "summarize the errors" | Pipe a file or command output into Claude, then use -p to summarize or analyze. |
claude -c | Continue the most recent session in the current directory, picking up the existing context. |
claude -c -p "check type errors" | Run a one-off request in the most recent session context, often used for automated checks. |
claude -r "abc123" "finish this PR" | Resume a specific session by session ID and continue with a new task. |
claude update | Update the Claude Code CLI to the latest version. |
claude mcp | Manage and configure MCP servers so Claude can access external data sources and tools. |
claude --add-dir ../apps ../lib | Add extra code directories Claude can access, supporting reads across multiple paths. |
claude --agents '{"reviewer":{...}}' | Temporarily define sub-agents via JSON, such as code-reviewer, debugger, etc. |
claude -p "generate API docs" --output-format json | Output the answer in JSON format for easier parsing by scripts. |
claude --model sonnet | Specify the model for the session (e.g. sonnet / opus or a specific model name). |
claude --verbose | Enable verbose logging to show tool calls and internal steps, useful for debugging. |
claude --resume abc123 "keep fixing this bug" | Resume a session by session ID and continue previous work from any directory. |
claude --continue | Load the most recent session in the current directory — equivalent to "continue last conversation". |
claude --append-system-prompt "always use TypeScript" | Append custom rules after the default system prompt without changing default behavior. |
claude --dangerously-skip-permissions | Skip permission prompts so Claude automatically reads/writes files and runs commands (high risk, use only in fully trusted environments). |
Claude Code cannot connect to Anthropic services
Note
If this is your first setup and you were redirected here from a link, just follow the commands below.
After installing claude with npm, running claude in the terminal reports an error like this:
Unable to connect to Anthropic services
Failed to connect to api.anthropic.com: ERR BAD REQUEST
Please check your internet connection and network settings.
Note: Claude Code might not be available in your country, Check supported countries at https://anthropic.com/supported-countriesOr you run into the following issues during your first setup.



- Press
Win + R, typecmdand press Enter to open the command line. - Run the following command and press Enter:
bash
powershell -Command "$f='%USERPROFILE%\.claude.json';$j=Get-Content $f|ConvertFrom-Json;$j|Add-Member -NotePropertyName 'hasCompletedOnboarding' -NotePropertyValue $true -Force;$j|ConvertTo-Json|Set-Content $f"- Restart your Claude CLI.
How to switch Claude Code back to 200K context and disable non-essential traffic
If you want to switch Claude Code from 1M context back to 200K context, and turn off some non-essential requests and terminal title changes, add the following to the env section of settings.json.
- Press
Win + R, type the following and press Enter:
%userprofile%\.claude- Open or create
settings.json. - Make sure
envcontains the following:
json
{
"env": {
"CLAUDE_CODE_DISABLE_1M_CONTEXT": "1",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"CLAUDE_CODE_DISABLE_TERMINAL_TITLE": "1"
}
}