Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

31.1 KB
Raw Blame
<!doctype html>
<html lang="en">
<head>
<!-- Google tag (gtag.js), Google Ads AW-18388216863. Loaded only when Do Not Track is
     off, so it follows the same rule as the PostHog block on this site. -->
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){ dataLayer.push(arguments); }
  if (navigator.doNotTrack !== '1') {
    var gtagScript = document.createElement('script');
    gtagScript.async = true;
    gtagScript.src = 'https://www.googletagmanager.com/gtag/js?id=AW-18388216863';
    document.head.appendChild(gtagScript);
    gtag('js', new Date());
    gtag('config', 'AW-18388216863');
  }
</script>

<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Ollama With Claude Code: Set It Up in One Command</title>
<meta name="description" content="Yes, Claude Code can run on Ollama. Run ollama launch claude or set three environment variables, give the model 64K of context, and see what stops working." />
<link rel="canonical" href="https://munderdiffl.in/blog/how-to-connect-ollama-to-claude-code/" />

<link rel="icon" type="image/png" href="https://munderdiffl.in/logo.png" />
<link rel="apple-touch-icon" href="https://munderdiffl.in/logo.png" />
<meta name="theme-color" content="#F5F2E8" />

<!-- Open Graph -->
<meta property="og:site_name" content="Munder Difflin Blog" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Ollama With Claude Code: Set It Up in One Command" />
<meta property="og:description" content="Yes, Claude Code can run on Ollama. Run ollama launch claude or set three environment variables, give the model 64K of context, and see what stops working." />
<meta property="og:url" content="https://munderdiffl.in/blog/how-to-connect-ollama-to-claude-code/" />
<meta property="og:image" content="https://munderdiffl.in/blog/assets/media/how-to-connect-ollama-to-claude-code/hero.png" />
<meta property="og:image:width" content="1600" />
<meta property="og:image:height" content="900" />
<meta property="og:image:alt" content="Illustration: How to Connect Ollama to Claude Code" />
<meta property="og:locale" content="en_US" />
<meta property="article:published_time" content="2026-09-14T00:00:00.000Z" />
<meta property="article:author" content="Chaitanya Giri" />
<meta property="article:tag" content="Guides" />
<meta property="article:tag" content="Claude Code" />
<meta property="article:tag" content="Ollama" />
<meta property="article:tag" content="Local-First" />
<meta property="article:tag" content="Open Source" />


<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Ollama With Claude Code: Set It Up in One Command" />
<meta name="twitter:description" content="Yes, Claude Code can run on Ollama. Run ollama launch claude or set three environment variables, give the model 64K of context, and see what stops working." />
<meta name="twitter:image" content="https://munderdiffl.in/blog/assets/media/how-to-connect-ollama-to-claude-code/hero.png" />
<meta name="twitter:image:alt" content="Illustration: How to Connect Ollama to Claude Code" />

