Troubleshooting
Troubleshooting
Ollama not running
SideCar auto-starts Ollama when it’s not running. If that fails:
- Verify Ollama is installed:
ollama --version - Ensure
ollamais in your PATH - Start it manually:
ollama serve - Check if another process is using port 11434
Model not found
If you get a “model not found” error:
- Use the model dropdown in SideCar to browse and install models
- Or pull the model manually:
ollama pull qwen3-coder:30b - Check available models:
ollama list
Connection errors
- Ollama: Verify
sidecar.baseUrlishttp://localhost:11434(the default) - Remote Ollama: If running on another machine, use
http://<ip>:11434and ensure the port is open - Firewall/proxy: Check that your firewall allows connections to the configured URL
- VPN: Some VPNs block localhost connections — try disconnecting
Anthropic API errors
| Error | Solution |
|---|---|
| 401 Unauthorized | Re-enter your key with SideCar: Set / Refresh API Key |
| 403 Forbidden | Verify your API key has the correct permissions |
| 404 Not Found | Check the model name (e.g., claude-sonnet-5-5, not claude-3-sonnet) |
| 429 Rate Limited | SideCar retries automatically with backoff. Wait a moment and try again |
| Base URL wrong | Set sidecar.baseUrl to exactly https://api.anthropic.com |
Chat-only models
Some models don’t support function calling:
gemma,gemma2llama2neural-chatstarling-lm
On the Ollama backend, SideCar auto-detects these and runs in chat-only mode. You’ll see a “Chat-Only” badge in the header. Chat still works, but the agent can’t use tools (read files, run commands, etc.). Other backends always send tool definitions, so a model without tool support fails agent requests there instead.
Switch to a tool-capable model such as gemma4:e4b (the default) or ministral-3 for full agentic features — see Model Compatibility.
Slow model loading
Large models (especially 30B+ parameters) can take 10–30 seconds to load into memory the first time. This is normal — Ollama needs to read the model weights from disk into RAM/VRAM.
What SideCar already does
SideCar pre-warms your configured model on activation. When you open VS Code, SideCar sends an empty request to Ollama in the background to load the model before you send your first message. You’ll see [SideCar] Pre-warmed model: <model> in the output console.
If pre-warming isn’t fast enough
If you want the model ready before you even open VS Code, you can load it at computer startup using a macOS Launch Agent.
Step 1: Create the plist file:
cat > ~/Library/LaunchAgents/com.sidecar.prewarm.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.sidecar.prewarm</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>-c</string>
<string>sleep 15 && /usr/bin/curl -s -o /dev/null http://localhost:11434/api/generate -d '{"model":"qwen3-coder:30b","prompt":"","keep_alive":"30m"}'</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/sidecar-prewarm.log</string>
<key>StandardErrorPath</key>
<string>/tmp/sidecar-prewarm.log</string>
</dict>
</plist>
EOF
Note: Replace
qwen3-coder:30bwith whichever model you have configured insidecar.model.
Step 2: Register it:
launchctl load ~/Library/LaunchAgents/com.sidecar.prewarm.plist
On every login, macOS will wait 15 seconds for Ollama to start, then load your model into memory. The model stays loaded for 30 minutes — plenty of time to open VS Code and start chatting.
To remove it:
launchctl unload ~/Library/LaunchAgents/com.sidecar.prewarm.plist
rm ~/Library/LaunchAgents/com.sidecar.prewarm.plist
Logs: Check /tmp/sidecar-prewarm.log if the warm-up isn’t working.
Other tips for faster loading
- Use a smaller model —
gemma2(5GB) loads in a few seconds vs.qwen3-coder:30b(18GB) - Keep models warm — SideCar sends
keep_alive: '30m'with every chat request, which overridesOLLAMA_KEEP_ALIVE, so a model stays loaded for 30 minutes after its last SideCar request; there is no setting for this. Keepsidecar.ollama.numCtxunchanged too: a differentnum_ctxmakes Ollama reload the model - SSD storage — NVMe SSDs load models significantly faster than HDDs
Request timeout
If SideCar shows “Request timed out waiting for the model”, the model didn’t respond within the timeout window. This usually means:
- Model is loading — large models (30B+) take time to load into memory. See Slow model loading above
- Prompt too large — the system prompt + workspace context exceeds what the model can handle. Try reducing
sidecar.maxFilesor disabling workspace context temporarily (sidecar.includeWorkspace: false) - Network issue — for remote backends, check your connection
Two settings govern the wait:
sidecar.firstTokenTimeout(default: 300 seconds) — how long to wait for the first token. This is the floor; large prompts get proportionally more time automatically. Raise it if a slow-loading model times out before it starts answering.sidecar.requestTimeout(default: 120 seconds) — the longest gap allowed between tokens once streaming has started. Set to0to disable it.
Agent loop not stopping
- Click the Stop button (red button that replaces Send during processing)
- Cycle detection — SideCar automatically halts if the agent repeats the same tool call with identical arguments
- Check
sidecar.agentMaxIterations(default: 50, or 150 for strong-tier models) andsidecar.agentMaxTokens(default: 200,000) - Lower these values if the agent runs too long on your hardware
Inline completions not working
- Enable them:
"sidecar.enableInlineCompletions": true - Make sure a model is running (check the model dropdown)
- Check that no other completion extension is conflicting (e.g., GitHub Copilot)
- Try a different model — not all models support FIM (Fill-in-the-Middle)
MCP server connection failed
- Verify the command and args in
sidecar.mcpServersare correct - Run the command manually to check for errors:
npx -y @modelcontextprotocol/server-filesystem /tmp - Check the “SideCar” output channel for connection logs
- Ensure
npx/nodeare in your PATH
Terminal error interception isn’t firing
SideCar’s terminal error watcher uses VS Code’s shell integration API. If the Diagnose in chat notification never appears when a command fails, check:
- Shell integration is active. Run
echo $VSCODE_SHELL_INTEGRATIONin your terminal — it should print1. If it’s empty, your shell isn’t integrated. POSIX shells (bash, zsh, fish) and PowerShell integrate automatically in recent VS Code versions; other shells may need manual setup. - Shell-integration events are available. SideCar requires VS Code 1.116+, so the shell-execution events (
onDidStartTerminalShellExecution/onDidEndTerminalShellExecution, added in 1.93) are always present — but the watcher still no-ops if shell integration itself is disabled in your terminal profile. - The setting is enabled. Check
sidecar.terminalErrorInterceptionin Settings — it defaults totruebut may have been toggled off. - The command isn’t being deduped. Identical command lines within a 30-second cooldown window only notify once. Wait 30s and try again, or run a different command.
- You’re not in SideCar’s own terminal. The terminal named
SideCaris skipped to avoid feedback loops from agent-driven shell commands. - The exit code was actually non-zero. Some commands that look like errors (e.g.,
grepreturning 1 when there are no matches) exit with specific non-zero codes that are intentional. These still trigger the notification — you can dismiss them or disable the feature if they’re too noisy.
Error cards
SideCar classifies errors and shows actionable cards:
| Error type | When you’ll see it | Card action |
|---|---|---|
| Connection | ECONNREFUSED, ENOTFOUND, network failures |
“Check Connection” — opens settings; plus “Retry” |
| Auth | 401, 403, “Invalid API key” | “Check API Key” — opens settings (use SideCar: Set / Refresh API Key to update via SecretStorage) |
| Model | 404 with “model not found” | “Install Model” — pulls the missing model |
| Rate limit | 429, “rate limit”, “too many requests” | “Retry” — resends the last message |
| Server error | 500, 502, 503, 504, “overloaded” | “Retry” |
| Content policy | Anthropic safety violations, “flagged” | (no action — refine your prompt) |
| Token limit | “token limit exceeded”, “too long”, “maximum tokens” | “Reduce Context” — try lowering sidecar.maxFiles or running /compact |
| Timeout | No first token within firstTokenTimeout, or a gap over requestTimeout |
“Retry” — resends the last message |
Click the action button on the error card to resolve common issues quickly.
Anthropic-specific tips
- Rate limit (429): Anthropic has per-minute and per-day token limits. SideCar automatically retries with exponential backoff. If you hit limits frequently, either upgrade your tier or set
sidecar.dailyBudgetto throttle yourself. - Server error (overloaded): Anthropic occasionally returns 529/overloaded during peak demand. Wait 30 seconds and retry, or switch to a different provider temporarily with ☰ menu → Backend or
SideCar: Switch Backend. (/modelchanges only the model name on the current backend.) - Token limit: Long conversations exceed the model’s context window. Use
/compactto summarize older turns, or clear the chat (Cmd+L/Ctrl+L) to start fresh.
Model returns empty responses
If the model responds with nothing (empty content, done immediately):
- Context too large — local models have a limited context window. SideCar clamps the requested window to the model’s per-model cap (up to 128K,
LOCAL_CONTEXT_CAP), and a large KV cache slows first-token latency badly on consumer hardware. Reducesidecar.maxFiles, unpin large files, or setsidecar.ollama.numCtxlower (e.g. 32768) - Tool definitions overwhelm the model — 80+ tool definitions add ~20K chars. Smaller models may not handle this well. Try a larger model or use chat-only mode
- Wrong model format — some models don’t support the chat template or tool format. Try a different model
vLLM: “EngineCore encountered an issue”
If an agent request against a vLLM server fails with EngineCore encountered an issue (or EngineCore encountered a fatal error) and the next requests get 502 or connection refused for several minutes, the server’s engine died and is reloading the model. The message carries no cause: vLLM only reports that it lost a GPU worker. A run that hits it is an infrastructure failure, not a model failure, so retry the task once the server is back.
The usual cause is the GPU worker being killed for using too much memory. Check where the kill is recorded:
- Multi-node (Ray): Ray’s memory monitor kills a worker once the node passes 95% memory. Look for
Killing 1 worker(s)andTop 10 memory usersinraylet.outunder/tmp/ray/session_*/logs/on the head node (inside the container, if vLLM runs in one). - Single node: the kernel OOM killer (
journalctl -k | grep -i oom).
Agent traffic triggers this where chat traffic doesn’t. Each turn resends a longer history, so the server sees many different prompt lengths, and PyTorch’s CUDA allocator keeps a new block for each one. Those blocks sit outside the --gpu-memory-utilization budget and are never released. On unified-memory machines such as DGX Spark, GPU memory is system RAM, so the growth eats the node’s headroom until the worker is killed, often within minutes of a SWE-bench run starting.
To fix it on the server:
- Set
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:Truein the environment of every process that holds a GPU. With Ray, that means each node’s Ray environment (for exampledocker run -e …on every container); setting it only onvllm servedoesn’t reach the Ray workers. On two DGX Sparks serving Nemotron 3 Super, this cut the growth over a 30-turn agent session from 3.3 GB to 0.1 GB. - Leave headroom. Prefill working memory still grows with prompt length, up to the
--max-num-batched-tokenschunk (about 4 GB per node at 16384). Keep free memory well above that under load; lower--gpu-memory-utilizationor--max-num-batched-tokensif it isn’t.
Getting help
- GitHub Issues — report bugs or request features
- VS Code Marketplace — reviews and ratings
- Email: sidecarai.vscode@gmail.com