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:
- 2.1.327:
claude mcp add-json <name> -now reads the server's JSON from stdin, "so tokens can stay off the command line." It isn't available inside a Claude Code session, so run it from your own shell. - 2.1.327:
/statusnow lists broken agent, skill, command and output style files, ignored permission settings, and "hook matchers that never match." - 2.1.328:
mcp_toolhooks accept"onFailure": "block", as command and HTTP hooks already do: "a hook whose call fails blocks the action." - 2.1.329: the trust dialog now says where a folder's hooks are declared.
- 2.1.330: recurring scheduled tasks and
/looprun "up to 30 days instead of 7" while their session keeps running. Tasks made before this release still end at 7 days. - 2.1.330: more
rmcommands aimed at the root, home, a top-level folder or the working folder now ask for approval, and are refused where nobody can answer.
What to do:
- 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. - 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 -
- If a
/loopor scheduled task predates 2.1.330 and you want the longer limit, recreate it. - If an unattended job runs
rm -rfon 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:
- Install on both the laptop and the VM:
brew install antoniomika/tap/lend
- Write a policy that denies by default and allows only what you need, such as
ghwith anargs_prefixlike["pr", "view"], with"approval": "biometric:inline". - Connect from the laptop:
lend ssh --config ./policy.json -- agent-vm - 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 runlend exec --reason "Read the repo description" -- gh repo view antoniomika/lend. - Run
lend doctoron the laptop andlend doctor --remoteon 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
- How the Claude Code team thinks about verification: Addy Osmani on verify skills, differential tests and one rule worth stealing: "If a change can modify the check that judges it, the check is broken."
- External sandboxes for coding agents: Simon Willison and Prime Radiant run the agent outside a sandbox and its code inside one, with three open implementations, a host allow-list proxy and credential replacement.
- Windows 11 records which coding agents you run: a teardown of a DiagTrack component that notes executables like
claude.exeandcodex.exe. Turn off "Send optional diagnostic data" if that bothers you. - Codex 0.170.0: realtime voice calls in the TUI, auto-refreshed auth headers for OpenTelemetry HTTP exporters, and experimental support for identically named MCP servers across environments.
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.