Agent Shipped

Issue · 2026-11-23 · Claude Code · Hooks · MCP · Security

Claude Code 2.1.330: 30-Day Loops, Safer MCP Tokens, Hook Checks

Hi, Paul here. Claude Code shipped four releases this week (2.1.327 through 2.1.330), and a handful of the changes are worth five minutes of your time today. After that: a small tool for letting agents on a remote VM use your gh login without copying a token there, and an MCP server that checks a Rust port against your old code.

What changed

Claude Code 2.1.327 to 2.1.330. All four are in the changelog. The lines I'd act on:

What to do:

  1. Run claude update, then open /status. If it lists a hook matcher that never matches, that hook has been doing nothing. Fix the matcher or delete it.
  2. If you added an MCP server with its token pasted into the command, it is in your shell history. Rotate the token and re-add the server through stdin:
cat server.json | claude mcp add-json github -
  1. If a /loop or scheduled task predates 2.1.330 and you want the longer limit, recreate it.
  2. If an unattended job runs rm -rf on a top-level or working folder, expect it to be refused now. Point it at a narrower path.

Workflow of the week: agents on a VM, credentials on your laptop

The author of lend runs Claude Code and Codex on disposable VMs, and they still need his identity for gh, 1Password and SSH. Copying tokens to the VM exposes them to every process there, and ssh -A hands over every key without asking. His fix is lend: it sits in front of the laptop's SSH agent, so the VM sends a command request back over the forwarded socket, the laptop checks it against a local policy, asks for approval (Touch ID on macOS) and runs it locally, streaming the output back.

Set it up:

  1. Install on both the laptop and the VM:
brew install antoniomika/tap/lend
  1. Write a policy that denies by default and allows only what you need, such as gh with an args_prefix like ["pr", "view"], with "approval": "biometric:inline".
  2. Connect from the laptop: lend ssh --config ./policy.json -- agent-vm
  3. Give Claude Code the MCP server ("command": "lend", "args": ["mcp"]). It exposes one tool, run_local_command, which requires a reason. From a VM shell you can also run lend exec --reason "Read the repo description" -- gh repo view antoniomika/lend.
  4. Run lend doctor on the laptop and lend doctor --remote on the VM to check the setup.

Two extras: a secret_reader such as op can inject a value like GH_TOKEN into an approved command without the VM ever seeing it, and lend approve routes Claude Code's PermissionRequest hook to the laptop dialog.

Limits, from the post: approved commands run as you with no sandbox, so approving a shell or interpreter approves anything. Anyone on the VM who can reach the socket can make requests during an open session (each still needs approval). It's early software, has no PTY, and biometric approval is macOS only.

My take: the deny-by-default policy is the point. Start with read-only gh subcommands and add more only when an agent actually asks.

Copy this: rust-anything

rust-anything helps you rewrite an app in Rust one piece at a time. It doesn't translate code; your agent writes the Rust. It records what the original returns or throws on generated edge cases and your inputs, generates the Rust crate and a wrapper so callers keep the old API, then replays every recorded case against the port. A gate step must pass before a port counts as done. It works with TypeScript/JavaScript, Python, C, Go, Ruby and Java.

Install (MIT license):

cargo install rust-anything
rust-anything setup

setup adds the MCP server to ~/.claude.json and the skill to ~/.claude/skills/, keeps a .rust-anything.bak copy of files it changes, and --remove undoes it. There's also a plugin route: /plugin install rust-anything --marketplace erkamyaman/rust-anything (the CLI still has to be on your PATH).

The README's own warning matters: recording and replay run your code many times, so code that writes files, hits a database or calls the network does that on every case. Run it on a copy with a test database and no production credentials.

Worth your time

Reply and tell me

Where do your agents get their credentials: copied tokens, a forwarded agent, or something like lend? Hit reply with your setup. I read every one, and the best ones end up in a future issue.

Get the field guide

Join builders who use coding agents every day. Free, twice a week, unsubscribe in one click.

No spam. The CLAUDE.md starter pack comes in your confirmation email. Not seeing it? Check spam or Promotions.

Related guides