Key Updates in Claude Code v2.1.326 - Changes to Auto Mode Allow Rules and Sandbox Write Destinations

Key Updates in Claude Code v2.1.326 - Changes to Auto Mode Allow Rules and Sandbox Write Destinations

A look at the key updates in Claude Code v2.1.326, with before/after examples of behavior changes such as auto mode allow rules and sandbox write targets. Today I tried Code Mode with agent teams enabled and confirmed teammates also run in Code Mode.
2026.11.17

This page has been translated by machine translation. View original

I'm Ishikawa from the Cloud Business Division. This article introduces the update of Claude Code v2.1.326 (2026-11-16). It includes changes that alter behavior under your current settings, such as auto mode allow rules and sandbox write destinations. I enabled agent teams, which could not be used together last time, tried Code Mode, and confirmed that teammates also run in Code Mode.

Here is the previous update article.

https://dev.classmethod.jp/articles/20261114-cc-updates-v2-1-325/

Update Summary

The v2.1.326 CHANGELOG has 367 entries. In this article's classification, there are 223 fixes, 43 developer experience items, 36 security items, 27 breaking changes, 14 improvements, 12 new features, 11 performance items, and 1 internal change. Many items concern permission checks and the sandbox, and they include changes where operations that previously ran now require confirmation or are denied in auto mode, bypass permissions mode, the PowerShell tool, and more.

Notable Updates

Some wildcard allow rules are now ignored in auto mode

In auto mode, some wildcard shell allow rules, such as those that do not specify a program or that start with $HOME, are now ignored and evaluated by the safety check instead. In addition, wildcard allow rules whose program is a Windows backslash path are now also subject to evaluation, and those invocations may be blocked. Exact-match rules remain allowed, and rules starting with .\ are noted as planned to be restored.

If you use some wildcard allow rules in auto mode, such as ones starting with $HOME, I think it is a good idea to check after updating that your usual operations still run without confirmation.

Commands in the sandbox no longer write to some sensitive home folders

Commands in the sandbox on macOS, Linux, and WSL no longer write to some sensitive home folders by default. Some of them can be allowed with sandbox.filesystem.allowWrite in user settings or managed settings. The CHANGELOG does not list the names of the target folders.

If you use tools that write under your home folder from the sandbox, I think it is a good idea to check their behavior after updating and see whether you can allow the writes with sandbox.filesystem.allowWrite as needed.

Code Mode can now be used with agent teams enabled

You can now turn on Code Mode while agent teams are enabled. Since my attempt got off to a bad start in the previous blog post, I'm personally glad about this update. If Code Mode was already on, sessions with teams enabled start in Code Mode.

If you turn on Code Mode through env in user settings, sessions with agent teams enabled will also start in Code Mode, so I think it is a good idea to check the startup display once after updating.

Writes to Claude Code's sign-in files are now denied

Claude's file tools now deny writes to Claude Code's sign-in files such as .credentials.json. Bash permission checks also now ask for confirmation first for more commands that touch sign-in files.

This change prevents Claude's file tools and shell commands from mistakenly overwriting sign-in files, and I think it is reassuring for those who run unattended in auto mode or bypass permissions mode.

Fixes for Bash grep and parallel MCP tool call issues

An issue where the Bash tool's grep silently skipped some text files has been fixed. Also fixed is an issue where, when two long results arrived in the same millisecond, parallel MCP tool calls loaded the saved result of another call (anthropics/claude-code#105138).

These fixes relate to missed grep results and mixed-up results in parallel MCP tool calls, so I think it is worth updating early if you use them.

Fix for compaction issues on Bedrock, Vertex, and Foundry

Fixed an issue where, when using Bedrock, Vertex, or Foundry, and when telemetry was turned off, compaction would sometimes reply to the user's message instead of summarizing, or leave Claude's last response out of the summary.

If you use Claude Code via Amazon Bedrock and ran into compaction responding to a message instead of summarizing, or the last response missing from the summary, I think it is worth checking whether this has improved.

Update Details

