Capital & Compute
· ai· coding-agents· local-llms· benchmarks

Why Local LLMs Fail at Agentic Coding in 2026

Identical open weights score 67.8 or 90.0 on SWE-bench depending on the harness. What the research says about where local coding agents break.

By Capital & Compute

Take one set of open weights, Qwen3.6-27B, and run it against SWE-bench Verified three times without changing a single parameter. Under the plain mini-swe-agent baseline it resolves 67.8% of issues. Under Qwen’s own evaluation harness, 77.2%. Under a community-built one made of proxy code and a borrowed CLI, 90.0%. Same weights, same benchmark, a 22-point spread that belongs entirely to the harness: the agent software that loops the model through tools, files and tests.

That spread explains why two people can run the identical model and file opposite reports. It does not explain the more common complaint, which is that the local model scores well on all of those and still produces work you end up deleting. For that, the more useful number is 11.0%.

Why do local LLMs fail at agentic coding?

Local LLMs fail at agentic coding for three reasons unrelated to model size. The harness around the model affects task success more than the weights do. The benchmarks that make local models look competent measure single-issue bug fixes, not multi-file feature work. And the stage where models fail hardest, choosing an approach, is the one people most want to delegate.

Each of those is measurable, and the measurements point somewhere unexpected: most of what reads as a local-model problem is a task-shape problem that hits frontier models nearly as hard.

The same weights score 67.8 or 90.0 depending on the harness

Start with the spread, because it sets up everything else.

Qwen published Qwen3.6-27B in April 2026 under Apache 2.0. The official model card reports 77.2 on SWE-bench Verified, produced with Qwen’s internal agent scaffold. That number, and the capability story behind it, is covered in why local LLMs got good in 2026.

In May 2026, an independent researcher posting as mrguo6221 filed a detailed report in the QwenLM repository claiming 90.0% on the same benchmark with the same unmodified FP8 weights. The setup: twelve RTX 4090s modded to 48GB across two workstations, Anthropic’s Claude Code CLI running in single-shot mode, and roughly 47,000 lines of custom Python acting as a protocol-translation proxy. The report gives a stricter floor of 88.0% with zero retries, and attributes 22.2 points of the gain to agent engineering measured against a 67.8% mini-swe-agent baseline.

67.8%
mini-swe-agent baseline
community-reported
77.2%
Qwen internal scaffold
vendor-reported
90.0%
Engineered stack
community-reported, unreproduced
+22.2
Points from agent engineering
baseline to engineered

The most interesting control in that report is the ablation. Swapping Claude’s CLI for Alibaba’s own qwen-code CLI, holding everything else constant, dropped the result to 87.4%. Roughly 2.6 points sat in the choice of harness alone.

SWE-bench Verified score by scaffold, identical weightsQwen3.6-27B on SWE-bench Verified: mini-swe-agent baseline 67.8%, Qwen internal evaluation scaffold 77.2%, engineered stack with qwen-code CLI 87.4%, engineered stack with Claude Code CLI 90.0%. All four use the same unmodified weights.0%20%40%60%80%100%mini-swe-agent baseline67.8%Qwen internal scaffold77.2%Engineered + qwen-code CLI87.4%Engineered + Claude Code CLI90%
SWE-bench Verified score by scaffold, identical weights
ItemValue
mini-swe-agent baseline67.8%
Qwen internal scaffold77.2%
Engineered + qwen-code CLI87.4%
Engineered + Claude Code CLI90%
One set of Qwen3.6-27B weights, four harnesses, on SWE-bench Verified. Note the axis does not start at zero and the top three figures come from a single community report rather than independent evaluation. The message is the size of the spread, not the exact ranking.Source: Qwen model card (77.2, vendor-reported); mrguo6221, QwenLM discussion #1846 (67.8, 87.4, 90.0, community-reported)

The transferable lesson is the one that already applies to closed-model leaderboards, laid out in AI agent benchmarks in 2026: a benchmark score describes a model inside a specific harness. Reading it as a property of the weights is a category error. Someone reporting disappointment with a model that “scores 77” may simply be running the 67.8 configuration.

The benchmark is measuring the easy shape

Here is where the usual explanation runs out. Suppose you fix the harness, use a good quantization, and reproduce something near the top of that range. The model still writes code you throw away. Why?

