Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 8 min read

Claude Code 2.1.335 Adds an Audit for Outdated Agent Code

Claude Code 2.1.335 shipped December 3, adding /claude-api harness-audit to flag agent code built for older models claude mcp add --web now adds a remote MCP server as a connector straight from the terminal on paid plans

  • Claude Code 2.1.335 shipped December 3, adding /claude-api harness-audit to flag agent code built for older models

  • claude mcp add --web now adds a remote MCP server as a connector straight from the terminal on paid plans

  • The /model, /effort and four other menus now get tab completion in the terminal

  • 76 bug fixes landed, including one where starting several worktree agents failed with a commondir error

Anthropic shipped Claude Code 2.1.335 on December 3, and the feature worth your five minutes isn't one you'll run every day. It's /claude-api harness-audit, a command that reads your own agent code and flags the parts written for a model that's already out of date. I've got a handful of scripts calling the Claude API directly, written at different points over the past year, and this is the first thing in this release I'm actually going to use on them.

Nothing in this release changes how Claude Code works day to day. It's a maintenance drop with one genuinely useful new tool buried in it, a terminal shortcut for MCP setup, and a long tail of fixes.

What Does the New Harness Audit Actually Check?

The changelog describes it plainly: it finds agent harness code written for older models and proposes fixes as a diff. Specifically, it looks at loop limits, sub-agent setup, context management, injected reminders, and session-start code. That's the glue most people write once, when they first wire a script up to the Claude API, and then never touch again.

Here's why that glue goes stale. A loop limit you set because an older model sometimes looped forever on a tricky tool call doesn't need to be that conservative once a newer model handles the same case cleanly. A context-management routine that trims history aggressively because an earlier context window was smaller is now fighting against a model that can hold far more.

None of that breaks anything. It just quietly wastes turns, tokens, or both, and you'd never notice unless you went looking.

I don't have a sprawling agent fleet here. Just a handful of small jobs calling the API, none of which I've reread since whatever model I was using when I first wrote them. That's exactly the kind of script this tool is built for, the ones you set up once and then trust without checking.

I haven't opened some of those files in months. That's the point of a tool that reads the code and hands you a diff instead of asking you to remember what you wrote and why.

It's the same instinct behind /claude-api prompt-audit, which also got an update in this release: it now flags broad ask-first rules and always-delegate instructions that eat into the context a model actually needs to do the work, while still keeping the stop-early guidance that matters. Both tools exist for the same reason. Code written for "whatever Claude I was using at the time" ages the moment a new model ships, and nobody goes back to check unless something forces them to.

If you've built anything that calls the Claude API on a schedule, in a webhook, or from a cron job, and you can't remember the last time you reread the loop and retry logic, this is the five-minute check worth doing before you touch anything else in this release. It costs nothing to run and it only ever proposes a diff, so you decide what actually changes.

How Do You Add a Remote MCP Server From the Terminal Now?

Before this release, adding a remote MCP server meant leaving your terminal, going to claude.ai's connector settings, and clicking through there. Now claude mcp add --web does it from the command line, on paid plans. You type the command, it adds the server as a connector, and you're back to work without switching windows.

It's a small change, but it fits the direction MCP has been moving in. I wrote about MCP servers shipping their own skills a few releases back, and this is the same theme: fewer places you have to go to manage the tools Claude can reach.

Each one on its own looks minor. Stacked up over a year of releases, MCP setup has gone from a multi-step dance to something you barely think about.

I'd use this the next time I wire up a new connector rather than go back and redo the ones already working. There's no reason to touch a connector that's fine, and the command doesn't do anything a working setup needs. The friction it removes is specifically the context switch, not the setup itself, which was never the hard part once you'd done it once.

There's a boundary worth knowing too. claude mcp add --web adds the server as a claude.ai connector, which is only available on paid plans. If you're on a free account, you'll still need the browser for this one, at least until that changes in a later release.

What Else Shipped Alongside It?