New Features

  • A warning is now shown at startup when the values of --allowedTools, --disallowedTools, and --tools contain entries that do not look like complete rules
  • Added OTEL_RESOURCE_INCLUDE_HOST, which includes host.name and host.id in OpenTelemetry resource attributes (off by default)
  • Added /help <command>. In addition, fixed an issue where built-in commands such as /clear --help were run at an idle prompt without showing usage
  • /status now has a line showing that a feature is turned off by the provider or an environment variable such as DISABLE_TELEMETRY
  • Startup notices that were hidden can now be shown with Ctrl+O
  • Added a message explaining why MCP server loading stops when an administrator adds managed-mcp.json during a session
  • Also added: an empty-prompt hint after a request fails, an esc to stop hint in the subagent view, a note when a malformed plugin.json field is ignored, and overflowX="scroll" on mod Box and maxLines and wrap="clip" on Text

New features of the VS Code extension are introduced under "VS Code Extension".

Improvements

  • In Remote Control, responses from claude remote-control, Claude Desktop, and VS Code sessions are now streamed to the smartphone or browser as they are written
  • The context used by the terminal /update-config was reduced from about 93,000 tokens to about 13,000 tokens, and for rejected settings edits only the changed settings are quoted
  • Improved the handling that preserves a PreToolUse hook's updatedInput when multiple hooks respond to a tool call, so the rewrite is applied in more cases
  • When a PreToolUse hook exits with exit code 127, it now indicates that the check may not have run
  • The display of hooks in the transcript changed: failures are shown in red instead of gray, hooks that stop Claude are shown in yellow, and the reason is shown below
  • For long browser_batch calls in Claude in Chrome, the maximum time to wait for a response was extended from 90 seconds to 150 seconds, reducing lost completed results
  • Errors for settings files and .mcp.json with broken JSON now show the line and column
  • Commands that are turned off by the provider, sign-in, or environment variables such as DISABLE_TELEMETRY now show the reason instead of "Unknown command"
  • Auto compaction in plan mode was changed to use the responding model, such as Opus with opusplan. As a result, costs may increase
  • The /claude-api skill was changed to build agents on top of Managed Agents by default, except when you want to host the agent loop yourself
  • For performance, responsiveness of input, streaming, and resizing in long sessions, response time after file reads and edits (especially on Windows), and CPU usage when running more than 20 subagents were improved, and on Windows the first Bash command of a session is about 1 second faster
  • Also changed: the screens of /plugin, the sign-in screen, the display of dialogs and key hints, the progress display of /doctor, the notification when a Monitor expires, and how to answer questions such as the /plugin uninstall prompt (y, n, and u can no longer be used to answer)

Security

In addition to the items introduced under Notable Updates, there are the following fixes and changes.

Permission Checks

  • Bash permission checks were improved so that some commands ask for confirmation first and are denied in situations where no one can answer
  • Code Mode permission checks were improved so that more commands in the sandbox ask for confirmation or are denied. The Code Mode $ shell helper rejects some values with an error (nothing is executed)
  • Fixed an issue where Bash commands that delete or overwrite files (find -delete, cat a > b, sort -o) were summarized as searches or reads in the transcript
  • Subagents isolated in a worktree now have some git commands denied in Bash, in any repository, that could rewrite the branch shared with the checkout (the main session is not affected)
  • Fixed an issue where, when a tool was requested by its exact name, tool search could load a tool from a different MCP server. You may be asked to confirm that tool again
  • Fixed an issue in some cloud sessions where Artifact tools were provided to subagents that specified Artifact in disallowedTools
  • Fixed an issue where, when a managed-settings PreToolUse hook denied a direct tool call, no OpenTelemetry tool_decision event or permission_denials entry was left

Folder Trust Confirmation and the auto mode Suggestion

  • The folder trust confirmation at startup and for /cd now shows the names of the project settings files that Claude Code loads. At startup, files that run commands are marked
  • Fixed an issue where, in the folder trust confirmation shown under an already trusted parent folder, pressing ↑ and then Enter was answered as Yes
  • Fixed an issue where pressing an extra Enter at the end of setup accepted the suggestion to make auto mode the default, and an issue where a message typed over the startup auto mode suggestion was lost and that Enter accepted the suggestion