Because SWE-bench Verified measures a narrow task shape: resolve one issue, usually inside one pull request, in a repository whose tests already define success. That is a real software task. It is not the task most people hand an agent.

A February 2026 preprint, FeatureBench: Benchmarking Agentic Coding for Complex Feature Development (Zhou et al., arXiv 2602.10975), built a benchmark for the other shape. Its authors traced unit tests along a dependency graph to derive feature-level tasks spanning multiple commits and pull requests, producing 200 tasks and 3,825 executable environments from 24 open-source repositories. Then they measured frontier agents against it.

Claude 4.5 Opus, which the preprint notes resolves 74.4% of SWE-bench, succeeded on 11.0% of FeatureBench tasks.

74.4%
Claude 4.5 Opus on SWE-bench Verified
single-issue bug fixing
11.0%
Claude 4.5 Opus on FeatureBench
end-to-end feature development

Claude 4.5 Opus runs with no quantization, no VRAM ceiling, no consumer GPU and no local runtime, and it still loses roughly six sevenths of its measured competence when the task changes from fixing a described bug to building a feature end to end. Whatever happens in the gap between 74.4% and 11.0% is not caused by running a 27B model on your desk.

This reframes the entire complaint. If a senior engineer spends six months on local agentic coding and concludes the agents add technical debt faster than value, the natural inference is that the local model is too small. The FeatureBench result says the inference is mostly wrong. Feature-shaped work is where agents fail, and paying for a frontier API buys a smaller improvement on that shape than the benchmark headlines imply.

Where do local coding agents actually break?

Knowing that agents fail on feature work is only half useful. The other half is knowing which step fails, because that determines which step you take back.

A May 2026 preprint, Characterizing the Failure Modes of LLMs in Resolving Real-World GitHub Issues (Jiang, Huang, Wang, Chen, Liu and Briand, arXiv 2605.12270), did the unglamorous version of this work. The authors ran Claude 4.5 Sonnet, Gemini 3 Pro and GPT-5 over 100 sampled SWE-bench Verified tasks, three independent runs each, for 900 attempts total. The models resolved 657. Then the authors hand-diagnosed every one of the 243 failures and sorted them into five stages of the repair pipeline and eleven finer categories.

The distribution is lopsided, and the shape of it is the finding.

Failure share by repair-pipeline stageAcross 243 failed attempts on SWE-bench Verified: Problem Understanding 71 failures (29.2%), Localization 7%, Strategy and Logic 90 failures (37%), Implementation and Execution 1.6%, Validation and Harness Constraints 40 failures (16.5%). Stages are listed in pipeline order; Strategy and Logic is the largest bottleneck.Earliest stageFinal stageProblem understandingMisreads the issue, or anchors on a misleading hint in the prompt71 (29.2%)1LocalizationFinding the code that needs to change. Rarely the problem7%2Strategy & logicChoosing an approach and synthesizing correct repair logic90 (37%)3Implementation & executionApplying the edit and running it. Nearly negligible1.6%4Validation & harness constraintsThe evaluation environment rejects a correct patch40 (16.5%)5
Failure share by repair-pipeline stage
OrderPipeline stageShare of the 243 failuresWhat goes wrong there
1Problem understanding71 (29.2%)Misreads the issue, or anchors on a misleading hint in the prompt
2Localization7%Finding the code that needs to change. Rarely the problem
3Strategy & logic90 (37%)Choosing an approach and synthesizing correct repair logic
4Implementation & execution1.6%Applying the edit and running it. Nearly negligible
5Validation & harness constraints40 (16.5%)The evaluation environment rejects a correct patch
Where 243 failed repair attempts broke down, by pipeline stage. Read it as share of failures, not as a per-stage success rate. The two cognitive stages account for roughly two thirds; the two operational stages account for under 9% combined.Source: Jiang et al. (2026), Characterizing the Failure Modes of LLMs in Resolving Real-World GitHub Issues (preprint), Table III

Three findings come out of that table.

Cognitive stages dominate. Strategy and logic is the single largest bottleneck at 90 failures, 37% of the total. Problem understanding adds 71, or 29.2%. Within the strategy stage, the biggest sub-category is partial or incomplete fixes, and the authors draw the obvious conclusion: agents accurately localize faults but fail to synthesize repair logic that covers the whole problem.

