Which coding agent harness works with your local model?

Enter your GPU or Mac memory and where you code. You get the harnesses that work with a local model that fits, the context to set, and the config hint. Every fit is checked at the context the harness actually needs.

Not sure? Import it
Platform
Where you code

Setups that fit (24–32 GB class)

Ordered by our reading: most memory headroom first, then the smaller system prompt, then pairings the harness’s own docs name. Not a quality benchmark.

  • Pi is a minimal, extensible open-source (MIT) coding agent for the terminal, with four core tools (read, write, edit, bash) and a very short system prompt. It has a built-in llama.cpp router integration and connects to Ollama, LM Studio and other OpenAI-compatible servers through ~/.pi/agent/models.json, which suits people who want a small prompt on a tight context budget.

    Models that fit your machine
    • Qwen3.8 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.8:27b
    • Qwen 3.6 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.6:27b
    • Devstral Small 2 24B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (20.7 GB of 24 GB usable)
      ollama pull devstral-small-2:24b
    • Qwen 3.6 35B-A3B · Q4_K_M · set context to at least 65,536 tokens · Tight (23.3 GB of 24 GB usable)
      ollama pull qwen3.6:35b-a3b
    How to set up Pi coding agent with a local model
    1. Install it (macOS / Linux):

      curl -fsSL https://pi.dev/install.sh | sh
    2. Start Ollama with a 64k context window (or set the context slider in the Ollama app's settings).

      OLLAMA_CONTEXT_LENGTH=64000 ollama serve
    3. In a second terminal, pull a tool-capable coding model (replace qwen3-coder:30b with any model you prefer).

      ollama pull qwen3-coder:30b
    4. Quickest path: let Ollama install Pi if needed, configure it and start a session.

      ollama launch pi
    5. Or add Ollama to Pi's models file yourself (the dummy key makes the model available; Ollama ignores it).

      ~/.pi/agent/models.json
      {
        "$schema": "https://pi.dev/schemas/models.schema.json",
        "providers": {
          "ollama": {
            "baseUrl": "http://localhost:11434/v1",
            "api": "openai-completions",
            "apiKey": "ollama",
            "models": [
              {
                "id": "qwen3-coder:30b"
              }
            ]
          }
        }
      }
    6. Make it the default provider and model.

      ~/.pi/agent/settings.json
      {
        "defaultProvider": "ollama",
        "defaultModel": "qwen3-coder:30b"
      }
    Other ways to install

    npm (Node.js 22.19+)

    npm install -g --ignore-scripts @earendil-works/pi-coding-agent

    Full Pi coding agent setup guide, with troubleshooting

  • OpenCodecliMCP

    OpenCode is an open-source (MIT) coding agent that runs in the terminal, with a desktop app and IDE extension also available. It talks to Ollama, LM Studio and llama-server through an OpenAI-compatible provider entry in opencode.json, which suits people who want a full-featured terminal agent on local models.

    Models that fit your machine
    • Qwen3.8 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.8:27b
    • Qwen 3.6 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.6:27b
    • Devstral Small 2 24B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (20.7 GB of 24 GB usable)
      ollama pull devstral-small-2:24b
    • Qwen 3.6 35B-A3B · Q4_K_M · set context to at least 65,536 tokens · Tight (23.3 GB of 24 GB usable)
      ollama pull qwen3.6:35b-a3b
    How to set up OpenCode with a local model
    1. Install it (macOS / Linux):

      curl -fsSL https://opencode.ai/install | bash
    2. Start Ollama with a 64k context window (or set the context slider in the Ollama app's settings).

      OLLAMA_CONTEXT_LENGTH=64000 ollama serve
    3. In a second terminal, pull a tool-capable coding model (replace qwen3-coder:30b with any model you prefer).

      ollama pull qwen3-coder:30b
    4. Quickest path: let Ollama configure and launch OpenCode for you.

      ollama launch opencode
    5. Or add Ollama as a provider in your global OpenCode config (replace qwen3-coder:30b with the model you pulled).

      ~/.config/opencode/opencode.json
      {
        "$schema": "https://opencode.ai/config.json",
        "provider": {
          "ollama": {
            "npm": "@ai-sdk/openai-compatible",
            "name": "Ollama (local)",
            "options": {
              "baseURL": "http://localhost:11434/v1"
            },
            "models": {
              "qwen3-coder:30b": {
                "name": "Qwen3-Coder 30B",
                "limit": {
                  "context": 64000,
                  "output": 8192
                }
              }
            }
          }
        }
      }
    6. Run OpenCode in your project and pick the model with /models.

      opencode
    Other ways to install

    npm

    npm install -g opencode-ai

    Homebrew

    brew install anomalyco/tap/opencode

    Full OpenCode setup guide, with troubleshooting

  • Qwen CodecliMCP

    Qwen Code is Alibaba's open-source (Apache-2.0) terminal coding agent, with VS Code, Zed and JetBrains integrations and an experimental web UI. Its docs show local servers such as Ollama and LM Studio configured as OpenAI-compatible providers in ~/.qwen/settings.json, which suits people already running Qwen-family models locally.

    Models that fit your machine
    • Qwen3.8 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.8:27b
    • Qwen 3.6 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.6:27b
    • Devstral Small 2 24B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (20.7 GB of 24 GB usable)
      ollama pull devstral-small-2:24b
    • Qwen 3.6 35B-A3B · Q4_K_M · set context to at least 65,536 tokens · Tight (23.3 GB of 24 GB usable)Named in its docs
      ollama pull qwen3.6:35b-a3b
    How to set up Qwen Code with a local model
    1. Install it (macOS / Linux):

      curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash
    2. Start Ollama with a 64k context window (or set the context slider in the Ollama app's settings).

      OLLAMA_CONTEXT_LENGTH=64000 ollama serve
    3. In a second terminal, pull a tool-capable coding model (replace qwen3-coder:30b with any model you prefer).

      ollama pull qwen3-coder:30b
    4. Add Ollama as an OpenAI-compatible provider in your user settings (replace qwen3-coder:30b with the model you pulled; the key is a placeholder Ollama ignores).

      ~/.qwen/settings.json
      {
        "env": {
          "OLLAMA_API_KEY": "ollama"
        },
        "modelProviders": {
          "openai": [
            {
              "id": "qwen3-coder:30b",
              "envKey": "OLLAMA_API_KEY",
              "baseUrl": "http://localhost:11434/v1",
              "generationConfig": {
                "contextWindowSize": 64000
              }
            }
          ]
        },
        "security": {
          "auth": {
            "selectedType": "openai"
          }
        },
        "model": {
          "name": "qwen3-coder:30b"
        }
      }
    5. Start Qwen Code in your project; switch models later with /model.

      qwen
    Other ways to install

    npm (Node.js 22+)

    npm install -g @qwen-code/qwen-code@latest

    Homebrew

    brew install qwen-code

    Full Qwen Code setup guide, with troubleshooting

  • Clinevscode-extension+cliMCP

    Cline is an open-source (Apache-2.0) coding agent that runs as an extension in VS Code, Cursor, Windsurf and JetBrains IDEs, with a separate terminal CLI. It has built-in Ollama and LM Studio providers and a Compact Prompt option for local inference, which suits people who want an agent inside their editor.

    Models that fit your machine
    • Qwen3.8 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.8:27b
    • Qwen 3.6 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.6:27b
    • Devstral Small 2 24B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (20.7 GB of 24 GB usable)
      ollama pull devstral-small-2:24b
    • Qwen 3.6 35B-A3B · Q4_K_M · set context to at least 65,536 tokens · Tight (23.3 GB of 24 GB usable)
      ollama pull qwen3.6:35b-a3b
    How to set up Cline with a local model
    1. Install it in VS Code: Extensions view → search "Cline" → Install.

    2. Start Ollama with a 32k context window (or set the context slider in the Ollama app's settings).

      OLLAMA_CONTEXT_LENGTH=32768 ollama serve
    3. In a second terminal, pull a tool-capable coding model (replace qwen3-coder:30b with any model you prefer).

      ollama pull qwen3-coder:30b
    4. In Cline Settings, set API Provider to Ollama and Base URL to http://localhost:11434.

    5. Select your model from the dropdown, or type it (e.g. qwen3-coder:30b).

    6. Set Context Window to at least 32K tokens in the same settings panel.

    7. Enable Use Compact Prompt under Settings → Features.

    Other ways to install

    JetBrains: Settings → Plugins → Marketplace → search "Cline" → Install

    CLI (npm, Node.js 20+)

    npm install -g cline

    Full Cline setup guide, with troubleshooting

  • Kilo Codevscode-extension+jetbrains+cliMCP

    Kilo Code is an open-source (MIT) coding agent for VS Code, JetBrains and the terminal; the Kilo CLI is a fork of OpenCode. It has Ollama and LM Studio providers configured in the settings UI or kilo.json, and its docs suggest a 24 GB+ GPU or a 32 GB+ Mac for local models.

    Models that fit your machine
    • Qwen3.8 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.8:27b
    • Qwen 3.6 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.6:27b
    • Devstral Small 2 24B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (20.7 GB of 24 GB usable)
      ollama pull devstral-small-2:24b
    • Qwen 3.6 35B-A3B · Q4_K_M · set context to at least 65,536 tokens · Tight (23.3 GB of 24 GB usable)
      ollama pull qwen3.6:35b-a3b
    How to set up Kilo Code with a local model
    1. Install it in VS Code: Extensions view → search "Kilo Code" → Install.

    2. Start Ollama with a 32k context window (or set the context slider in the Ollama app's settings).

      OLLAMA_CONTEXT_LENGTH=32768 ollama serve
    3. In a second terminal, pull Kilo's recommended model (replace it with any tool-capable model you prefer).

      ollama pull qwen3-coder:30b
    4. In the extension, open Settings → Providers and add Ollama (no API key needed).

    5. Set "Context Window Size (num_ctx)" to at least 32k in the provider settings.

    6. For the CLI (or a model missing from the picker), register the model in kilo.json with tool calling and its context limit.

      ~/.config/kilo/kilo.json
      {
        "model": "ollama/qwen3-coder:30b",
        "provider": {
          "ollama": {
            "models": {
              "qwen3-coder:30b": {
                "name": "Qwen3-Coder 30B",
                "tool_call": true,
                "limit": {
                  "context": 32768,
                  "output": 8192
                }
              }
            }
          }
        }
      }
    Other ways to install

    JetBrains: Settings → Plugins → search "Kilo Code" → Install

    CLI (npm)

    npm install -g @kilocode/cli

    CLI (macOS / Linux)

    curl -fsSL https://kilo.ai/cli/install | bash

    Full Kilo Code setup guide, with troubleshooting

  • Crush is Charm's terminal coding agent, with LSP integration and MCP support. It is configured with a crushrc file (Bash with Crush builtins) and auto-discovers models from Ollama, LM Studio and llama.cpp when you add them as providers. It suits terminal users who want a local model without writing a JSON provider config.

    Models that fit your machine
    • Qwen3.8 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.8:27b
    • Qwen 3.6 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.6:27b
    • Devstral Small 2 24B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (20.7 GB of 24 GB usable)
      ollama pull devstral-small-2:24b
    • Qwen 3.6 35B-A3B · Q4_K_M · set context to at least 65,536 tokens · Tight (23.3 GB of 24 GB usable)
      ollama pull qwen3.6:35b-a3b
    How to set up Crush with a local model
    1. Install it (Homebrew):

      brew install charmbracelet/tap/crush
    2. Pull a coding model that supports tool calling (replace qwen3-coder:30b with your choice).

      ollama pull qwen3-coder:30b
    3. Raise Ollama's context window (Ollama's docs ask for at least 64K for coding agents); or set the context slider in the Ollama app's Settings instead.

      OLLAMA_CONTEXT_LENGTH=64000 ollama serve
    4. Add Ollama as a provider in your crushrc; with no model list, Crush discovers your pulled models.

      ~/.config/crush/crushrc
      provider add ollama \
        --name Ollama \
        --type ollama \
        --base-url "http://localhost:11434/v1/"
    5. Optionally pin the model and tell Crush its context window (match the value Ollama serves).

      ~/.config/crush/crushrc
      model add ollama/qwen3-coder:30b \
        --name "Qwen3 Coder 30B" \
        --context-window 64000
    6. Run crush in your project and pick the Ollama model.

      crush
    Other ways to install

    npm

    npm install -g @charmland/crush

    Windows (winget)

    winget install charmbracelet.crush

    Go

    go install github.com/charmbracelet/crush@latest

    Full Crush setup guide, with troubleshooting

  • OpenHandsweb-ui+cli

    OpenHands is an open-source (MIT) coding agent with a web GUI that runs in Docker, plus a CLI. Its local-model guide connects it to LM Studio, Ollama, vLLM or SGLang through an OpenAI-compatible base URL. It suits users with at least a 24 GB GPU or a 64 GB Apple Silicon Mac, which is what the docs ask for to run their recommended Qwen3.6-35B-A3B.

    Models that fit your machine
    • Qwen3.8 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.8:27b
    • Qwen 3.6 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.6:27b
    • Devstral Small 2 24B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (20.7 GB of 24 GB usable)
      ollama pull devstral-small-2:24b
    • Qwen 3.6 35B-A3B · Q4_K_M · set context to at least 65,536 tokens · Tight (23.3 GB of 24 GB usable)Named in its docs
      ollama pull qwen3.6:35b-a3b
    How to set up OpenHands with a local model
    1. Install it (Web GUI (Docker, as in the local-LLM guide)):

      docker run -it --rm --pull=always \
          -e AGENT_SERVER_IMAGE_REPOSITORY=ghcr.io/openhands/agent-server \
          -e AGENT_SERVER_IMAGE_TAG=1.26.0-python \
          -e LOG_ALL_EVENTS=true \
          -v /var/run/docker.sock:/var/run/docker.sock \
          -v ~/.openhands:/.openhands \
          -p 3000:3000 \
          --add-host host.docker.internal:host-gateway \
          --name openhands-app \
          docker.openhands.dev/openhands/openhands:1.8
    2. Start Ollama with at least 22K context (32K here), listening on all interfaces so the Docker container can reach it, then pull the model (replace qwen3.6:35b-a3b if you want another).

      OLLAMA_CONTEXT_LENGTH=32768 OLLAMA_HOST=0.0.0.0:11434 OLLAMA_KEEP_ALIVE=-1 nohup ollama serve &
      ollama pull qwen3.6:35b-a3b
    3. Start the OpenHands web GUI with the Docker command above and open http://localhost:3000.

    4. In Settings, open the LLM tab, click "see advanced settings" and turn on the Advanced toggle.

    5. Set the custom model (openai/ plus the Ollama tag), the base URL and any placeholder API key, then Save Settings.

      Custom Model: openai/qwen3.6:35b-a3b
      Base URL:     http://host.docker.internal:11434/v1
      API Key:      local-llm
    Other ways to install

    CLI (uv)

    uv tool install openhands --python 3.12

    CLI (binary)

    curl -fsSL https://install.openhands.dev/install.sh | sh

    Full OpenHands setup guide, with troubleshooting

  • AidercliNo release since 2026-02-12

    Aider is an open-source (Apache-2.0) AI pair-programming tool for the terminal that edits files with text edit formats rather than native tool calls. It works with Ollama, LM Studio and any OpenAI-compatible server; development has slowed, with the last PyPI release (0.86.2) on 2026-02-12.

    Models that fit your machine
    • Qwen3.8 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.8:27b
    • Qwen 3.6 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.6:27b
    • Devstral Small 2 24B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (20.7 GB of 24 GB usable)
      ollama pull devstral-small-2:24b
    • Qwen 3.6 35B-A3B · Q4_K_M · set context to at least 65,536 tokens · Tight (23.3 GB of 24 GB usable)
      ollama pull qwen3.6:35b-a3b
    How to set up Aider with a local model
    1. Install it (macOS / Linux):

      curl -LsSf https://aider.chat/install.sh | sh
    2. Point aider at your Ollama server.

      export OLLAMA_API_BASE=http://127.0.0.1:11434
    3. Pull a model (replace qwen3-coder:30b with any model you prefer).

      ollama pull qwen3-coder:30b
    4. Start Ollama; aider's docs use an 8k default context here because aider sizes num_ctx per request itself.

      OLLAMA_CONTEXT_LENGTH=8192 ollama serve
    5. In another terminal, run aider from your project with the ollama_chat/ prefix.

      aider --model ollama_chat/qwen3-coder:30b
    6. Optional: pin a fixed context window instead of aider's per-request sizing.

      .aider.model.settings.yml
      - name: ollama_chat/qwen3-coder:30b
        extra_params:
          num_ctx: 65536
    Other ways to install

    pip

    python -m pip install aider-install && aider-install

    uv

    uv tool install --force --python python3.12 --with pip aider-chat@latest

    Full Aider setup guide, with troubleshooting

  • Goosecli+desktopMCP

    goose is a general-purpose open-source agent with a desktop app (macOS, Linux, Windows) and a CLI; coding is one use among many, and tools come from MCP extensions. It has built-in Ollama and LM Studio providers and can reach other local servers through its OpenAI provider. It suits people who want one agent for coding and non-coding tasks, with a model that handles tool calling well.

    Models that fit your machine
    • Qwen3.8 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.8:27b
    • Qwen 3.6 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.6:27b
    • Devstral Small 2 24B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (20.7 GB of 24 GB usable)
      ollama pull devstral-small-2:24b
    • Qwen 3.6 35B-A3B · Q4_K_M · set context to at least 65,536 tokens · Tight (23.3 GB of 24 GB usable)
      ollama pull qwen3.6:35b-a3b
    How to set up Goose with a local model
    1. Install it (CLI (macOS / Linux)):

      curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash
    2. Pull a model that supports tool calling (replace qwen3-coder:30b with your choice).

      ollama pull qwen3-coder:30b
    3. Raise Ollama's context window (goose's docs say the 4096-token default is too low for extensions; Ollama's docs ask for at least 64K for agents); or set the context slider in the Ollama app's Settings instead.

      OLLAMA_CONTEXT_LENGTH=64000 ollama serve
    4. Run the goose configurator and choose Configure Providers, then Ollama.

      goose configure
    5. Accept the host http://localhost:11434 and enter the model name you pulled.

      qwen3-coder:30b
    6. In goose Desktop instead: Settings, Configure Provider, Ollama, Configure; confirm API Host is http://localhost:11434 and Submit.

    Other ways to install

    CLI (Homebrew)

    brew install block-goose-cli

    Desktop (Homebrew, macOS)

    brew install --cask block-goose

    Full Goose setup guide, with troubleshooting

  • Zed's built-in agent runs inside the Zed editor (macOS, Linux, Windows) and can use local models from Ollama, LM Studio, llama.cpp or any OpenAI-compatible server. Zed discovers the models these servers expose. It suits developers who want an editor-native agent and have a model with reliable tool calling.

    Models that fit your machine
    • Qwen3.8 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.8:27b
    • Qwen 3.6 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.6:27b
    • Devstral Small 2 24B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (20.7 GB of 24 GB usable)
      ollama pull devstral-small-2:24b
    • Qwen 3.6 35B-A3B · Q4_K_M · set context to at least 65,536 tokens · Tight (23.3 GB of 24 GB usable)
      ollama pull qwen3.6:35b-a3b
    How to set up Zed agent with a local model
    1. Install it (macOS (Homebrew)):

      brew install --cask zed
    2. Pull a coding model that supports tool calling (replace qwen3-coder:30b with your choice).

      ollama pull qwen3-coder:30b
    3. Make sure the Ollama server is running: open Ollama.app on macOS, or run it from a shell.

      ollama serve
    4. Raise the context Zed requests. Zed sends num_ctx to Ollama and defaults to 4096, so set it in Zed rather than in Ollama.

      ~/.config/zed/settings.json
      {
        "language_models": {
          "ollama": {
            "context_window": 65536
          }
        }
      }
    5. In Zed, pick the Ollama model from the agent's model dropdown (or star icon, Configure, LLM Providers, Ollama, Connect).

    Other ways to install

    Linux

    curl -f https://zed.dev/install.sh | sh

    Windows (winget)

    winget install -e --id ZedIndustries.Zed

    Full Zed agent setup guide, with troubleshooting

  • Bring Your Own Key (BYOK) in VS Code lets the built-in chat and agent use models you supply, including local ones, without a Copilot plan or GitHub sign-in. Ollama is connected through the official Ollama extension, and other local servers through the Custom Endpoint provider. It suits VS Code users who want to keep the native chat UI; inline suggestions, semantic search and embeddings still need GitHub's service.

    Models that fit your machine
    • Qwen3.8 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.8:27b
    • Qwen 3.6 27B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (19.9 GB of 24 GB usable)
      ollama pull qwen3.6:27b
    • Devstral Small 2 24B · Q4_K_M · set context to at least 32,768 tokens · Comfortable (20.7 GB of 24 GB usable)
      ollama pull devstral-small-2:24b
    • Qwen 3.6 35B-A3B · Q4_K_M · set context to at least 65,536 tokens · Tight (23.3 GB of 24 GB usable)
      ollama pull qwen3.6:35b-a3b
    How to set up GitHub Copilot BYOK with a local model
    1. Install it (Ollama extension (VS Code CLI)):

      code --install-extension Ollama.ollama
    2. Install the official Ollama extension. The built-in Ollama provider in VS Code is deprecated.

      code --install-extension Ollama.ollama
    3. Pull a model that supports tool calling (replace qwen3-coder:30b with your choice).

      ollama pull qwen3-coder:30b
    4. Raise Ollama's context window (the Ollama VS Code guide asks for at least 64K); or set the context slider in the Ollama app's Settings instead.

      OLLAMA_CONTEXT_LENGTH=65536 ollama serve
    5. Reload the VS Code window, open Chat and choose the model from the Ollama section of the model picker.

    Full GitHub Copilot BYOK setup guide, with troubleshooting

  • Codex CLI is OpenAI's open-source (Apache-2.0) terminal coding agent. Its --oss mode runs against a local Ollama or LM Studio server, and Ollama can launch it with a ready-made profile; it suits people who want OpenAI's agent loop on a machine that can hold a 64k context.

    Models that fit your machine
    • Qwen3.8 27B · Q4_K_M · set context to at least 64,000 tokens · Tight (21.9 GB of 24 GB usable)
      ollama pull qwen3.8:27b
    • Qwen 3.6 27B · Q4_K_M · set context to at least 64,000 tokens · Tight (21.9 GB of 24 GB usable)
      ollama pull qwen3.6:27b
    • Qwen 3.6 35B-A3B · Q4_K_M · set context to at least 65,536 tokens · Tight (23.3 GB of 24 GB usable)Named in its docs
      ollama pull qwen3.6:35b-a3b
    How to set up Codex CLI with a local model
    1. Install it (macOS / Linux):

      curl -fsSL https://chatgpt.com/codex/install.sh | sh
    2. Start Ollama with a 64k context window (or set the context slider in the Ollama app's settings).

      OLLAMA_CONTEXT_LENGTH=64000 ollama serve
    3. In a second terminal, pull a tool-capable coding model (replace qwen3-coder:30b with any model you prefer).

      ollama pull qwen3-coder:30b
    4. Quickest path: let Ollama launch Codex with a dedicated profile; /model inside Codex switches between your installed tool-capable models.

      ollama launch codex
    5. Or run Codex in OSS mode against Ollama with a specific model.

      codex --oss -m qwen3-coder:30b
    6. Optionally make Ollama the default local provider for --oss.

      ~/.codex/config.toml
      oss_provider = "ollama"
    Other ways to install

    npm

    npm install -g @openai/codex

    Homebrew

    brew install --cask codex

    Full Codex CLI setup guide, with troubleshooting

  • Claude Code is Anthropic's proprietary terminal coding agent; pointed at a local server's Anthropic-compatible API, it runs against open-weight models. Ollama and LM Studio both document this setup, and it suits people already using Claude Code who have the memory for a 64k+ context.

    Models that fit your machine
    • Qwen3.8 27B · Q4_K_M · set context to at least 64,000 tokens · Tight (21.9 GB of 24 GB usable)
      ollama pull qwen3.8:27b
    • Qwen 3.6 27B · Q4_K_M · set context to at least 64,000 tokens · Tight (21.9 GB of 24 GB usable)
      ollama pull qwen3.6:27b
    • Qwen 3.6 35B-A3B · Q4_K_M · set context to at least 65,536 tokens · Tight (23.3 GB of 24 GB usable)Named in its docs
      ollama pull qwen3.6:35b-a3b
    How to set up Claude Code with a local model
    1. Install it (macOS / Linux):

      curl -fsSL https://claude.ai/install.sh | bash
    2. Start Ollama with a 64k context window (or set the context slider in the Ollama app's settings).

      OLLAMA_CONTEXT_LENGTH=64000 ollama serve
    3. In a second terminal, pull a tool-capable coding model (replace qwen3-coder:30b with any model you prefer).

      ollama pull qwen3-coder:30b
    4. Quickest path: let Ollama configure and launch Claude Code.

      ollama launch claude
    5. Or point Claude Code at Ollama's Anthropic-compatible API yourself.

      export ANTHROPIC_AUTH_TOKEN=ollama
      export ANTHROPIC_API_KEY=""
      export ANTHROPIC_BASE_URL=http://localhost:11434
    6. Tell Claude Code the real context window, since it assumes 200K for model IDs it doesn't recognize.

      export CLAUDE_CODE_MAX_CONTEXT_TOKENS=64000
    7. Run Claude Code with your local model.

      claude --model qwen3-coder:30b
    Other ways to install

    Windows (PowerShell)

    irm https://claude.ai/install.ps1 | iex

    Full Claude Code setup guide, with troubleshooting

All 16 harnesses compared

Click a column name to sort. Stars and versions carry their checked date on hover; system prompt sizes are community-measured.

TypeLicenceLocal backendsNeeds native tool callsMCPMin contextStatus
AidercliApache-2.0ollama, openai-compatibleNo———0.86.2 (2026-02-12)49.6kNo release since 2026-02-12
Claude Code (local backend)cliProprietaryollama, lmstudio, anthropic-compatibleYesYes64,00033,0002.1.303 (2026-10-18)—Active
Clinevscode-extension+cliApache-2.0ollama, lmstudio—Yes32,000—4.1.25 (extension); 3.0.73 (CLI) (2026-10-17)67.6kActive
Codex CLI (--oss)cliApache-2.0ollama, lmstudio, openai-compatibleYes—64,00025,4500.163.0 (2026-10-15)—Active
Crush (Charm)cliFSL-1.1-MITollama, lmstudio, openai-compatible—Yes——0.98.1 (2026-10-09)27.9kActive
GitHub Copilot BYOK (VS Code)vscode-chat—ollama, openai-compatible, anthropic-compatibleYes—————Active
Goosecli+desktop—ollama, ramalama, docker-model-runner, openai-compatibleYesYes————Active
Kilo Codevscode-extension+jetbrains+cliMITollama, lmstudioYesYes32,000—7.8.14 (extension); 7.8.12 (CLI) (2026-10-16)27.6kActive
OpenCodecliMITollama, lmstudio, llamacpp, vllm, openai-compatibleYesYes16,0007,0001.19.3 (2026-10-16)214.6kActive
OpenHandsweb-ui+cliMITollama, lmstudio, vllm, sglang, openai-compatible——22,000—1.11.0 (2026-07-09)—Active
Pi coding agentcliMITopenai-compatible, anthropic-compatible, ollama, lmstudio, llamacpp—Yes—6001.3.0 (2026-10-15)116.3kActive
Qwen CodecliApache-2.0ollama, vllm, openai-compatible—Yes——0.25.3 (2026-10-19)27.3kActive
Zed agentide—ollama, lmstudio, llamacpp, openai-compatibleYes—————Active

How it works

A harness’s system prompt and tool schemas eat context before you type anything, and Ollama’s default context is small on most GPUs. So each pairing is checked at an agent-sized context: the larger of the harness’s documented minimum and its system prompt plus 16,000 tokens, never below 32,768.

  1. Enter your VRAM (or unified memory on a Mac), your platform and where you code: VS Code, the terminal or JetBrains.
  2. The matrix picks candidate models for your memory tier and checks each one with the site’s fit rule at that harness’s context.
  3. Harnesses that need native tool calls only pair with models whose cards and Ollama listing both show tool calling.
  4. Copy the context setting and the config hint. Discontinued harnesses are hidden unless you ask for them.

Sources

Checked 2026-10-19.

Questions

Which harness wastes the least context on a local model?

Our reading of community measurements: Pi’s system prompt is about 600 tokens (an estimate), OpenCode’s about 7,000, Codex CLI’s about 25,450 by default and Claude Code’s about 33,000. On a local model every one of those tokens comes out of the context window before your code does.

Why does Claude Code need so much context with a local model?

Its system prompt and tool schemas measure about 33,000 tokens (community-measured), and Ollama’s guide for it recommends at least 64,000 tokens of context. That context costs memory, which is why it drops out first on smaller GPUs when the model’s cache is large.

Which coding agents are discontinued?

Roo Code shut down on 15 May 2026 and its repository is archived; Void was archived on 2 June 2026; Continue’s maintainers say it is no longer actively maintained (last release 2026-06-19). Aider still works but has had no release since 2026-02-12. The matrix hides discontinued tools unless you switch them on.

Why do tool calls fail when I use Ollama?

Usually the context is too small. Ollama picks its default context from your GPU memory — 4,096 tokens below about 24 GB — and a harness’s system prompt alone can be larger than that, so the tool definitions get cut off. Set OLLAMA_CONTEXT_LENGTH to the value shown for your pairing.

Do I need a model with native tool calling?

For most harnesses, yes: OpenCode, Codex CLI, Kilo Code, Claude Code, Goose, Zed and Copilot all drive the model through structured tool calls. Aider is the exception — it uses text edit formats, so it works with any model.

How is "fits" decided?

With the same rule every page on this site uses: weights at the chosen quant, the KV cache at the harness’s context and a fixed runtime overhead, compared with your usable memory. The matrix never prints a speed.