
Code Mode Meets Agent Teams and Stricter Permissions in Claude Code 2.1.326
Discover how Claude Code 2.1.326 allows Code Mode to run alongside agent teams, reducing round trips by letting workers batch multi-file operations locally. We also cover significant permission updates, including stricter wildcard shell rules, tighter sandbox file controls, and new git guards for subagents in worktrees.
Chapter 1
Code Mode Meets Agent Teams in 2.1.326
James Turner
Code Mode can finally run alongside agent teams. That's the headline in Claude Code 2.1.326, released November 16th, and it's brought to you by Jellypod AI, by the way. Last time we covered 2.1.323, and the catch was that Code Mode and teams just couldn't coexist.That catch is gone.
Lachlan Reed
Good news for anyone who hit that wall. So what actually changed? If you'd already turned Code Mode on, sessions with teams enabled now just start in Code Mode. No extra flag, as far as the changelog says.
James Turner
Right, and the mechanism matters. Normally Claude runs a loop, one Bash call, one Read, one Edit, each a round trip. In Code Mode it writes JavaScript instead, run locally in your session. Something like a shell call with ripgrep, listing files matching a pattern under src, then filtering inside the script, so only the distilled result goes back to the model. Less context burn, fewer turns.
Lachlan Reed
So with a team, each worker can batch its own steps. Picture three teammates each sweeping a different part of a codebase. Before, that's a pile of little tool calls eating context. Now each one can do a multi file pass in one go. That's the pitch, anyway. I'd measure it on your own repo before promising anyone miracles.
James Turner
Fair to be cautious. Now, how do you use it? Turn on Code Mode, keep agent teams enabled, and start a session. To see what Claude actually ran, press Ctrl+O in the transcript viewer. The generated script is hidden from the chat, so that's your audit trail. I'd look at it early, just to know what your agents are really executing.
Lachlan Reed
Which leads into the caveats, because there are real ones. The dollar sign shell helper in Code Mode now refuses some values with an error, and nothing runs. Permission checks are tighter too, so some commands that ran before will ask or get refused. If your unattended workflows suddenly stall, start there.
James Turner
And the wider release is heavy on permissions. Auto mode now ignores some wildcard shell allow rules, like ones naming no program or starting with dollar HOME, so the safety classifier decides those instead. Windows backslash path wildcards can get blocked, though exact rules keep their allow. The changelog says they plan to restore rules starting with dot backslash.
Lachlan Reed
Also sandboxed commands on macOS, Linux and WSL no longer write to some sensitive home folders by default. If you need one, allow it with sandbox dot filesystem dot allowWrite in user or managed settings. And Claude's file tools now refuse writes to sign in files like dot credentials dot json. Sensible, honestly.
James Turner
One more for team users. Subagents isolated in a worktree now refuse some git commands in Bash that could rewrite branches shared with your checkout. That's a nice guardrail when several agents are working at once.
Lachlan Reed
Quick small stuff. Ctrl+O now shows hidden startup notices. /status gets a row telling you when a provider or something like DISABLE_TELEMETRY turns features off. Subagent views show an esc to stop hint. There's a new OTEL_RESOURCE_INCLUDE_HOST, off by default, that adds host name and host id to OpenTelemetry attributes. And you get a startup warning when an allowedTools, disallowedTools or tools entry doesn't look like a complete rule.
James Turner
So the takeaway: update, turn on Code Mode with your teams, peek at the script with Ctrl+O, and re-check any allow rules that relied on loose wildcards. That's it for today.