Sandbox

  • Bash sandbox protection on macOS, Linux, and WSL was improved
  • The Bash sandbox now moves aside unexpected entries in the repository's .git folder after a command runs
  • Edits in the session's mods folder now ask for confirmation more often, and the folders that commands in the sandbox can write to were reduced. If all edits are confirmed, links there to unreadable paths or network paths are removed

Credentials and Secrets

  • Secret masking was improved in push notifications from Remote Control and cloud sessions
  • Terminal /logout and claude auth logout now retry revoking the login, and if the server does not confirm, they show where to revoke it
  • Fixed an issue where background sessions lost the LLM gateway exported by the shell, for example after a crash or when reopened from a different folder. They now stop before a request to the model
  • For Claude in Chrome permission requests from terminal sessions via Remote Control, claude.ai now shows the site Claude is trying to operate (including when already allowed)
  • Other changes include denying some device files and process files, confirmation for some cp and mv, confirmation for commands containing very long values that cannot be fully checked, denying malformed PowerShell commands, ExitWorktree refusing to delete a worktree that may have background processing running (unless Claude passes discard_changes), and ignoring Content-Length and Transfer-Encoding in HTTP hooks

Fixes

This is an excerpt focusing on fixes related to stability and usability.

  • Fixed an issue where, when standard output was redirected, the claude purge confirmation was not shown, and pressing Enter once without seeing it could delete project data. The confirmation is now shown in the terminal
  • Fixed an issue where permission rules added in /permissions or in the main conversation's tool confirmation, and folders added with /add-dir, appeared to be saved even when they could not be written to the settings file. The terminal now warns and shows the file name
  • Fixed an issue where a prompt typed after an option that takes a list, such as --add-dir or --allowedTools, was discarded without a message
  • Fixed an issue in resumed sessions where the most recent turn was lost after a crash if the previous turn ended with an empty response, and earlier conversation history was lost when Claude Code ran out of memory
  • Fixed an issue where Vertex AI sessions with many images stopped with a 400 error saying the request size exceeded the 30 MB limit, without compaction and retry
  • Fixed the error when max_tokens exceeds the model's limit. The request is now retried with the maximum reported by the Anthropic API
  • Fixed an issue where, due to causes such as values saved by an old Claude Code, auto mode kept using the local classifier that counts toward usage
  • Fixed an issue where pressing Backspace and Enter right after opening the spending limit menu deleted the monthly limit without confirmation
  • For MCP settings and display, fixed an issue where MCP tools with anyOf or oneOf at the root showed Claude only the argument shape of the first branch, an issue where /mcp did not show why a local (stdio) MCP server failed to start, and an issue where claude mcp add-json returned "Invalid configuration: : Invalid input" for most mistakes
  • Fixed an issue where claude -p displayed nothing in the terminal while retrying overloaded or failed API requests, or when it failed with text output redirected or captured
  • Fixed an issue where failed, blocked, or denied commands looked successful in collapsed tool rows. It now shows "· 1 failed" or indicates that the command was not run
  • Fixed an issue where search in /resume, /plugin, /permissions, and /config ignored IME input, voice input, and fast typing. I think this is a quietly welcome fix for those who search in Japanese
  • Many other minor bugs were also fixed, including fullscreen display and rendering during streaming, sign-in and /privacy-settings, Remote Control and cloud sessions, the display of background agents, and /rewind

VS Code Extension

  • Added the claudeCode.promptSuggestions setting to turn off prompt suggestions
  • Improved the speed of Edit and Write. If the editor reports no problems for a file that is not open in a tab, it no longer waits for new problems
  • Fixed an issue where "Rewind code to here" in a forked conversation rewound one extra turn and deleted files created in that turn
  • Other fixes and changes include sign-in, the Memory dialog, /ide connection, live output of running commands, and the display of high-contrast themes