Operational stages barely matter. Localization accounts for 7% of failures, which the authors read as evidence that current models are proficient at working through large codebases. Implementation and execution is 1.6%, near zero. The paper notes that models do hit fragile code-editing tools and then route around them with custom scripts or retries.

So the empirical division of labor is close to the inverse of how most people use these tools. Searching an unfamiliar repository, tedious work that humans are slow at, is what models are best at. Deciding how to solve the problem, which feels like the part worth delegating, is where they fail most.

And 16.5% of the failures were not the model’s fault at all. Forty of the 243 arose at the validation and harness stage, where, in the authors’ description, the evaluation environment rejects functionally plausible and semantically correct solutions over rigid assertions or undocumented environmental dependencies. Roughly one failure in six was the benchmark being wrong. That belongs in every reading of every score on this page, and it develops a theme already covered in are AI benchmarks reliable.

One more finding is directly actionable. The authors describe a pattern they label being distracted by hints and TODOs: rather than verifying independently, models anchor on speculative suggestions in an issue description or leftover TODO comments in the code and translate them straight into an implementation. They characterize it as alignment-induced sycophancy. The practical read is uncomfortable if you write detailed prompts. A guess you include as a courtesy (“it might be the caching layer”) does not get evaluated. It gets implemented.

The operating rules that follow

Everything above converges on a workable posture. Not “prompt better.” A set of constraints derived from where the failures are.

If strategy formulation is the worst stage and localization the best, then the instruction “implement this feature” hands the model the thing it is bad at and skips the thing it is good at.

Invert it. Ask the model to find and explain the relevant code first, which it does well. Read what it returns. Decide the approach yourself. Then ask for the implementation of that specific approach, in that specific place. The step you must not skip is the middle one, because it is the step the research says the model will get wrong most often.

This is also why the practices that circulate among practitioners work. A July 30, 2026 discussion thread in r/LocalLLaMA, where a developer described six months of net-negative results from local agentic coding, drew replies converging on roughly this: think through what you want and how you would build it, then ask the model to implement it that way; provide the relevant files rather than making the agent hunt; go step by step; review every line. Those are community reports rather than evidence, and the vote counts prove nothing. But they describe, in workflow terms, the same split the failure-mode preprint measured. Independent arrival at the same answer is worth noticing.

State the problem, not your hunch about it

This follows straight from the sycophancy finding, and it cuts against instinct. When you write up a task, you probably include your working theory as helpful context. The failure analysis says the model will not test that theory. It will build it.

So separate the two explicitly. Describe the observed behavior, the reproduction, and the constraint. Hold the diagnosis back, or mark it as unverified and ask the model to check it before acting. The same applies to stale TODO comments sitting in the code you hand over: they read as instructions.

Budget context, do not fill it

A 262K context window is a capacity, not a target. Two separate costs rise as you use it.

The first is throughput. Attention cost and KV cache size both grow with the number of tokens held, so on a memory-bandwidth-bound consumer machine a long session slows down as it goes. That is a property of the mechanism, not a tuning mistake.

The second cost is quality, and it is measured. A 2025 technical report from Chroma, Context Rot: How Increasing Input Tokens Impacts LLM Performance (Hong, Troynikov and Huber), evaluated 18 models including Claude Opus 4, GPT-4.1, Gemini 2.5 Pro and three Qwen3 variants, and found that none of them processes context uniformly. Their summary is blunt: performance “grows increasingly unreliable as input length grows,” and it does so “in surprising and non-uniform ways” even on simple retrieval and replication tasks. The report tests input lengths up to roughly 10,000 words rather than out to any model’s maximum, so it establishes the direction of the effect rather than a threshold you can look up.

Practical version: pick a working ceiling well below the model’s maximum, treat crossing it as a signal to start a fresh session, and pass files explicitly instead of letting the agent discover them through many rounds of search. Do not quantize the KV cache to buy headroom for coding work. The error it introduces compounds across a long session, and long sessions are exactly where you were already in trouble.

Treat prefill latency as a workflow constraint

Prompt processing on local hardware is slow enough to reshape the loop. Writing up his own setup, engineer Alex Ewerlof reports cold-start delays of two to five minutes on a first interaction when the prompt cache misses. That is one practitioner’s measurement on one machine rather than a general figure, but the shape of it is familiar to anyone who has run this: the tight edit-run-check rhythm that makes agentic coding pleasant turns into something closer to batch submission.

