Troubleshooting Guide
Your AI agent just stopped mid-task, spat out an error you have never seen, or started generating code that has nothing to do with your project. Before you open a GitHub issue, run through this page. Most problems have a quick fix.
Cursor Issues
Section titled “Cursor Issues”Installation and Setup
Section titled “Installation and Setup”Cursor will not start after installation
Section titled “Cursor will not start after installation”-
Verify system requirements: macOS 10.15+, Windows 10+, or 64-bit Linux. At least 4GB RAM (8GB recommended), 2GB free disk space.
-
Try safe mode:
Terminal window cursor --disable-extensions -
Reset user data (back up first):
- macOS:
~/Library/Application Support/Cursor - Windows:
%APPDATA%\Cursor - Linux:
~/.config/Cursor
- macOS:
-
Check for conflicts: Antivirus software, corporate proxies, and firewall rules can all block Cursor’s network access.
Cannot import VS Code settings
Section titled “Cannot import VS Code settings”Close VS Code completely before importing. If automatic import fails:
- In VS Code: File > Preferences > Profiles > Export
- In Cursor: File > Preferences > Profiles > Import
- Extensions, themes, keybindings, and settings all transfer
AI Feature Issues
Section titled “AI Feature Issues”Tab autocomplete not working
Section titled “Tab autocomplete not working”| Check | Action |
|---|---|
| Plan limits | Free tier: 2,000/month. Check Settings > Subscription > Usage |
| Indexing status | Settings > Features > Codebase Indexing. Click “Reindex” if stale |
| Model status | Visit status.cursor.sh for outage reports |
| File type | Some file types have limited support. Test in a .js or .py file |
| Extensions | Disable competing completion extensions (Copilot, Tabnine) |
Agent mode cannot modify files
Section titled “Agent mode cannot modify files”- Verify mode: The mode selector should show “Agent” (pencil icon), not “Ask”
- File permissions:
ls -la filename— ensure write access - Git locks: Remove stale locks with
rm .git/index.lock - Read-only flag: Some editors or OS settings mark files as read-only
”Context window exceeded” error
Section titled “”Context window exceeded” error”- Remove
@-mentioned files you do not strictly need - Use line ranges:
@large-file.ts:100-200instead of the whole file - Start a new chat with
/clearcontext
- Enable Max mode for the full 200K context window (costs more per request)
- Use Cmd/Ctrl+M to toggle between full-file and outline reading strategies
- Include specific symbols (
@UserClass) instead of entire files
”Rate limit exceeded” — fast requests exhausted
Section titled “”Rate limit exceeded” — fast requests exhausted”Your monthly fast request quota is spent. Options:
- Wait: Slow requests are unlimited but delayed
- Upgrade: Pro+ ($60/month) or Ultra ($200/month) for more
- Use your own API key: Settings > Models > API Keys (pay-per-use, no limits)
- Check usage: Settings > Subscription > Usage for exact numbers
Performance Issues
Section titled “Performance Issues”Cursor running slowly
Section titled “Cursor running slowly”- Disable unused extensions (View > Extensions)
- Add a
.cursorignorefile:node_modules/dist/.git/*.logcoverage/ - Clear cache: Cmd/Ctrl+Shift+P > “Clear Editor History”
- Close unused tabs and windows
- Restart Cursor
High memory usage
Section titled “High memory usage”Large codebases cause index bloat. Mitigations:
- Exclude large directories in
.cursorignore - Split monorepo workspaces into smaller Cursor windows
- Close editor tabs you are not actively using
- Disable features you do not use (e.g., semantic search for huge repos)
Claude Code Issues
Section titled “Claude Code Issues”Installation Problems
Section titled “Installation Problems””Command not found: claude”
Section titled “”Command not found: claude””npm uninstall -g @anthropic-ai/claude-codenpm install -g @anthropic-ai/claude-codenpm list -g @anthropic-ai/claude-code # verify# Add npm global bin to PATHexport PATH="$PATH:$(npm config get prefix)/bin"
# Make permanentecho 'export PATH="$PATH:$(npm config get prefix)/bin"' >> ~/.zshrcsource ~/.zshrcWindows: “Git not found” error
Section titled “Windows: “Git not found” error”Claude Code requires Git for Windows:
- Download from git-scm.com
- Install with “Add to PATH” checked
- Restart your terminal
- Verify:
git --version
Authentication Issues
Section titled “Authentication Issues”API key not working
Section titled “API key not working”- Key should start with
sk-ant-(no extra spaces or quotes) - Verify the key is active at console.anthropic.com
- Set it correctly:
Terminal window export ANTHROPIC_API_KEY="sk-ant-..." - Test:
claude "hello"— you should get a response - If using SSO: Use
/loginwithin the Claude Code REPL to re-authenticate
Usage Limits
Section titled “Usage Limits””Rate limit reached” after a few messages
Section titled “”Rate limit reached” after a few messages”Understanding the limits:
| Plan | Messages per 5-hour window |
|---|---|
| Pro ($20/month) | ~10-40 |
| Max 5x ($100/month) | ~50-200 |
| Max 20x ($200/month) | ~200-800 |
Mitigation strategies:
- Use
/compactto summarize before the window fills up - Use
/clearbetween unrelated tasks - Batch related questions: “1. Fix the auth bug 2. Add tests 3. Update the README”
- Check remaining quota with
/status - Consider API access for high-volume usage (pay per token, no window limits)
Execution Problems
Section titled “Execution Problems”Permission denied errors
Section titled “Permission denied errors”Configure specific permissions via /permissions or in .claude/settings.json. Pre-approve file editing, specific commands, or MCP tools.
claude --dangerously-skip-permissionsBest combined with Docker for safety:
docker run -v $(pwd):/app -w /app claude-code \ claude --dangerously-skip-permissions -p "fix all lint errors"Changes not being applied
Section titled “Changes not being applied”- Verify you are in the correct directory:
pwd - Check file paths — Claude uses paths relative to the working directory
- Look for Git locks:
rm .git/index.lock - Run
git statusandgit diffto see what actually changed - If editing failed silently, try the operation again with a more explicit prompt
Codex Issues
Section titled “Codex Issues”Installation and Setup
Section titled “Installation and Setup”Codex CLI not installing
Section titled “Codex CLI not installing”npm install -g @openai/codexcodex --versionIf permission errors occur:
sudo npm install -g @openai/codex # macOS/Linux# Or use nvm to manage Node without sudoAuthentication failing
Section titled “Authentication failing”- Verify your OpenAI API key is set:
Terminal window export OPENAI_API_KEY="sk-..." - Check the key is active at platform.openai.com/api-keys
- Ensure you have Codex access enabled on your plan
- Test:
codex "hello"— should respond without errors
Execution Problems
Section titled “Execution Problems”Worktree conflicts
Section titled “Worktree conflicts”Codex creates Git worktrees for each task. If a task fails mid-execution:
# List worktreesgit worktree list
# Remove stale worktreesgit worktree prune
# Force remove a specific worktreegit worktree remove /path/to/worktree --forceSandbox command failures
Section titled “Sandbox command failures”Codex sandboxes command execution by default. If commands fail:
- Check that the command is available in the sandbox environment
- Verify network access settings — sandboxes may block outbound network by default
- For commands needing network: configure sandbox to allow specific hosts
- For local-only commands: ensure all dependencies are available in the worktree
Cloud agent not responding
Section titled “Cloud agent not responding”- Check your internet connection
- Verify API key and plan status at platform.openai.com
- Check Codex service status at status.openai.com
- Try running the same task locally with
codexCLI to isolate the issue - Cloud agents may queue during peak usage — check the task status in the App
MCP Server Issues
Section titled “MCP Server Issues”Connection Problems
Section titled “Connection Problems”MCP server will not start
Section titled “MCP server will not start”-
Verify the package is installed:
Terminal window npx -y @modelcontextprotocol/server-github --help -
Check configuration (Claude Code example):
.mcp.json {"mcpServers": {"github": {"command": "npx","args": ["-y", "@modelcontextprotocol/server-github"],"env": {"GITHUB_TOKEN": "ghp_..."}}}} -
Debug mode:
Terminal window claude --debug # shows MCP connection details -
Check environment variables: Most MCP servers need tokens (GITHUB_TOKEN, DATABASE_URL, etc.)
MCP operations timing out
Section titled “MCP operations timing out”- Increase timeout in configuration (default is usually 10-30 seconds)
- Check if the external service (database, API) is responsive
- Verify network connectivity from your machine
- Some MCP servers have rate limits — check the server’s documentation
When the AI Keeps Making Basic Mistakes
Section titled “When the AI Keeps Making Basic Mistakes”| Symptom | Root Cause | Fix |
|---|---|---|
| AI suggests patterns that do not match your codebase | Missing project context | Cursor: /Generate Cursor Rules. Claude Code: /init. Codex: update AGENTS.md |
| AI re-implements existing features | No reference to existing code | Use @ references to include relevant files. Be explicit: “extend the existing auth module” |
| Responses are generic or low-quality | Wrong model or mode | Verify you are using Opus 4.6 / GPT-5.3-Codex. Enable Max mode for complex tasks |
| AI forgets requirements mid-task | Context overflow | Use /compact to summarize. Break large tasks into smaller conversations |
| Wrong library APIs or outdated patterns | No documentation access | Install Context7 MCP or use @web to fetch current docs |
| AI takes a completely wrong approach | Insufficient direction | End prompts with “Ask me questions before you start implementing” |
Common Error Messages
Section titled “Common Error Messages””Model is currently overloaded”
Section titled “”Model is currently overloaded””The AI provider’s servers are at capacity. Wait 1-2 minutes and retry. If persistent, switch to a different model temporarily or try during off-peak hours.
”Invalid API key”
Section titled “”Invalid API key””- Check that the key starts with the correct prefix (
sk-ant-for Anthropic,sk-for OpenAI) - Ensure no extra whitespace or quotes
- Verify the key has not been revoked at the provider’s dashboard
- Confirm you are using the right key for the right service
”Context length exceeded”
Section titled “”Context length exceeded””The conversation plus file content exceeds the model’s context window. Reduce input: remove unnecessary files, use /compact, or split the task.
”File not found”
Section titled “”File not found””- Wrong working directory (
pwdto check) - Typo in filename
- File deleted or moved
- Case sensitivity (Linux and macOS file systems are case-sensitive by default)
Recovery Procedures
Section titled “Recovery Procedures”Lost code changes
Section titled “Lost code changes”Prevention (always do this before large AI operations):
git add -A && git commit -m "WIP: checkpoint before AI changes"Recovery options:
- Cursor checkpoints: Use the revert button in chat
- Git reflog:
git reflogshows every HEAD change, even uncommitted - Local history: Cursor/VS Code maintain a local file history per file
- OS-level recovery: Time Machine (macOS), File History (Windows)
Corrupted chat history
Section titled “Corrupted chat history”- Export the current chat if possible
- Clear the problematic data:
- Cursor: Delete
~/.cursor/chats/ - Claude Code: Start a new session (old sessions remain accessible via
claude -r)
- Cursor: Delete
- Restart the tool
Built-in Diagnostics
Section titled “Built-in Diagnostics”- Help > Toggle Developer Tools (check Console for errors)
- Cmd/Ctrl+Shift+P > “Cursor: Show Logs”
- Copy diagnostics output when reporting bugs
/doctor # full health check/status # system and quota status/help # available commandsclaude --versioncodex --versioncodex "What is my current configuration?" # verify setupGetting Help
Section titled “Getting Help”Support Channels
Section titled “Support Channels”| Tool | Community | Official |
|---|---|---|
| Cursor | Forum, Discord | In-app feedback, enterprise support |
| Claude Code | Discord, GitHub Issues | support@anthropic.com, enterprise channels |
| Codex | Community, GitHub Issues | help.openai.com, enterprise support |
Preventive Measures
Section titled “Preventive Measures”- Update regularly: New releases often fix the exact bug you are experiencing
- Back up configurations: Copy
.cursor/,.claude/, andAGENTS.mdbefore major updates - Monitor usage: Check quotas and costs weekly
- Use version control: Commit before large AI operations. Use branches for experiments
- Keep context focused:
/clearor new chat between unrelated tasks