Breaking Changes

Wildcard allow rules in auto mode

Before (through v2.1.325): Even in auto mode, shell commands matching an allow rule like the following were allowed according to the rule. The following is a configuration example (~/.claude/settings.json).

{
  "permissions": {
    "defaultMode": "auto",
    "allow": ["Bash($HOME/scripts/*)"]
  }
}

After (v2.1.326 onward): Even with the same settings, this rule starting with $HOME is ignored in auto mode and evaluated by the safety check. The CHANGELOG does not describe an alternative way to write it.

Sandbox write destinations

Before (through v2.1.325): With the following settings, writes from commands in the sandbox to some sensitive home folders were not denied by default.

{
  "sandbox": {
    "enabled": true
  }
}

After (v2.1.326 onward): With the same settings, those folders are not written to by default. Some can be allowed with sandbox.filesystem.allowWrite in user settings or managed settings. The following is a configuration example (the folder name is a placeholder).

{
  "sandbox": {
    "enabled": true,
    "filesystem": {
      "allowWrite": ["~/<書き込みを許可するフォルダ>"]
    }
  }
}

The way allowWrite is written follows the example in the official documentation (sandboxing). The CHANGELOG does not list the names of the target folders or which folders can be allowed with allowWrite.

Managed settings autoMode.environment and "$defaults"

According to the official documentation (auto-mode-config), if the autoMode.environment array does not include "$defaults", it replaces all built-in entries. From v2.1.326, this list in managed settings also replaces all built-in entries in the Claude Desktop and Agent SDK apps.

Before (through v2.1.325): Managed settings that did not include "$defaults", like the following, were not treated as replacing all built-in entries in the Claude Desktop and Agent SDK apps. The following is a configuration example (the wording of the entry is the example from the documentation).

{
  "autoMode": {
    "environment": [
      "Source control: github.example.com/acme-corp and all repos under it"
    ]
  }
}

After (v2.1.326 onward): To keep the built-in entries, add "$defaults" or copy the entries for sensitive targets.

{
  "autoMode": {
    "environment": [
      "$defaults",
      "Source control: github.example.com/acme-corp and all repos under it"
    ]
  }
}

Built-in gh api in the self-hosted runner

Linux and macOS sessions without gh are now offered the built-in gh api by default. Requests go through Anthropic, and if there is a GitHub sign-in, Anthropic attaches that credential. The --help description is as follows.

% claude self-hosted-runner --help | sed -n '/--use-anthropic-gh/,/^  --[a-z]/p'
  --use-anthropic-gh [bool]   Offer Claude Code's built-in `gh api` to sessions on this runner where
                              no gh is installed. It reaches github.com's REST API only (no GraphQL,
                              no other gh command, no GitHub Enterprise host). Its requests go
                              through Anthropic, which adds the GitHub credential, if any, that
                              Anthropic holds for the session, for that session's repositories: in
                              a person's own session, that person's GitHub sign-in. git is untouched,
                              and an installed gh is left alone. A session that Anthropic-managed git
                              serves is not affected. Withheld (with true, the log says why) on
                              Windows, at --capacity above 1, with --agent-proxy-url, with
                              --exec-path or a command hook, while nonessential traffic is
                              disabled, with a model provider other than Anthropic's own API, on a
                              runner started from a Claude Code session's shell, in code reviews,
                              in tools-only sessions, and where the older git proxy carries a
                              session's git. With true, the runner's log says for each session
                              whether it was offered and whether Claude Code set it up. By default it
                              says so once at start-up, and where Claude Code set it up.
                              Default: on. false, 0, no or off turns it off.
                              [env: SELF_HOSTED_RUNNER_USE_ANTHROPIC_GH=1]

Before (through v2.1.325):

% claude self-hosted-runner

After (v2.1.326 onward): The same command offers the built-in gh api. To not offer it, add --use-anthropic-gh false.

% claude self-hosted-runner --use-anthropic-gh false

List of breaking changes