<link rel="alternate" type="application/atom+xml" title="Munder Difflin Blog" href="https://munderdiffl.in/blog/feed.xml" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,[email protected],500;9..144,600;9..144,700;9..144,900&amp;family=Source+Serif+4:opsz,[email protected],400;8..60,600;8..60,700&amp;family=Space+Grotesk:wght@500;600;700&amp;family=JetBrains+Mono:wght@400;600&amp;display=swap" rel="stylesheet" />
<link rel="stylesheet" href="/blog/assets/blog-press.css" />

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "How to Connect Ollama to Claude Code",
  "description": "Yes, Claude Code can run on Ollama. Run ollama launch claude or set three environment variables, give the model 64K of context, and see what stops working.",
  "image": ["https://munderdiffl.in/blog/assets/media/how-to-connect-ollama-to-claude-code/hero.png"],
  "datePublished": "2026-09-14T00:00:00.000Z",
  "dateModified": "2026-09-14T00:00:00.000Z",
  "author": { "@type": "Person", "name": "Chaitanya Giri" },
  "publisher": {
    "@type": "Organization",
    "name": "Munder Difflin",
    "logo": { "@type": "ImageObject", "url": "https://munderdiffl.in/logo.png" }
  },
  "mainEntityOfPage": { "@type": "WebPage", "@id": "https://munderdiffl.in/blog/how-to-connect-ollama-to-claude-code/" },
  "keywords": "how to connect ollama to claude code, ollama claude code setup, ollama launch claude, can claude code use ollama models, ollama claude code models, is claude code with ollama free, ollama launch claude not working",
  "articleSection": "Guides",
  "inLanguage": "en-US",
  "url": "https://munderdiffl.in/blog/how-to-connect-ollama-to-claude-code/"
}
</script>
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    { "@type": "ListItem", "position": 1, "name": "Home", "item": "https://munderdiffl.in/" },
    { "@type": "ListItem", "position": 2, "name": "Blog", "item": "https://munderdiffl.in/blog/" },
    { "@type": "ListItem", "position": 3, "name": "How to Connect Ollama to Claude Code", "item": "https://munderdiffl.in/blog/how-to-connect-ollama-to-claude-code/" }
  ]
}
</script>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    { "@type": "Question", "name": "Is Claude Code with Ollama free?", "acceptedAnswer": { "@type": "Answer", "text": "With a local model, yes. Ollama accepts the token without validating it, and while ANTHROPIC_AUTH_TOKEN is set Claude Code does not use your claude.ai subscription, so nothing in that session is billed by Anthropic. You pay in hardware and electricity instead." } },
    { "@type": "Question", "name": "Can I use Ollama cloud models with Claude Code?", "acceptedAnswer": { "@type": "Answer", "text": "Yes, with an ollama.com account: run ollama signin first. Cloud tags such as kimi-k2.7-code:cloud and glm-5.1:cloud need no download and run at full context, but each model's library page lists a per token cost, and your prompts and code are processed on Ollama's servers." } },
    { "@type": "Question", "name": "How do I use Ollama with the Claude Code extension in VS Code?", "acceptedAnswer": { "@type": "Answer", "text": "Put ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN in claudeCode.environmentVariables in your VS Code user settings JSON. Anthropic's gateway docs say the extension checks credentials from that setting before it starts, while values in ~/.claude/settings.json reach the process but not that login check." } },
    { "@type": "Question", "name": "Can Munder Difflin run Claude Code agents on Ollama?", "acceptedAnswer": { "@type": "Answer", "text": "Not as a built in setting in 0.5.2. Its local Ollama model picks are for OpenCode, Crush and Pi agents, and Claude Code agents keep using their own Claude login. You still pull the model yourself. OpenCode and Crush need your Ollama address in Settings, AI Engines, and Pi reads your `~/.pi/agent/models.json`." } },
    { "@type": "Question", "name": "What context length does Claude Code need on Ollama?", "acceptedAnswer": { "@type": "Answer", "text": "Ollama's docs say coding tools should get at least 64,000 tokens, and under 24 GiB of VRAM the default is only 4k. Start the server with OLLAMA_CONTEXT_LENGTH=64000, then set CLAUDE_CODE_MAX_CONTEXT_TOKENS to the same number, because Claude Code otherwise assumes a 200K window for a model it does not recognize." } }
    
  ]
}
</script>


<script>
  // Anonymous blog analytics (PostHog) — same posture as the main site and the
  // app's TELEMETRY.md: public write-only token ('' = inert), anonymous-only
  // (person_profiles 'never'), no autocapture/recording, DNT respected.
  (function () {
    var PH_KEY = 'phc_qJzsokwcbtTGHemnvywR3nSqivNNgMjHeNVEWkZNydFB';
    if (!PH_KEY || navigator.doNotTrack === '1') return;
    var s = document.createElement('script');
    s.async = true;
    s.src = 'https://us-assets.i.posthog.com/static/array.js';
    s.onload = function () {
      if (!window.posthog) return;
      window.posthog.init(PH_KEY, {
        api_host: 'https://us.i.posthog.com',
        person_profiles: 'never',
        autocapture: false,
        before_send: function (event) {
          // PostHog fills $ip from the connection unless the event carries one.
          // Null it here and disable the GeoIP lookup so no IP, city, postal
          // code or lat/long is ever derived or stored for this page view.
          if (event && event.properties) {
            event.properties.$ip = null;
            event.properties.$geoip_disable = true;
          }
          return event;
        },
        disable_session_recording: true,
        respect_dnt: true
      });
    };
    document.head.appendChild(s);
  })();
