🐢

Why is Claude Code Responding Slowly?

Troubleshoot slow response times from Claude Code CLI. Learn what causes delays and how to speed things up.

SpeedPerformanceLatency
Quick Command
$ claude-trace

!The Problem

Claude Code takes a long time to respond to prompts, with noticeable delays between sending a message and receiving a response.

?Common Causes

  • Network latency to Anthropic's API servers
  • Large context from long conversation history
  • Many files being analyzed or included
  • Local resource contention from other Claude sessions
  • System memory pressure causing swap usage
  • Rate limiting from API

🔍How to Diagnose

First, rule out local resource issues:

```bash
# Check if Claude is CPU or memory bound locally
claude-trace -v

# Look at system-wide pressure
memory_pressure
```

If local resources look fine, the issue is likely network or API-related.

Solution

1. **Reduce local resource contention**:
   - Kill unused Claude sessions with Claude Trace
   - Close other heavy applications

2. **Reduce context size**:
   - Start a new conversation
   - Use more focused prompts
   - Reference specific files instead of entire directories

3. **Check your connection**:
   - Try a different network
   - Check Anthropic status page

4. **Optimize file includes**:
   - Use `.claudeignore` to exclude unnecessary files
   - Be specific about which files to analyze

🛡Prevention

- Keep conversation contexts focused and restart when they get long
- Maintain a `.claudeignore` file in all projects
- Use Claude Trace to ensure you're not running excessive sessions
- Close Claude sessions you're not actively using

Monitor Claude Code in Real-Time

Get Claude Trace for instant visibility into every Claude process.

Get Claude Trace