The Claude Code Changelog
All Episodes

Claude Code v2.1.198: Background Agents Go Fully Hands-Off

Claude Code’s latest release brings isolated git worktrees, automated commits, pushed changes, and draft PR creation to background agents so they can run without constant supervision. The episode also covers notification hooks, environment variable gotchas, automatic AWS token refresh, and improved retry handling for flaky network errors.

This show was created with Jellypod, the AI Podcast Studio. Create your own podcast with Jellypod today.


Chapter 1

Claude Code v2.1.198: Background Agents Unleashed

James Turner

Alright, imagine running a command, walking away to grab a coffee, and coming back to find your AI assistant didn't just write the code--it actually spun up a completely isolated workspace, ran the tests, committed the changes, pushed them to your repo, and opened a clean draft pull request for you. That is exactly what is happening in the brand new Claude Code v2.1.198 release, brought to you by Jellypod AI. No more baby-sitting the terminal.

Lachlan Reed

Oh, fair dinkum, James. That is absolutely massive for anyone sick of watching the terminal spinner like a hawk. I mean, we've had background agents before, but usually, they just stop. They get to the end of the work, and then they sit there, twiddling their virtual thumbs, waiting for you to type yes or hit enter to approve the push. Now? It's completely hands-off.

James Turner

Exactly. Let's break down how this actually works under the hood. When you run claude agents now, the CLI spawns a parallel background run. But instead of messing with your active working directory--which would be a total nightmare if you're trying to write code at the same time--it leverages a git worktree. Specifically, it isolates everything under .claude/worktrees/. So, you can keep hacking away in your main directory, while Claude is in its own sandbox, totally free from code stomping.

Lachlan Reed

Yeah, because there is nothing worse than an AI overwriting the file you literally just spent twenty minutes refactoring. That git worktree trick is brilliant. But, uh, what happens when it's done? You mentioned it opens a draft PR?

James Turner

Right, so once the agent finishes its task, it automatically commits, pushes to your remote, and raises a draft PR. And you don't have to guess when that happens because they've added system notification hooks. You get agent_needs_input if Claude gets stuck or blocked on something, and agent_completed when the draft PR is ready. Plus, if you're using Focus Mode on macOS or Windows, these notifications are beautifully grouped into a single, clean count so your desktop doesn't look like a spam inbox.

Lachlan Reed

Right, right. But wait a second, James. If this thing is running headless in the background, how does it handle credentials? Like, if my local terminal relies on custom environment variables, does the background supervisor inherit those?

James Turner

Ah, that is the major gotcha with this release. The background supervisor process does *not* inherit gateway environment variables, like ANTHROPIC_BASE_URL or special proxy settings, directly from your active shell. You absolutely must define them inside .claude/settings.json in an explicit env block. And because it's running headless, you've got to make sure your git remote credentials--whether you're using SSH keys or HTTPS helper tools--are fully configured and accessible globally, or the push will fail silently.

Lachlan Reed

Ah, that makes sense. Flat out like a lizard drinking if you forget that setting, eh? You'll be wondering why your headless agent is throwing auth errors. But speaking of authentication, they've actually cleaned up another massive pain point in this version. You know that annoying loop where your AWS STS token expires, and Claude suddenly screams "Please run slash login" mid-task?

James Turner

Oh, it's the worst. It completely kills the flow.

Lachlan Reed

Well, they fixed it! Now, awsAuthRefresh runs completely automatically the second those STS tokens expire. It just silently refreshes behind the scenes. On top of that, the built-in Explore agent now actually inherits your main session's model--though it's capped at Opus--instead of just defaulting to Haiku every single time. And if you have extended thinking configs turned on, those subagents inherit them too.

James Turner

Yes! And they finally added automatic exponential backoff for transient mid-response errors, like ECONNRESET. Instead of just crashing your entire multi-step agent run because of a one-second network blip, Claude Code will now pause, retry, and keep going. It makes the entire background automation loop incredibly robust. If you haven't run npm i -g @anthropic-ai/claude-code to grab v2.1.198 yet, do it today and let those background agents do the heavy lifting.