Troubleshooting

Troubleshooting

Ollama not running

SideCar auto-starts Ollama when it’s not running. If that fails:

  1. Verify Ollama is installed: ollama --version
  2. Ensure ollama is in your PATH
  3. Start it manually: ollama serve
  4. 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.baseUrl is http://localhost:11434 (the default)
  • Remote Ollama: If running on another machine, use http://<ip>:11434 and 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, gemma2
  • llama2
  • neural-chat
  • starling-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 &amp;&amp; /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:30b with whichever model you have configured in sidecar.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 overrides OLLAMA_KEEP_ALIVE, so a model stays loaded for 30 minutes after its last SideCar request; there is no setting for this. Keep sidecar.ollama.numCtx unchanged too: a different num_ctx makes 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.maxFiles or 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 to 0 to 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) and sidecar.agentMaxTokens (default: 200,000)
  • Lower these values if the agent runs too long on your hardware

Inline completions not working

  1. Enable them: "sidecar.enableInlineCompletions": true
  2. Make sure a model is running (check the model dropdown)
  3. Check that no other completion extension is conflicting (e.g., GitHub Copilot)
  4. Try a different model — not all models support FIM (Fill-in-the-Middle)

MCP server connection failed

  • Verify the command and args in sidecar.mcpServers are 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 / node are 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:

  1. Shell integration is active. Run echo $VSCODE_SHELL_INTEGRATION in your terminal — it should print 1. 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.
  2. 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.
  3. The setting is enabled. Check sidecar.terminalErrorInterception in Settings — it defaults to true but may have been toggled off.
  4. 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.
  5. You’re not in SideCar’s own terminal. The terminal named SideCar is skipped to avoid feedback loops from agent-driven shell commands.
  6. The exit code was actually non-zero. Some commands that look like errors (e.g., grep returning 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.dailyBudget to 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. (/model changes only the model name on the current backend.)
  • Token limit: Long conversations exceed the model’s context window. Use /compact to 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. Reduce sidecar.maxFiles, unpin large files, or set sidecar.ollama.numCtx lower (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) and Top 10 memory users in raylet.out under /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:

  1. Set PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True in the environment of every process that holds a GPU. With Ray, that means each node’s Ray environment (for example docker run -e … on every container); setting it only on vllm serve doesn’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.
  2. Leave headroom. Prefill working memory still grows with prompt length, up to the --max-num-batched-tokens chunk (about 4 GB per node at 16384). Keep free memory well above that under load; lower --gpu-memory-utilization or --max-num-batched-tokens if it isn’t.

Getting help