Portrait of Michael Limberger

Michael Limberger

Need me? Email mike@limberger.ca

AI

Troubleshooting

When it seems stupid

Most common symptom: Claude Code forgets things, ignores files, or gives incomplete answers. Cause: 4K context, which is Ollama's default. Check with ollama ps and look at CONTEXT. If it is 4096, that is the problem. Create the Modelfile with num_ctx 32768, run ollama create qwen3-coder-32k, and point settings.json at that name.

Forgets mid-conversation: if /context is over 80%, you are out of room. Confirm CONTEXT is 32768, not 4096. Compact. For long sessions, Ctrl+D and start fresh. Cannot see a file it already read: the file was truncated out of context. Compact or start a new session. "I don't have access to that file" when the file exists: same story.

The wire, the login, the name

Cannot connect: is Ollama running (ps aux | grep ollama)? On macOS, open the app. On Linux, systemctl start. lsof -i :11434 should show *:11434 for network access, not localhost-only, if you are remote. From the workstation: curl http://YOUR_IP:11434/api/version. If that fails, it is network or firewall, not Claude Code. Allow port 11434. 404 on API calls: Ollama is older than 0.14.0, so update.

Keeps asking for login: on first launch you must select option 3 (3rd-party platform). Validate JSON with python3 -c "import json; json.load(open('$HOME/.claude/settings.json'))". ANTHROPIC_AUTH_TOKEN must be non-empty. Stuck at "Connecting to Anthropic": CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC is not working. It must be the string "1", not the number 1.

Model not found: run ollama list. The name must match exactly, including any :tag. Use the configured name, not the base. Pull until the download is complete. Gibberish: CONTEXT 4096 means you are on the base model, or /context is near 100%, or you are on a chat model instead of a coder. Timeouts: local is slow, so raise API_TIMEOUT_MS.

Most problems are the 4K default, a typo in the model name, or a timeout still set for cloud speeds. Fix those three and the rest gets quieter.