All Insights
#ClaudeCode
July 2026

Sunday Coffee & Code - Claude Code Terminal and Local Gemma4 (yup, more Gemma)

Not a lot of time this weekend so grab your coffee - this week mixed '๐˜ค๐˜ข๐˜ฏ ๐˜Š๐˜ญ๐˜ข๐˜ถ๐˜ฅ๐˜ฆ ๐˜Š๐˜ฐ๐˜ฅ๐˜ฆ ๐˜ฅ๐˜ณ๐˜ช๐˜ท๐˜ฆ ๐˜ข ๐˜ญ๐˜ฐ๐˜ค๐˜ข๐˜ญ ๐˜ฎ๐˜ฐ๐˜ฅ๐˜ฆ๐˜ญ?' (which, tbh, we know it could before starting) with '๐˜ธ๐˜ข๐˜ต๐˜ค๐˜ฉ ๐˜ข 31๐˜‰ ๐˜ฎ๐˜ฐ๐˜ฅ๐˜ฆ๐˜ญ ๐˜จ๐˜ณ๐˜ช๐˜ฏ๐˜ฅ ๐˜ต๐˜ฐ ๐˜ข ๐˜ฉ๐˜ข๐˜ญ๐˜ต ๐˜ฐ๐˜ท๐˜ฆ๐˜ณ ๐˜ข ๐˜ค๐˜ฐ๐˜ฏ๐˜ต๐˜ฆ๐˜น๐˜ต ๐˜ธ๐˜ช๐˜ฏ๐˜ฅ๐˜ฐ๐˜ธ.' (... and a confession: I had tea today. Don't tell the branding.)

By Steve Harris

๐—ฆ๐˜‚๐—ป๐—ฑ๐—ฎ๐˜† ๐—–๐—ผ๐—ณ๐—ณ๐—ฒ๐—ฒ & ๐—–๐—ผ๐—ฑ๐—ฒ - ๐—–๐—น๐—ฎ๐˜‚๐—ฑ๐—ฒ ๐—–๐—ผ๐—ฑ๐—ฒ ๐—ง๐—ฒ๐—ฟ๐—บ๐—ถ๐—ป๐—ฎ๐—น ๐—ฎ๐—ป๐—ฑ ๐—Ÿ๐—ผ๐—ฐ๐—ฎ๐—น ๐—š๐—ฒ๐—บ๐—บ๐—ฎ๐Ÿฐ (๐˜†๐˜‚๐—ฝ, ๐—บ๐—ผ๐—ฟ๐—ฒ ๐—š๐—ฒ๐—บ๐—บ๐—ฎ)

Not a lot of time this weekend so grab your coffee - this week mixed โ€๐˜ค๐˜ข๐˜ฏ ๐˜Š๐˜ญ๐˜ข๐˜ถ๐˜ฅ๐˜ฆ ๐˜Š๐˜ฐ๐˜ฅ๐˜ฆ ๐˜ฅ๐˜ณ๐˜ช๐˜ท๐˜ฆ ๐˜ข ๐˜ญ๐˜ฐ๐˜ค๐˜ข๐˜ญ ๐˜ฎ๐˜ฐ๐˜ฅ๐˜ฆ๐˜ญ?โ€ (which, tbh, we know it could before starting) with โ€๐˜ธ๐˜ข๐˜ต๐˜ค๐˜ฉ ๐˜ข 31๐˜‰ ๐˜ฎ๐˜ฐ๐˜ฅ๐˜ฆ๐˜ญ ๐˜จ๐˜ณ๐˜ช๐˜ฏ๐˜ฅ ๐˜ต๐˜ฐ ๐˜ข ๐˜ฉ๐˜ข๐˜ญ๐˜ต ๐˜ฐ๐˜ท๐˜ฆ๐˜ณ ๐˜ข ๐˜ค๐˜ฐ๐˜ฏ๐˜ต๐˜ฆ๐˜น๐˜ต ๐˜ธ๐˜ช๐˜ฏ๐˜ฅ๐˜ฐ๐˜ธ.โ€ (โ€ฆ and a confession: I had tea today. Donโ€™t tell the branding.)

Iโ€™ve been using Claude Code across Web, Windows, and Terminal modes (mostly Web), and after some airport lounge testing with a Gemma model on my laptop, I wanted to put the two together - Claude Code on my AWS server (g6.2xlarge), pointed at local Gemma4 models via Ollama.

The test case: a Code Audit prompt from GitHub (link at the bottom of the post - Roger Faught - is this your prompt? ), run against some old C code of mine - the same Unix program I used for earlier Gemma testing.

๐—™๐—ถ๐—ฟ๐˜€๐˜, ๐˜๐—ต๐—ฒ ๐—ฏ๐—ฎ๐˜€๐—ฒ๐—น๐—ถ๐—ป๐—ฒ:

  • Claude Code + GitHub CLI + Sonnet: it just ran. Full audit in about 6 minutes, consuming roughly 3% of my Pro subscription. Straightforward.

๐—ง๐—ต๐—ฒ๐—ป ๐˜๐—ต๐—ฒ ๐—ณ๐˜‚๐—ป ๐˜€๐˜๐—ฎ๐—ฟ๐˜๐—ฒ๐—ฑ ๐˜„๐—ถ๐˜๐—ต ๐—น๐—ผ๐—ฐ๐—ฎ๐—น ๐—บ๐—ผ๐—ฑ๐—ฒ๐—น๐˜€:

  • Gemma4:31b loaded onto the GPU fine (confirmed via ollama ps), but then the usual num_ctx problem showed up. Bumping the context window to 128k - and 64k - split the model ~50/50 between CPU and GPU, and everything ground to a halt.
  • Dropped to gemma4:12b, pushed the context window back up to 128k, and it stayed fully on the GPU. Interesting detail: going from 64k to 128k num_ctx bumped memory consumption from 8.4GB to 9.5GB. The audit ran in about 10 minutes and produced risk-based recommendations on the codebase - success. (๐˜๐˜ต ๐˜ธ๐˜ฐ๐˜ถ๐˜ญ๐˜ฅ ๐˜ฃ๐˜ฆ ๐˜ช๐˜ฏ๐˜ต๐˜ฆ๐˜ณ๐˜ฆ๐˜ด๐˜ต๐˜ช๐˜ฏ๐˜จ ๐˜ต๐˜ฐ ๐˜ต๐˜ณ๐˜บ ๐˜ต๐˜ฉ๐˜ฆ 26๐˜‰ ๐˜”๐˜ฐ๐˜Œ ๐˜ฎ๐˜ฐ๐˜ฅ๐˜ฆ๐˜ญ)

๐—ช๐—ต๐—ฎ๐˜ ๐—œ ๐—น๐—ฒ๐—ฎ๐—ฟ๐—ป๐—ฒ๐—ฑ:

  • Ollama + Claude Code Terminal + GitHub setup is straightforward. Once the context window is sorted - thatโ€™s been the recurring lesson with local models: num_ctx is almost always the first thing to check.
  • There may be a real fit for local models in my workflow: use them for smaller, simpler scripts, and save the larger frontier models (and my subscription budget) for the work that actually needs them.
  • Purpose achieved. The script ran, the audit completed, and Iโ€™ve got a working local option.

Curious how youโ€™re drawing the line between subscription and local models with tools like Claude Code (Qwen Coder anyone?)

๐—” ๐—ด๐—ผ๐—ผ๐—ฑ ๐—ฆ๐˜‚๐—ป๐—ฑ๐—ฎ๐˜† ๐—ฎ๐—ป๐—ฑ ๐—บ๐˜† ๐˜๐—ฒ๐—ฎโ€™๐˜€ ๐˜€๐˜๐—ถ๐—น๐—น ๐˜„๐—ฎ๐—ฟ๐—บ.

Want to Discuss This Topic?

Steve is always happy to have a direct conversation.