Claude Code v2.1.197: Sonnet 5 and the Million-Token Trap
This episode breaks down Claude Code v2.1.197, where Sonnet 5 becomes the default and a native 1M-token context window opens up new possibilities for giant repos and agentic workflows.
We also cover the practical gotchas: prompt caching costs, cache-busting root config changes, recursive bash loops, and the latest quality-of-life fixes like clickable file paths, disabled mouse hijacking, and the new streaming watchdog.
Chapter 1
Claude Code v2.1.197: Sonnet 5 and the 1M-Token Era
Lachlan Reed
Alright, so, I was- I was tweaking some deployment scripts yesterday and realized my terminal was suddenly pulling down Claude Code v2.1.197. And mate, this isn't just a minor patch. They have made Sonnet 5 the absolute default model now. We are talking a native one-million-token context window right in our local shell, brought to you by Jellypod AI.
James Turner
A million tokens natively? That is wild. I mean, you can literally feed a massive repo into the prompt now. But wait, at a million tokens, the API bill is going to hurt if you aren't careful. What's the damage on the pricing?
Lachlan Reed
Well, they've got this promotional pricing running through August thirty-first, 2026. It's two dollars per million input tokens, and ten dollars per million output. It's- it's dirt cheap for what it is, but, you know, only if you run it right. To get started, you just run npm install -g @anthropic-ai/claude-code, and then you can do /model to verify or switch over to sonnet-5. But James, there is a massive catch with how this thing handles that giant context.
James Turner
Let me guess. Prompt caching. If you aren't hitting the cache, every single CLI command is going to re-parse the entire codebase. That's- that is going to add up fast.
Lachlan Reed
Spot on, mate. It's exactly that. Claude Code relies heavily on prompt caching to keep those input costs low. But here's the kicker: if you touch high-level files, like- say you modify your root package.json or a main config file, it invalidates the entire cache. It forces a complete, from-scratch reload of that entire million-token context. Your next prompt will burn through the full input cost instead of hitting the cheap cached rate.
James Turner
Oh, wow. So if you're doing a big refactor and constantly touching the package manifest, you're basically burning money. And there's also the agentic loop issue, right? Sonnet 5 is incredibly capable, but if you let it run wild with bash commands...
Lachlan Reed
Oh, don't get me started. It gets itself into these recursive bash-debugging loops. It'll run a test, fail, write a fix, run the test again, fail differently, and just keep looping. Because it has that massive context window, it doesn't run out of memory, it just keeps burning through tokens while you're off making a coffee. You have to keep a real close eye on those agentic runs.
James Turner
Yeah, a self-correcting loop that eats a hundred thousand tokens a minute is a very expensive way to find a typo. But look, outside of the raw model power, they did ship some smaller quality-of-life stuff in v2.1.196 and .195 that actually solves some daily annoyances. Like, did they finally fix the terminal hijacking?
Lachlan Reed
They did! Thank goodness. You can now set CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1 as an environment variable. Before that, it would hijack your terminal hover and click events, which was bloody annoying if you just wanted to highlight text. Now you can disable it entirely.
James Turner
Thank god. That hover hijacking was driving me insane. What about file navigation? Because copying and pasting paths from the terminal into VS Code is a friction point I hit twenty times a day.
Lachlan Reed
Yeah, they sorted that too. They added clickable terminal file paths. So now, you can just Cmd-click or Ctrl-click right on the file path in your terminal, and it opens it up directly in your IDE or file explorer. It's super smooth. Plus, if your company has specific org-level default models set up, those will now actually show up properly when you run the /model settings command.
James Turner
Okay, that's clean. And what about when the stream just hangs? Sometimes the API stalls and you're just sitting there staring at a blinking cursor wondering if it's dead.
Lachlan Reed
Right, so they introduced a default streaming watchdog. It's- it's enabled by default via CLAUDE_ENABLE_STREAM_WATCHDOG=1. Basically, if the terminal goes five minutes without receiving a single event from the API, the watchdog kicks in, times out, and retries the connection automatically instead of just hanging forever.
James Turner
Five minutes is a bit long to wait, but hey, it beats a silent death. Sounds like v2.1.197 is a massive step forward if you respect the cache boundaries.
Lachlan Reed
Absolutely. Just watch your root configs, or your wallet will feel it. Catch you on the next one, mate.