</script>
</head>
<body class="theme-press">
<a class="skip-link" href="#main">Skip to content</a>
<nav id="nav">
  <a class="brand" href="https://munderdiffl.in" aria-label="Munder Difflin home">
    <img class="brand-logo" src="https://munderdiffl.in/logo.png" width="1318" height="840" alt="Munder Difflin, Inc. — Multi-Agent Harness" />
  </a>
  <span class="spacer"></span>
  <div class="links">
    <a href="/blog/">Latest</a>
    <a href="/blog/topics/">Topics</a>
    <a href="/blog/about/">About</a>
    <a href="https://munderdiffl.in">↗ Product</a>
  </div>
  <div class="nav-actions">
    <a class="btn sm" href="https://munderdiffl.in/blog/feed.xml" aria-label="RSS feed">⤵ RSS</a>
    <a class="btn sm primary" href="https://munderdiffl.in/#install">⤓ Download</a>
  </div>
</nav>

<main id="main">

<article class="t-guides">
  <header class="post-head wrap">
    <nav class="crumbs" aria-label="Breadcrumb">
      <a href="/blog/">Blog</a>
      <span>/</span>
      <a href="/blog/topics/guides/">Guides</a>
    </nav>
    <h1>How to Connect Ollama to Claude Code</h1>
    <p class="dek">Yes, Claude Code can run on Ollama. Run ollama launch claude or set three environment variables, give the model 64K of context, and see what stops working.</p>
    <div class="byline">
      <span class="av" aria-hidden="true">MD</span>
      <strong>Chaitanya Giri</strong>
      <span class="dot" aria-hidden="true">·</span>
      <time datetime="2026-09-14">Sep 14, 2026</time>
      <span class="dot" aria-hidden="true">·</span>
      <span>5 min read</span>
      <span class="tag kind">Guides</span>
    </div>
  </header>

  <div class="hero-wrap wrap"><figure class="fig fig-hero"><img src="/blog/assets/media/how-to-connect-ollama-to-claude-code/hero.png" alt="Illustration: How to Connect Ollama to Claude Code" loading="lazy" decoding="async" /></figure></div>

  <div class="post-wrap wrap">
    <div class="prose">
      <p>Install Ollama 0.15.0 or newer and run <code>ollama launch claude</code>: it asks for a model, configures Claude Code and starts it. By hand, on Ollama 0.14.0 or newer, set <code>ANTHROPIC_BASE_URL=http://localhost:11434</code>, <code>ANTHROPIC_AUTH_TOKEN=ollama</code> and an empty <code>ANTHROPIC_API_KEY</code>, then run <code>claude --model qwen3-coder</code> or another Ollama tag.</p>