That has a scheduling consequence rather than a configuration fix. Long-context local work is something you queue, not something you sit and watch. If your workflow depends on fast iteration, keep prompts small and rely on prefix caching, or accept that the local loop runs at a different tempo than a hosted one. The hardware side of that constraint, and what an owned token really costs, is worked through in local LLM tokenomics.

Route by task shape

This is the decision the setup guides skip. Given the FeatureBench result, the right split is by the shape of the work rather than by how important it feels.

Task shape Route to Why
Find where something lives in an unfamiliar repo Local weights Localization is the strongest stage; also the cheapest way to spend a slow local loop
Bounded single-file edit with a clear spec Local weights Closest shape to what the benchmarks actually measure
Mechanical refactor with a defined pattern Local weights Repetitive, verifiable, no strategy required
Writing tests against existing behavior Local weights Success criteria already exist in the code
Multi-file feature spanning several modules Decompose first, then local The FeatureBench shape. Undecomposed, this fails on any model
Long-horizon autonomous run with recovery Frontier API The one place the capability gap is genuinely decisive

Note what the table does not say: it never routes work to a frontier model because the work is hard. It routes on shape and horizon. For which weights to run in the local column, see the best open-weight AI models in 2026, and for whether your machine fits them, the Can I Run This LLM checker.

Use subagents to buy back context

The subagent pattern is missing from nearly every local setup guide, and it addresses the exact constraint local models suffer under.

A single agent doing exploration, implementation and testing accumulates all of it in one context. Splitting the work so a subagent explores, returns a summary, and is then discarded means the exploration tokens never touch the main context. The orchestrator keeps a small working set; each subagent’s context balloons and then vanishes with it.

For a local model this is not an efficiency nicety. Context is the scarce resource, throughput falls as it fills, and adherence degrades with it. Anything that keeps the main loop small pays twice. The general vocabulary for building this, and the tool-budget question underneath it, is in how to scaffold an AI agent harness.

Expect tool-calling failures and configure for them

The most common practical complaint about local agentic coding is not bad code. It is the file-edit tool failing, repeatedly, on a model that seems otherwise capable.

Three causes account for most of it: the model was not trained for tool calling, tool calling was never explicitly enabled in the serving configuration, or the model reasons about the edit instead of emitting the call. None is a capability ceiling, and all three are worth ruling out before concluding the weights are bad. Prefer harnesses with lean system prompts and few tool definitions, since every tool description competes for the same scarce context.

When should you switch from a local model to a frontier API?

A falsifiable rule beats a feeling. Switch from local weights to a frontier API when any of these is true:

  • The task cannot be decomposed into steps with checkable outputs. Decomposition is the main lever, and when it is unavailable the local option loses its best defense.
  • The work requires sustained recovery from its own errors across a long horizon. This is the documented weak point and no amount of local scaffolding closes it.
  • You have restarted the session twice on the same problem with no progress. Two failed attempts is cheaper information than a third.
  • The wall-clock cost of the slow local loop exceeds what the API would charge. On a bounded task this is a real calculation, not a rounding error, and it usually favors the API for interactive work. The breakeven math is in local LLM tokenomics.

Everything else stays local, and the honest reason is not cost. It is that the failure modes are the same on both sides of the fence, and a slow model you can inspect teaches you more about where your own specifications are vague than a fast one that hides it.

Bottom line

The gap between a local coding model’s benchmark score and its behavior on your machine has three components, and model size is the smallest of them. The harness moves results by more than twenty points on identical weights. Task shape moves a frontier model from 74.4% to 11.0%. And the stage that fails most is the one people most want to hand over.

The fix that follows is unglamorous. Keep strategy, delegate search, decompose feature work until each piece has a checkable output, hold context well under the maximum, and route by shape rather than by difficulty. None of that requires better weights. Most of it would improve results with a frontier model too, which is the tell that the problem was never really the local model.

Frequently asked questions

