How I Taught Claude Code to Offload Grunt Work to a Local 4B Model A developer detailed a method to offload trivial text tasks from Anthropic's Claude Code to a local Qwen3.5-4B model running on llama.cpp, using a custom skill that calls a Python script via Bash. The setup, which avoids MCP servers and proxy configurations, lets Claude decide per-task when to delegate, reducing token usage while keeping Claude for complex reasoning. The author noted that subagents cannot use different models and that setting ANTHROPIC_BASE_URL globally downgrades the entire session. My GPU sits idle most of the day. Meanwhile, I keep burning Claude tokens on tasks a small model could finish in two seconds: summarizing a paragraph, rewording a commit message, suggesting five variable names, classifying a list of lines. It felt wasteful. So I tried to bridge them: keep Claude Code as my main driver, but let it delegate the trivial stuff to a Qwen3.5–4B running locally on llama.cpp. My first three instincts were all wrong. The fourth worked. This post is the whole arc — including a bug that left me staring at a blank terminal for twenty minutes — so you can skip straight to the working setup. If you’re already using Claude Code and have heard about local LLMs but never wired one in, this is for you. Before I show what works, here’s what most people try first. Skip these so you don’t waste your afternoon. “I’ll just make a subagent that uses Qwen.” You can’t. In Claude Code, subagents run on the same model as the main session. The model: field in subagent frontmatter accepts names like haiku or sonnet, but they all resolve against the same ANTHROPIC BASE URL. Subagents are context isolation, not model isolation. “I’ll point ANTHROPIC BASE URL at my llama-server." This does work — llama.cpp exposes an Anthropic-compatible /v1/messages endpoint, and Claude Code will happily talk to it. But it's all-or-nothing. The moment you set that env var, everything goes through Qwen, including the heavy reasoning tasks where you actually need Claude. You haven't built a hybrid; you've just downgraded your whole session. “I’ll add multiple endpoints to settings.json, like opencode does.” Opencode and qwen-code support per-model endpoints in their config. Claude Code does not. Don’t go looking for a flag — it isn’t there. The real answer is to stop thinking about this at the model level and start thinking at the application level. Claude stays in charge. Qwen becomes a tool Claude can call when it judges the task to be trivial. Claude Code has two primitives that, combined, give you exactly what you want: Glue them: write a Skill whose instructions are “when you see a small text task, call this Python script via Bash; the script hits a local llama-server and returns the result.” That’s it. No MCP server to maintain. No proxy. No config gymnastics. Claude makes the routing decision per-task, based on the skill’s description. Why not an MCP server? You could. MCP is the “right” answer if you want a persistent, structured tool. But for a single endpoint that takes text in and returns text out, a 60-line Python script is faster to write, easier to debug, and has fewer failure modes. MCP is overkill here. Prerequisites Step 1: Run llama-server Whatever flags you normally use are fine. For reference, mine on Windows: llama-server.exe ^ -m gguf\Qwen3.5-4B\Qwen3.5-4B-UD-Q4 K XL.gguf ^ --jinja ^ -c 32768 ^ --port 8080 ^ -a Qwen3.5-4B The two flags that matter for this setup: Verify it’s alive: curl http://127.0.0.1:8080/v1/models Step 2: Create the skill Skills live at ~/.claude/skills/