<p>That gives you one Claude Code session on a local model. If you want local models working next to Claude Code rather than instead of it, you can wire each agent by hand, or use <a href="https://harnessmd.com/download">Munder Difflin</a>, a free and open source desktop app that runs a floor of CLI agents on your machine. As of 0.5.2, its Add agent screen lists eight local Ollama models for OpenCode, Crush and Pi agents, alongside Claude Code agents on your normal Claude login. Picking one sets the model name only: you still pull the weights (the tooltip shows the <code>ollama pull</code> command), OpenCode and Crush need your Ollama address in Settings, AI Engines, and Pi agents read your <code>~/.pi/agent/models.json</code>. Claude Code agents get no Ollama setting, so for those, use the steps below.</p>
<p>If you are here because a Pro or Max plan keeps running dry rather than for privacy, <a href="/blog/claude-code-max-plan-tips/">getting more out of a Claude Code Max plan</a> may fix it without changing models.</p>
<h2 id="can-claude-code-use-ollama-models" tabindex="-1">Can Claude Code use Ollama models? <a class="anchor" href="#can-claude-code-use-ollama-models" aria-hidden="true">#</a></h2>
<p>Yes, because Ollama speaks the API Claude Code expects. Ollama 0.14.0, released in January 2026, added the Anthropic Messages endpoint, <code>/v1/messages</code>, and Ollama documents the setup on its <a href="https://docs.ollama.com/integrations/claude-code">Claude Code integration page</a>.</p>
<p>Anthropic does not back it: its <a href="https://code.claude.com/docs/en/llm-gateway">LLM gateway docs</a> say it “doesn’t support routing Claude Code to non-Claude models through any gateway.”</p>
<h2 id="what-does-ollama-launch-claude-do" tabindex="-1">What does ollama launch claude do? <a class="anchor" href="#what-does-ollama-launch-claude-do" aria-hidden="true">#</a></h2>
<p>It does the wiring for you. Added in Ollama 0.15.0, it lets you pick a model, configures Claude Code and starts a session. Per Ollama’s release notes, 0.15.6 made it download missing models and 0.30.11 made it install Claude Code when absent.</p>
<pre class="language-bash"><code class="language-bash">ollama launch claude                       <span class="token comment"># choose a model, then start</span>
ollama launch claude <span class="token parameter variable">--model</span> qwen3-coder   <span class="token comment"># name the model up front</span></code></pre>
<p>For scripts and CI, Ollama 0.18.0 added <code>--yes</code>, which skips every prompt and requires <code>--model</code>.</p>
<h2 id="how-do-you-connect-claude-code-to-ollama-by-hand" tabindex="-1">How do you connect Claude Code to Ollama by hand? <a class="anchor" href="#how-do-you-connect-claude-code-to-ollama-by-hand" aria-hidden="true">#</a></h2>
<p>Set three environment variables and name the model. This is the manual route from Ollama’s docs:</p>
<pre class="language-bash"><code class="language-bash"><span class="token builtin class-name">export</span> <span class="token assign-left variable">ANTHROPIC_BASE_URL</span><span class="token operator">=</span>http://localhost:11434
<span class="token builtin class-name">export</span> <span class="token assign-left variable">ANTHROPIC_AUTH_TOKEN</span><span class="token operator">=</span>ollama
<span class="token builtin class-name">export</span> <span class="token assign-left variable">ANTHROPIC_API_KEY</span><span class="token operator">=</span><span class="token string">""</span>
claude <span class="token parameter variable">--model</span> qwen3-coder</code></pre>
<p>Each line has a job. <code>ANTHROPIC_BASE_URL</code> replaces Anthropic’s endpoint, with no <code>/v1</code> on the end, unlike the OpenAI compatible URL that OpenCode uses. <code>ANTHROPIC_AUTH_TOKEN</code> becomes the bearer token, which Ollama requires but ignores. The empty <code>ANTHROPIC_API_KEY</code> matters: Claude Code’s environment variable reference says a set key goes out as <code>X-Api-Key</code> and wins over your subscription, so blanking it keeps a real key out of these requests.</p>
<figure class="fig fig-inline"><img src="/blog/assets/media/how-to-connect-ollama-to-claude-code/note-1.png" alt="Hand-drawn sketch from “How to Connect Ollama to Claude Code”" loading="lazy" decoding="async" /></figure>
<p>To make it stick, add the exports to your shell profile or the <code>env</code> block of <code>~/.claude/settings.json</code>, with <code>ANTHROPIC_MODEL</code> for the tag. A project’s <code>.claude/settings.local.json</code> works too, but Anthropic’s <a href="https://code.claude.com/docs/en/llm-gateway-connect">gateway connection guide</a> notes that on a fresh install with no Claude login, a project <code>env</code> block applies only after the first run wizard and trust prompt, so use <code>~/.claude/settings.json</code> or a shell export for that first run. The global file has its own catch: every Claude Code session then goes to Ollama.</p>
<h2 id="what-happens-if-ollama-is-not-running" tabindex="-1">What happens if Ollama is not running? <a class="anchor" href="#what-happens-if-ollama-is-not-running" aria-hidden="true">#</a></h2>
<p>In our test, Claude Code retried for about three minutes, then failed with a connection error. We ran the manual command as a one shot <code>claude -p &quot;say hi&quot; --model qwen3-coder</code> on 14 Sep 2026, with Claude Code 2.1.270 and nothing listening on port 11434. Trimmed output:</p>
<pre class="language-text"><code class="language-text">⚠ claude.ai connectors are disabled because ANTHROPIC_API_KEY or another auth source is set and takes precedence over your claude.ai login [...]
"qwen3-coder" isn't described by this version's model catalog; [...] auto-compact keeps this session within 200k tokens (the context window it assumes); [...] set CLAUDE_CODE_MAX_CONTEXT_TOKENS to its real window
API Error: Connection refused — a firewall or proxy may be blocking it (ConnectionRefused)</code></pre>
<p>The error came after 177 seconds and 11 attempts, each listed in the <code>--debug-file</code> log. If Claude Code sits silent, run <code>ollama -v</code> before you wait. The first two lines apply even when Ollama is up: <a href="http://claude.ai">claude.ai</a> connectors switch off, and Claude Code guesses a 200K window for an unknown tag.</p>
<h2 id="which-ollama-model-works-best-with-claude-code" tabindex="-1">Which Ollama model works best with Claude Code? <a class="anchor" href="#which-ollama-model-works-best-with-claude-code" aria-hidden="true">#</a></h2>
<p>A coding model with tool calling, served with at least 64K tokens of context. Ollama’s <a href="https://docs.ollama.com/api/anthropic-compatibility">Anthropic compatibility docs</a> recommend <code>qwen3-coder</code> and <code>gpt-oss:20b</code> for local use. On Ollama’s library pages on 14 Sep 2026, <code>qwen3-coder:30b</code> was a 19GB download with a 256K window (Ollama wants 24GB of VRAM for it) and <code>gpt-oss:20b</code> was 14GB with a 128K window. The <a href="/blog/run-munder-difflin-on-open-models/">open models guide</a> sizes other models to your memory.</p>
<p>The context window is the trap. Ollama’s <a href="https://docs.ollama.com/context-length">context length page</a> sets the default from your VRAM: 4k tokens under 24 GiB, 32k from 24 to 48 GiB, 256k above that. Ollama says coding tools should get at least 64,000, so start the server with <code>OLLAMA_CONTEXT_LENGTH=64000 ollama serve</code> and check the <code>CONTEXT</code> column in <code>ollama ps</code>. Then set <code>CLAUDE_CODE_MAX_CONTEXT_TOKENS=64000</code>; Claude Code’s model docs say it then compacts at that window for an unrecognized tag.</p>
<figure class="fig fig-inline"><img src="/blog/assets/media/how-to-connect-ollama-to-claude-code/note-2.png" alt="Hand-drawn sketch from “How to Connect Ollama to Claude Code”" loading="lazy" decoding="async" /></figure>
<p>Cloud tags such as <code>kimi-k2.7-code:cloud</code> and <code>glm-5.1:cloud</code> skip both limits: no download, full context. They need an <a href="http://ollama.com">ollama.com</a> account (<code>ollama signin</code>), their library pages list a per token cost, and your code leaves the machine. Whether a local model can carry your coding work at all is a separate question, weighed in <a href="/blog/is-ollama-good-for-coding/">is Ollama good for coding</a>.</p>
<h2 id="what-breaks-when-claude-code-runs-on-ollama" tabindex="-1">What breaks when Claude Code runs on Ollama? <a class="anchor" href="#what-breaks-when-claude-code-runs-on-ollama" aria-hidden="true">#</a></h2>
<p>Mostly the features that assume Anthropic’s servers:</p>
<ul>
<li><strong>Prompt caching.</strong> Ollama does not support <code>cache_control</code> blocks.</li>
<li><strong>Token counts.</strong> No <code>/v1/messages/count_tokens</code>, and Ollama’s counts are approximations.</li>
<li><strong>Forced tool use.</strong> No <code>tool_choice</code>, and tool calling only works on models built for it.</li>
<li><strong>Remote Control and MCP tool search.</strong> Both are off when the base URL is not Anthropic’s; our debug log showed the tool search line.</li>
<li><strong>Your plan.</strong> With the token variable set, your <a href="http://claude.ai">claude.ai</a> subscription is not used, so that session never touches its limits. For plan prices, see <a href="/blog/how-much-does-claude-code-cost/">how much Claude Code costs</a>.</li>
</ul>
<p>A 30B model on your desk is a keen junior, not a staff engineer: give it scoped tasks, and keep big refactors for a bigger model.</p>
<h2 id="why-is-ollama-launch-claude-not-working" tabindex="-1">Why is ollama launch claude not working? <a class="anchor" href="#why-is-ollama-launch-claude-not-working" aria-hidden="true">#</a></h2>
<p>Most failures come down to four checks.</p>
<ol>
<li><strong>Old Ollama.</strong> <code>ollama -v</code> must show 0.15.0 or newer for <code>launch</code>. Pulling missing models needs 0.15.6, <code>--yes</code> needs 0.18.0, and installing Claude Code needs 0.30.11.</li>
<li><strong>No Claude Code on older Ollama.</strong> Install it with <code>curl -fsSL https://claude.ai/install.sh | bash</code> on macOS or Linux, or <code>irm https://claude.ai/install.ps1 | iex</code> in Windows PowerShell.</li>
<li><strong>Nothing answering.</strong> Ollama is probably not running (see the output above), or the base URL has a stray <code>/v1</code>. If Ollama answers with a model error instead, you skipped <code>ollama pull qwen3-coder</code> on the manual route.</li>
<li><strong>Login screen instead of a session.</strong> Claude Code found no credential before setup. Put <code>ANTHROPIC_AUTH_TOKEN</code> in a shell export or <code>~/.claude/settings.json</code>, not only in a project settings file.</li>
</ol>


      
      <section class="faq" aria-label="Frequently asked questions">
        <h2 id="faq">FAQ</h2>
        
        <div class="qa">
          <p class="q">Is Claude Code with Ollama free?</p>
          <p class="a">With a local model, yes. Ollama accepts the token without validating it, and while ANTHROPIC_AUTH_TOKEN is set Claude Code does not use your claude.ai subscription, so nothing in that session is billed by Anthropic. You pay in hardware and electricity instead.</p>
        </div>
        
        <div class="qa">
          <p class="q">Can I use Ollama cloud models with Claude Code?</p>
          <p class="a">Yes, with an ollama.com account: run ollama signin first. Cloud tags such as kimi-k2.7-code:cloud and glm-5.1:cloud need no download and run at full context, but each model&#39;s library page lists a per token cost, and your prompts and code are processed on Ollama&#39;s servers.</p>
        </div>
        
        <div class="qa">
          <p class="q">How do I use Ollama with the Claude Code extension in VS Code?</p>
          <p class="a">Put ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN in claudeCode.environmentVariables in your VS Code user settings JSON. Anthropic&#39;s gateway docs say the extension checks credentials from that setting before it starts, while values in ~/.claude/settings.json reach the process but not that login check.</p>
        </div>
        
        <div class="qa">
          <p class="q">Can Munder Difflin run Claude Code agents on Ollama?</p>
          <p class="a">Not as a built in setting in 0.5.2. Its local Ollama model picks are for OpenCode, Crush and Pi agents, and Claude Code agents keep using their own Claude login. You still pull the model yourself. OpenCode and Crush need your Ollama address in Settings, AI Engines, and Pi reads your `~/.pi/agent/models.json`.</p>
        </div>
        
        <div class="qa">
          <p class="q">What context length does Claude Code need on Ollama?</p>
          <p class="a">Ollama&#39;s docs say coding tools should get at least 64,000 tokens, and under 24 GiB of VRAM the default is only 4k. Start the server with OLLAMA_CONTEXT_LENGTH=64000, then set CLAUDE_CODE_MAX_CONTEXT_TOKENS to the same number, because Claude Code otherwise assumes a 200K window for a model it does not recognize.</p>
        </div>
        
      </section>
      

      
      <hr />
      <div class="share">
        <span class="lbl">Tags</span>
        <a class="tag" href="/blog/tags/guides/">Guides</a><a class="tag" href="/blog/tags/claude-code/">Claude Code</a><a class="tag" href="/blog/tags/ollama/">Ollama</a><a class="tag" href="/blog/tags/local-first/">Local-First</a><a class="tag" href="/blog/tags/open-source/">Open Source</a>
      </div>
      
    </div>

    
    <aside class="toc-rail" aria-label="Table of contents">
      <div class="tt">On this page</div>
      <ol>
        <li class="lvl-2"><a href="#can-claude-code-use-ollama-models">Can Claude Code use Ollama models?</a></li><li class="lvl-2"><a href="#what-does-ollama-launch-claude-do">What does ollama launch claude do?</a></li><li class="lvl-2"><a href="#how-do-you-connect-claude-code-to-ollama-by-hand">How do you connect Claude Code to Ollama by hand?</a></li><li class="lvl-2"><a href="#what-happens-if-ollama-is-not-running">What happens if Ollama is not running?</a></li><li class="lvl-2"><a href="#which-ollama-model-works-best-with-claude-code">Which Ollama model works best with Claude Code?</a></li><li class="lvl-2"><a href="#what-breaks-when-claude-code-runs-on-ollama">What breaks when Claude Code runs on Ollama?</a></li><li class="lvl-2"><a href="#why-is-ollama-launch-claude-not-working">Why is ollama launch claude not working?</a></li>
      </ol>
    </aside>
    
  </div>

  <footer class="post-foot wrap"><div class="prevnext">
      <a class="pn prev" href="/blog/how-to-install-codex-cli/"><span class="k">← Older</span><span class="t">Codex CLI: What It Is and How to Install It on Mac, Windows and Linux</span></a>
      <a class="pn next" href="/blog/herdr-alternatives/"><span class="k">Newer →</span><span class="t">Herdr Alternatives: What to Pick and Who Each One Fits</span></a>
    </div>
    <section class="related">
      <h2>Related in Guides</h2>
      <div class="post-grid">
        <article class="card t-guides">
  <a class="thumb t-guides" href="/blog/claude-md-best-practices/" aria-hidden="true" tabindex="-1"><img src="/blog/assets/media/claude-md-best-practices/hero.png" alt="" loading="lazy" decoding="async" /></a>
  <div class="body">
    <div class="meta">
      <time datetime="2026-10-26">Oct 26, 2026</time>
      <span class="dot" aria-hidden="true"></span>
      <span>4 min</span>
    </div>
    <h3><a href="/blog/claude-md-best-practices/">CLAUDE.md Best Practices: What to Write, Where It Lives, How Long (Oct 2026)</a></h3>
    <p class="dek">CLAUDE.md best practices from Anthropic&#39;s docs, checked 26 Oct 2026: what to put in it, where each file lives, the 200 line target and how AGENTS.md loads.</p>
    <div class="foot">
      <span class="tag kind">Guides</span>
      <a class="more" href="/blog/claude-md-best-practices/" aria-label="Read: CLAUDE.md Best Practices: What to Write, Where It Lives, How Long (Oct 2026)">Read →</a>
    </div>
  </div>
