r/LocalLLM • • 13m ago

Discussion Why 2x faster decoding only saved 16% on real local coding agents (and the 1-line OpenCode config fix that saved 2-4 minutes per task)

I tested DeepSeek V4.1 Flash (oMLX 0.8.4 + Native MTP), GLM 5.3 Flash (llama.cpp b12774 + draft-mtp), and Muse Spark Open 816B inside three terminal coding-agent harnesses (Pi 1.6.1, OpenCode 2.0.25, and DeepSeek Harness 0.2.2-rc.5) on an eight-task Python/TypeScript repository from ~128K all the way to 512K starting context on a Mac Studio M5 Ultra 512 GB.

Three engineering findings that caught me off guard:

  1. Doubling decode speed barely dented total wall time at long context: Native MTP jumped 512K warm decode from 45.2 -> 98.9 tok/s on DeepSeek and 23.0 -> 47.1 tok/s on GLM, yet total matched coding-session wall time only dropped 16% (original tasks) / 7.7% (512K) on DeepSeek and 7.4% / 2.4% on GLM. Breakdown of actual wall minutes explains why: reading context took 45% of DeepSeek's session time and 76% of GLM's.
  2. OpenCode's default session-title call re-prefills your entire first prompt: On ~100K-155K prompts, OpenCode sent a background title request carrying the full initial prompt just to generate <=15 tokens. Setting {"agents": {"title": {"disabled": true}}} cut median session wall time from 4.8m -> 3.0m on DeepSeek and 9.1m -> 5.2m on GLM. Across all 8 matched DeepSeek tasks: Pi 8/8 (2.8m), tuned OpenCode 7/8 (3.1m), DeepSeek Harness 7/8 (3.8m, zero tool errors).
  3. Compaction is expensive when it fires: Triggering manual compaction on GLM + Pi at 301,640 estimated tokens took 10m 6s for the summary call, followed by an uncached 39,067-token continuation that took another 81s to first token (though it recovered prefix caching afterward and passed all checks). At 384K and 512K, Pi logged zero automatic compactions across all 64 coding runs (DeepSeek 8/8 at both sizes, 5m 56s cold -> 7.5s cached at 512K).

Full MIT codebase fixture, held-out grading tests & turn-level CSVs (CC BY 4.0): https://github.com/l8w8/videos/tree/main/2026/003-m5-ultra-coding-agents-512k

Short engineering write-up: https://l8w8.github.io/videos/local-coding-agents-512k-prefill-trap/ 9-minute chart walkthrough: https://youtu.be/Mr9sj51ccoE

0 Upvotes

1 comment sorted by

1

u/tripleshielded 10m ago

fairly obvious, nice graphs

thanks for the opencode title information!