Target Before After / Required action
Wildcard shell allow rules in auto mode (those that do not specify a program, those starting with $HOME, etc.) Allowed according to the rule Ignored and evaluated by the safety check
Wildcard allow rules in auto mode whose program is a Windows backslash path — Subject to evaluation, and the invocation may be blocked. Exact-match rules remain allowed. Rules starting with .\\ are planned to be restored
Some shell commands in auto mode Were executed Are stopped
Some Bash commands on macOS Were executed Ask for confirmation or are denied
Some tool calls in bypass permissions mode — Ask for approval, or are denied if no one can confirm
Some PowerShell tool commands — Ask for confirmation first. In unattended runs, they are denied unless allowed by an allow rule, auto mode, or bypass permissions mode
Some PowerShell tool commands in bypass permissions mode — Ask for confirmation even in bypass permissions mode, and some are denied
Some lines that set environment variables when auto-allow is off (Bash sandbox) — Ask for confirmation first. They may be denied in unattended runs
Writes from commands in the sandbox to some sensitive home folders (macOS, Linux, WSL) — Not written to by default. Some can be allowed with sandbox.filesystem.allowWrite in user settings or managed settings
Commands rewritten at approval by permission hooks or SDK hosts — If the original command was judged to be in the sandbox, it runs in the sandbox. The approving side can add dangerouslyDisableSandbox: true
sandbox.excludedCommands in claude mcp serve — Ignored
Some nonexistent --add-dir folders on Linux and WSL — Created before each command in the sandbox. Commands that create those folders may fail, be skipped, or create things inside them
Hook "decision": "block" — Takes effect in more cases. Hooks that always output this may start blocking calls
Managed settings autoMode.environment without "$defaults" — Replaces all built-in entries in the Claude Desktop and Agent SDK apps too. Add "$defaults" or copy the entries for sensitive targets
Terminal and VS Code sessions of organizations using the Claude Code + Cowork HIPAA configuration — Start in auto mode by default. Can be turned off with disableAutoMode
Terminal and VS Code sessions with no mode set (when organization policy is not loaded) Started in Manual mode Start in auto mode
Sessions that start in auto mode by default — Use the server-managed defaultMode after settings are loaded. If settings fail to load and there is no saved copy, and policy loading fails or policy requires it, it becomes Manual
--add-dir and /add-dir in local terminal sessions — Show a trust confirmation for folders not yet trusted. claude --bg rejects such folders
Self-hosted runner with --trust-workspace false — Ignores the settings of more repositories. Specify such values in user settings or managed settings
Linux and macOS sessions of the self-hosted runner without gh — Offer the built-in gh api by default. Can be turned off with --use-anthropic-gh false
Enabled plugins with a malformed display field in plugin.json Were rejected Loaded together with hooks and MCP servers. Administrators should review the plugins they distribute
Connections through the Remote Control proxy — Use a CONNECT tunnel. With a proxy that rejects CONNECT, Remote Control stops with an error
Session debug logs written by Remote Control --verbose — Output to ~/.claude/child-logs/
--bare sessions with an unapproved API key — Refuse to move to the background in most configurations. If the background service does not have the key, claude --bare --bg exits with an error
--await-initialize combined with --bg or --worktree --tmux Started without the fields carried by the initialize request Rejected
git in worktree creation, /teleport, and IDE checkout — Runs with a stricter PATH. git filters and helpers may need to be specified by full path
Some messages output by claude subcommands — Wording changes (JSON output is unchanged)

Trying Code Mode with agent teams enabled

In the previous article, I had set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 in my user settings (env in ~/.claude/settings.json), so Code Mode did not start, and I ran the verification after removing the agent teams environment variable. With v2.1.326, I checked whether Code Mode starts with agent teams still enabled, and whether teammates also run in Code Mode (this is the important part).

What the documentation says