Is a local LLM good enough for coding in 2026?
For bounded, well-specified tasks, yes. Open-weight models in the 27B range post SWE-bench Verified scores in the high 70s under a good scaffold. The limit is task shape rather than quality: feature work spanning multiple files fails on frontier models too, with Claude 4.5 Opus resolving only 11.0% of FeatureBench tasks.
Why does my local LLM fail at tool calling?
Usually one of three causes: the model was not trained for tool calling, tool calling is not explicitly enabled in your serving configuration, or the model reasons about the edit rather than emitting the call. Check the configuration before concluding the model is incapable, and prefer harnesses with lean system prompts and few tool definitions.
Why does the model ignore my instructions after 50k tokens?
Model reliability falls as input length grows. Chroma evaluated 18 models in 2025 and found none of them processes context uniformly. Local setups feel it earlier because throughput also falls as the KV cache grows. Treat the model maximum as a capacity rather than a target, set a working ceiling below it, and start a fresh session when you cross it.
Does a bigger local model fix bad agentic coding results?
Less than expected. The largest measured swings come from the scaffold, where identical Qwen3.6-27B weights ranged from 67.8% to 90.0% on SWE-bench Verified, and from task shape, where a frontier model drops from 74.4% to 11.0% between benchmarks. Improve decomposition and context discipline before buying more VRAM.
What should a local model do, and what should go to a frontier API?
Route by shape. Local weights handle code search and localization, bounded single-file edits, mechanical refactors and test writing. Send long-horizon autonomous runs that require recovery from error to a frontier API. Decompose multi-file feature work before sending it anywhere.
Should I quantize the KV cache to fit more context?
Not for coding work. The error it introduces is small per step but compounds across the long sessions where agentic coding already struggles. Reducing the amount of context you need is the better trade.
Are local coding models cheaper than a subscription?
Only at high, sustained volume or on hardware you already own and would otherwise leave idle. For interactive or bursty use, a sub-$20 monthly plan is usually both cheaper and less work. The full breakeven calculation is in the local LLM tokenomics analysis.

Sources

  • Qwen Team, Alibaba (2026). Qwen3.6-27B (model card). Primary, vendor-reported: the 77.2 SWE-bench Verified score and Apache 2.0 licensing. Verified 2026-07-31. huggingface.co
  • mrguo6221 (2026, May). Qwen3.6-27B-FP8 reaches 90.0% on SWE-bench Verified with an engineered agent stack (community discussion). Community-reported, not independently reproduced: the 67.8% baseline, 90.0% headline, 88.0% strict floor, +22.2 point attribution and 87.4% qwen-code ablation. Verified 2026-07-31. github.com
  • Zhou, Q., Zhang, J., Wang, H., Hao, R., Wang, J., Han, M., Yang, Y., Wu, S., Pan, F., Fan, L., Tu, D., and Zhang, Z. (2026). FeatureBench: Benchmarking Agentic Coding for Complex Feature Development (preprint, submitted 11 February 2026). arXiv 2602.10975. Primary: the 200-task benchmark, 3,825 executable environments, and the 74.4% versus 11.0% comparison. Verified 2026-07-31 via the arXiv API. arxiv.org
  • Jiang, Y., Huang, Y., Wang, G., Chen, J., Liu, H., and Briand, L. (2026). Characterizing the Failure Modes of LLMs in Resolving Real-World GitHub Issues (preprint, submitted 12 May 2026). arXiv 2605.12270. Primary: the five-stage failure taxonomy, the stage ranking, the 243-failure/900-trial methodology, and the harness-misjudgment finding. Verified 2026-07-31 via the arXiv API. arxiv.org
  • Hong, K., Troynikov, A., and Huber, J. (2025, July 14). Context Rot: How Increasing Input Tokens Impacts LLM Performance (technical report). Chroma. Primary: the 18-model evaluation and the finding that reliability falls non-uniformly as input length grows. Verified 2026-07-31. trychroma.com
  • Ewerlof, A. (2026). Using local LLMs for agentic coding (practitioner write-up). Secondary: cited only for the reported two-to-five-minute cold-start prefill delay on one setup. Verified 2026-07-31. blog.alexewerlof.com
  • r/LocalLLaMA (2026, July 30). Software Engineers: Do you honestly get anything useful out of LLMs? (community discussion). Secondary and anecdotal: cited only for the shape of the practitioner complaint and the workflow practices reported in replies. Verified 2026-07-31. redd.it

Get each breakdown before it makes the rounds

You get one email when a new source-backed analysis goes live: what AI agents actually cost, which models are worth running, and what the benchmarks really mean. No hype.

No spam. Unsubscribe anytime.

← Back to Coding agents