A batch of terminal quality-of-life changes landed together. Tab completion now works on /model, /effort, /mcp, /advisor, /tui, and /color, plus the /plugin and /config menus. Enter runs whatever you typed unless you've arrowed down to a specific row, which matters if you've ever hit Enter on a half-typed command and gotten the wrong menu item instead.

Click-to-view is new too. In fullscreen outside VS Code, inside a git repository, with a window at least 110 columns wide, clicking a file path in a reply opens that file beside the chat at the exact line Claude named. It's a narrow set of conditions, but when they're met, it saves the usual copy-path-then-open-it-yourself step.

Linux desktop users get /desktop and claude --desktop, bringing a feature that macOS and Windows already had. There's also a new /access command that shows which verification programs your claude.ai account belongs to, like the Cyber Verification Program, instead of you having to ask your admin or dig through account settings to check.

And on the security side, computer use on macOS moved to stricter rules: more actions get refused, and more apps have less access by default. That's not a feature most people will notice day to day, but if you use computer use for anything sensitive, it's worth knowing the defaults just got tighter, not looser.

None of these reshape how Claude Code behaves day to day. They're the kind of release that adds up over a year without ever being the headline.

Which of the 76 Bug Fixes Matter for a Solo Builder?

Seventy-six is a lot, even for a project that ships this often. Most won't touch you. A few are worth knowing.

Starting several worktree-isolated agents at once used to fail with "failed to read commondir" sometimes. That's fixed now. I've written before about worktree bugs biting people running parallel branches, and this is a different failure in the same area. If you spin up more than one worktree-based session at a time, this one was probably costing you a retry here and there without you connecting it to worktrees specifically.

There's also a fix for charts misreading some cells: (7 was drawn as a negative number, $1.2bn lost its multiple, 1e-400 and malformed durations came out as zero, and a table with no header row could lose its first row entirely. If you've had Claude generate a chart from a messy spreadsheet or scraped data, this is the kind of silent misread that would've thrown your numbers off without any error to point at.

Nobody flags a wrong chart unless they already know the right answer. That's what made this one worth calling out.

The model button in the Claude mobile apps keeping the old model after a /model change in a cloud session is fixed as well. Small, but annoying if you switch models mid-session and then check your phone expecting the new one to show.

Two more are worth a mention for anyone running Claude Code on infrastructure rather than solo. Self-hosted runners were reporting a session as failed after the service had already archived it or handed it to someone else, which meant a post-session hook could fire with the wrong status attached. And /schedule wasn't listing an organization's self-hosted environments at all, so a scheduled task would quietly create a new cloud environment instead of reusing one that already existed. Neither touches you if you're running Claude Code against your own account without a fleet of runners behind it, but if you are, both were the kind of bug that costs you time before you figure out it's the tool, not your setup.

None of these are dramatic on their own. They're the ordinary cost of running a tool this actively maintained, and a fix list this long means something in it has probably been bothering you without your ever filing it away as a known bug.

Bottom Line

Claude Code 2.1.335 isn't the release where the version number matches the size of the change. The harness audit is the one feature here that's actually worth setting aside time for, especially if you've got any script calling the Claude API that you wrote more than a model generation ago and haven't reread since. Everything else, the MCP terminal shortcut, the tab completion, the Linux desktop support, the 76 fixes, is useful in the quiet way routine releases usually are.

It's not a release that asks much of you. A few minutes with one command is the whole cost.

My own plan is to run /claude-api harness-audit against every one of those scripts this week, starting with the oldest. If it flags the same kind of stale loop limit or leftover context trimming more than once, I'll treat that as a pattern worth fixing everywhere at the same time rather than one script at a time.

What I wouldn't do is wait for a bigger release to justify the check. The whole point of a tool like this is that it's cheap enough to run on something small, and the cost of not running it is a script that keeps working just fine while quietly leaving performance on the table. That's worth more to me than any single feature in this changelog: knowing which of my own old code is running on assumptions a newer model already made obsolete, instead of finding out the hard way months from now.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.