The official documentation (Code Mode) states the following.

  • Using Code Mode with agent teams enabled requires v2.1.326 or later. Teammates run in Code Mode in the default in-process display mode, and start without Code Mode in split panes
  • In earlier versions, the top of the session shows Code Mode (experimental) isn't available with the reason it can't be used together with agent teams yet. As a workaround, it suggests updating to v2.1.326 or later, or unsetting CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS
  • Code Mode works only in interactive claude sessions and cannot be used with -p. Also, Remote Control, Claude in Chrome, and computer use cannot be used in a Code Mode session

The agent teams documentation states that teammates run in-process until you change the teammateMode setting.

Test environment

The test environment is macOS (Darwin 25.6.0, arm64) with Claude Code v2.1.326.

% claude --version
2.1.326 (Claude Code)

The user settings are as follows. As in the previous article, agent teams are enabled through env, the default permission mode is auto mode, and the display is fullscreen. teammateMode is not set.

% jq '{env, permissions: {defaultMode: .permissions.defaultMode}, tui}' ~/.claude/settings.json
{
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
    "ENABLE_TOOL_SEARCH": "true"
  },
  "permissions": {
    "defaultMode": "auto"
  },
  "tui": "fullscreen"
}

Creating the test project

The files used for verification are gathered in a verification folder (codemode-handson) created directly under the current directory. Inside it, in docs-site, I create a project of 5 Markdown files, the same as in the previous article. Five of the local file links point to files that do not exist.

Creating the verification folder

Put the location of the verification folder into the variable WORK as an absolute path. The following steps use this variable. When you open a new terminal, move to the same directory and set WORK again.

Choose a directory for the verification folder that is outside a Git repository and has no CLAUDE.md in the directories above it. According to the official documentation, a CLAUDE.md in the directories above the launch directory is loaded at startup, so it may change the results.

% cd <検証用のフォルダを作るディレクトリ>
% WORK="$PWD/codemode-handson"
% mkdir -p "$WORK/docs-site/docs" "$WORK/docs-site/examples" "$WORK/transcripts" "$WORK/screenshots"
% cd "$WORK/docs-site"

% cat > README.md <<'EOF'
# Sample Docs