</article>
<article class="card t-guides">
  <a class="thumb t-guides" href="/blog/codex-computer-use/" aria-hidden="true" tabindex="-1"><img src="/blog/assets/media/codex-computer-use/hero.png" alt="" loading="lazy" decoding="async" /></a>
  <div class="body">
    <div class="meta">
      <time datetime="2026-10-26">Oct 26, 2026</time>
      <span class="dot" aria-hidden="true"></span>
      <span>4 min</span>
    </div>
    <h3><a href="/blog/codex-computer-use/">Codex Computer Use: How to Turn It On, Plans and Limits (Oct 2026)</a></h3>
    <p class="dek">Codex computer use lets the ChatGPT desktop app see and click apps on macOS and Windows. Setup, which plans get it, locked use and how Claude&#39;s compares.</p>
    <div class="foot">
      <span class="tag kind">Guides</span>
      <a class="more" href="/blog/codex-computer-use/" aria-label="Read: Codex Computer Use: How to Turn It On, Plans and Limits (Oct 2026)">Read →</a>
    </div>
  </div>
</article>
<article class="card t-guides">
  <a class="thumb t-guides" href="/blog/cursor-pricing/" aria-hidden="true" tabindex="-1"><img src="/blog/assets/media/cursor-pricing/hero.png" alt="" loading="lazy" decoding="async" /></a>
  <div class="body">
    <div class="meta">
      <time datetime="2026-10-26">Oct 26, 2026</time>
      <span class="dot" aria-hidden="true"></span>
      <span>5 min</span>
    </div>
    <h3><a href="/blog/cursor-pricing/">Cursor Pricing (Oct 2026): Every Plan After the 12 Oct Change</a></h3>
    <p class="dek">Cursor pricing as of 26 Oct 2026: Free, Plus $8, Premium $30, Super $100, Ultra $200, Teams seats, what changed on 12 Oct and what old plans keep.</p>
    <div class="foot">
      <span class="tag kind">Guides</span>
      <a class="more" href="/blog/cursor-pricing/" aria-label="Read: Cursor Pricing (Oct 2026): Every Plan After the 12 Oct Change">Read →</a>
    </div>
  </div>
</article>

      </div>
    </section>
    
  </footer>
</article>

</main>
<footer class="site-foot">
  <div class="wrap">
    <div class="foot-top">
      <a class="foot-brand brand" href="https://munderdiffl.in" aria-label="Munder Difflin home">
        <img class="brand-logo" src="https://munderdiffl.in/logo.png" width="1318" height="840" alt="Munder Difflin, Inc. — Multi-Agent Harness" />
      </a>
      <div class="foot-links">
        <a href="/blog/">Latest</a>
        <a href="/blog/topics/">Topics</a>
        <a href="/blog/about/">About</a>
        <a href="https://munderdiffl.in/blog/feed.xml">RSS</a>
        <a href="https://github.com/chaitanyagiri/munder-difflin">GitHub</a>
        <a href="https://munderdiffl.in">munderdiffl.in ↗</a>
      </div>
    </div>
    <div class="foot-meta">
      © 2026 Munder Difflin · Local-first · MIT-licensed ·
      Built on <a href="https://munderdiffl.in">Electron, React, Pixi.js, xterm.js &amp; node-pty</a>.
      Run an office of agents while you sleep.
    </div>
  </div>
</footer>

<script>
  // sticky-nav border on scroll
  (function () {
    var nav = document.getElementById('nav');
    if (!nav) return;
    var onScroll = function () { nav.classList.toggle('scrolled', window.scrollY > 8); };
    onScroll(); window.addEventListener('scroll', onScroll, { passive: true });
  })();
  // YouTube click-to-load: thumbnail button → youtube-nocookie iframe
  (function () {
    document.addEventListener('click', function (e) {
      var btn = e.target.closest('.yt-load');
      if (!btn) return;
      var box = btn.closest('.yt');
      var id = box && box.getAttribute('data-yt');
      // Only an 11 character YouTube video id may reach the iframe URL.
      if (!id || !/^[A-Za-z0-9_-]{11}$/.test(id)) return;
      var frame = document.createElement('iframe');
      frame.src = 'https://www.youtube-nocookie.com/embed/' + encodeURIComponent(id) + '?autoplay=1';
      frame.title = box.getAttribute('data-title') || 'YouTube video';
      frame.allow = 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share';
      frame.setAttribute('allowfullscreen', '');
      box.replaceChildren(frame);
    });
  })();
</script>

</body>
</html>