- [セットアップ](./docs/setup.md)
- [使い方](./docs/usage.md)
- [コントリビュートの方法](./CONTRIBUTING.md)
- [公式サイト](https://example.com)
EOF

% cat > docs/setup.md <<'EOF'
# セットアップ

[README に戻る](../README.md)

詳しいインストール手順は [install.md](./install.md) を参照してください。

![構成図](../images/arch.png)
EOF

% cat > docs/usage.md <<'EOF'
# 使い方

インストールは [セットアップ](./setup.md#install) を参照してください。

サンプルは [基本の例](../examples/basic.md) にあります。
EOF

% cat > examples/basic.md <<'EOF'
# 基本の例

API の詳細は [API リファレンス](../docs/api.md) を参照してください。

次は [応用の例](./advanced.md) です。
EOF

% cat > examples/advanced.md <<'EOF'
# 応用の例

[README](../README.md) / [よくある質問](../docs/faq.md)
EOF

The overall structure of the verification folder is as follows.

codemode-handson/
├── docs-site/
│   ├── README.md
│   ├── docs/
│   │   ├── setup.md
│   │   └── usage.md
│   └── examples/
│       ├── advanced.md
│       └── basic.md
├── transcripts/
└── screenshots/

transcripts/ is the folder for transcripts copied for aggregation, and screenshots/ is the folder for captured images. Both are placed outside docs-site, where Claude Code is launched.

The links that point to nonexistent files are the following 5.

File containing the link Path written
README.md ./CONTRIBUTING.md
docs/setup.md ./install.md
docs/setup.md ../images/arch.png
examples/basic.md ../docs/api.md
examples/advanced.md ../docs/faq.md

Launching

Code Mode works only in interactive sessions. If you try it directly in a terminal, neither tmux nor env -i is needed, and you launch it as follows in the test project created in the previous step.

% cd "$WORK/docs-site"
% CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude --model opus

The screens and transcripts below are from running in ~/docs-site, which I created for the previous article (the contents are the same 5 Markdown files). For that reason, the path shown on screen is ~/docs-site.

I launched it from within another Claude Code session to take the screenshots, so, as in the previous article, I displayed a session started with tmux in an iTerm2 window. To avoid inheriting the parent session's environment variables, I put env -i at the start of the launch command and passed only a minimal set of environment variables. The agent teams environment variable is not passed through env -i; it is loaded from the env in the user settings. tmux new-session -d only starts the session in the background and shows nothing in the window where it was run. To show the screen, attach to the session with tmux attach at the end.

# Steps when launching from within Claude Code
# Start the tmux server, hide the status bar, and set the window title to claude
% tmux -L cm326 new-session -d -s keep "cat"
% tmux -L cm326 set -g status off
% tmux -L cm326 set -g set-titles on
% tmux -L cm326 set -g set-titles-string "claude"

# Pass only minimal environment variables with env -i and start the Code Mode session in the background
% CLEAN="env -i HOME=$HOME USER=$USER LOGNAME=$USER PATH=$PATH SHELL=/bin/zsh TERM=xterm-256color LANG=ja_JP.UTF-8 TMPDIR=$TMPDIR"
% tmux -L cm326 new-session -d -s cm -x 120 -y 40 -c "$WORK/docs-site" "$CLEAN CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude --model opus"

# Attach to the session in an iTerm2 window (120 columns × 40 rows) to show the screen
% printf '\e[8;40;120t'
% tmux -L cm326 attach -t cm

I opened a 120-column × 40-row iTerm2 window with AppleScript and ran tmux -L cm326 attach -t cm in that window. To detach and return to the original shell, press Ctrl+b and then d (the session keeps running). When you are done taking screenshots, run /exit in the session and end the tmux server with tmux -L cm326 kill-server.

The line described in the documentation was displayed at the top of the session. It started in Code Mode with the user settings still having agent teams enabled. The Code Mode confirmation dialog was not shown this time because I had already answered it in the previous article.

⚠ Code Mode (experimental) is on · this session can be resumed only with Code Mode on

Screen of launching in Code Mode with agent teams enabled

Right after startup, the following notice was also displayed at the bottom of the screen.

  No Chrome or computer use: exit and run CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=0 claude for a new session without Code …

I sent the same prompt as in the previous article.

このプロジェクトの Markdown ファイルをすべて読み、存在しないローカルファイルを指しているリンクを一覧にしてください。

As in the previous article, Claude listed the 5 links that point to nonexistent files (26 seconds).

Result of checking Markdown links

This time, because defaultMode in the user settings is auto, the session runs in auto mode. According to the documentation, the auto mode safety check is performed per piece of code, not per tool call. In the transcript viewer opened with Ctrl+O, the first piece of code, which ran find and test -e with the $ shell helper, showed Blocked by auto mode, with Auto mode: [Undermining Oversight] shown as the reason. In the following Code(…) rows, Search (Glob) and Read calls executed from within the code are listed.

Code(…) rows in the transcript viewer

In the second and later pieces of code, Claude used tools.Glob, file().text(), and file().exists() to list, read, and check the existence of files. For aggregation, I copy the session transcript (JSONL under ~/.claude/projects/) to transcripts/ in the verification folder. The following is the result of aggregating cm326_transcript.jsonl, which I copied, by message model and tool name. Calls executed from within the code are recorded as messages whose model is <synthetic>.

% jq -r 'select(.type=="assistant") | [.message.model, ([.message.content[]? | select(.type=="tool_use") | .name] | join(","))] | @tsv' cm326_transcript.jsonl | uniq -c
   1 claude-opus-5-5	
   1 claude-opus-5-5	REPL
   1 claude-opus-5-5	
   1 claude-opus-5-5	REPL
   1 <synthetic>	Glob
   1 claude-opus-5-5	REPL
   1 claude-opus-5-5	Poll
   5 <synthetic>	Read
   1 claude-opus-5-5	
   1 claude-opus-5-5	REPL
   1 claude-opus-5-5	Poll
  10 <synthetic>	Read
   2 claude-opus-5-5	

The tool calls requested by the model were 4 REPL calls (the tool that runs code) and 2 Poll calls, and 1 Glob and 15 Read calls were executed from within the code.

Do teammates also run in Code Mode?

Next, I requested a task that uses teammates. The content is such that no files are changed.

チームメイトを 2 人作成して、1 人には docs/ 配下、もう 1 人には examples/ 配下の Markdown ファイルを担当させ、存在しないローカルファイルを指しているリンクを報告させてください。ファイルは変更しないでください。

Claude created two teammates, docs-checker and examples-checker, and agent rows (main, docs-checker, examples-checker) appeared below the prompt. Each of the two reported 2 broken links, and Claude added the 1 in README.md that neither was responsible for, summarizing 5 in total.

In-process teammates and agent rows

I aggregated the teammates' transcripts (under subagents/ in the session folder) in the same way. Both used REPL and executed Bash and Read from within the code.

% jq -r 'select(.type=="assistant") | [.message.model, ([.message.content[]? | select(.type=="tool_use") | .name] | join(","))] | @tsv' agent-adocs-checker-e17dea8abc10bef0.jsonl | uniq -c
   1 claude-opus-5-5	
   1 claude-opus-5-5	REPL
   2 <synthetic>	Bash
   1 claude-opus-5-5	REPL
   2 <synthetic>	Read
   1 claude-opus-5-5	
   1 claude-opus-5-5	REPL
   5 <synthetic>	Read
   1 <synthetic>	Bash
   1 claude-opus-5-5	SendMessage
   1 claude-opus-5-5	
% jq -r 'select(.type=="assistant") | [.message.model, ([.message.content[]? | select(.type=="tool_use") | .name] | join(","))] | @tsv' agent-aexamples-checker-94a222227f860f62.jsonl | uniq -c
   1 claude-opus-5-5	
   1 claude-opus-5-5	REPL
   3 <synthetic>	Bash
   1 claude-opus-5-5	REPL
   2 <synthetic>	Read
   1 claude-opus-5-5	
   1 claude-opus-5-5	SendMessage
   1 claude-opus-5-5	

In the teammates' metadata, taskKind was recorded as in_process_teammate.

% cat agent-adocs-checker-e17dea8abc10bef0.meta.json
{"agentType":"docs-checker","isBuiltIn":false,"description":"docs 配下のリンク切れ確認","name":"docs-checker","spawnDepth":0,"requestShape":"background","requestNonInteractive":true,"model":"opus","pickedEffortModel":"opus","taskKind":"in_process_teammate","teamName":"session-6f174f97","color":"blue","planModeRequired":false,"spawnedAgentType":"Explore","permissionMode":"auto"}

As the documentation describes, teammates in the default in-process display mode were also running in Code Mode.

In the previous article, I removed the agent teams environment variable to verify Code Mode. From v2.1.326, you can try Code Mode in an environment with agent teams still enabled, so I'm grateful that switching settings is no longer needed when trying them together.

Conclusion

Most of the 367 entries in v2.1.326 are fixes, but I think the breaking changes that alter permission evaluation and write restrictions, such as auto mode allow rules and sandbox write destinations, stand out. If you use Claude Code for unattended runs or in CI, I think it is a good idea to check behavior once after updating and to specify the necessary settings explicitly. Why not review your permission-related settings, then update and give it a try?

References

https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md

https://code.claude.com/docs/en/changelog

https://code.claude.com/docs/en/code-mode

https://code.claude.com/docs/en/auto-mode-config

https://code.claude.com/docs/en/sandboxing

https://code.claude.com/docs/en/permission-modes

https://dev.classmethod.jp/articles/20261114-cc-updates-v2-1-325/


Claudeならクラスメソッドにお任せください

クラスメソッドは、Anthropic社とリセラー契約を締結しています。各種製品ガイドから、業種別の活用法、フェーズごとのお悩み解決などサービス支援ページにまとめております。まずはご覧いただき、お気軽にご相談ください。

サービス詳細を見る

Share this article

AI白書