claudekit / updates / claude-code-2-1-327
[ PATCH · ]

Claude Code 2.1.327

Shell start-up files may now run before a session's first Bash command is approved, to make it faster, and auto mode ignores more allow rules that run any package. Over 170 changes, including fixes for Remote Control in worktree mode deleting git-ignored files such as `.env`, and `claude mcp add` deleting other top-level keys from `.mcp.json`.

Official announcement →

This article is a summary based on official documentation.

What changed

Claude Code 2.1.327 shipped on November 17, 2026. Most of its more than 170 changes are fixes, several of them for files or settings being deleted or overwritten without asking. On the permissions side, paths outside the working directory, symbolic links, package-runner allow rules and ExitWorktree now ask or are refused in more cases. In the other direction, a session’s first Bash command is faster because shell start-up files can run before it’s approved, and Windows start-up and the PowerShell tool got faster.

New features

  • A confirmation before /install-github-app changes a repository

    /install-github-app used to change a repository without asking. It now confirms first.

  • claude mcp add-json <name> - reads JSON from stdin

    Passing a server’s JSON as an argument put any tokens in it on the command line. With -, claude mcp add-json reads the server’s JSON from stdin, so tokens can stay off the command line. Not available inside a Claude Code session.

  • Configuration problems listed in /status

    /status now lists broken agent, skill, command and output style files, keybinding errors, an unavailable sandbox, ignored permission settings and hook matchers that never match, so you don’t have to open each file to find out why something isn’t applying.

  • Notes about overridden settings and unloadable history

    /config shows a note when other settings override a row, and a resumed session shows a line when its earlier messages can’t be loaded.

  • Claude apps gateway settings

    The attributionProject setting names a session’s billing group, for Claude apps gateways that set admin.billing_group_tag. The gateway hint headers now include x-claude-code-managed-settings-checksum, sent where managed settings set CLAUDE_CODE_GATEWAY_HINT_HEADERS=1.

  • /tui classic

    /tui classic is the new name for the non-fullscreen renderer; /tui default still works.

  • [VSCode] “Claude Code: Add to Chat”

    A new entry in the Explorer’s right-click menu that @-mentions the selected files and folders in the chat.

Key improvements

  • A faster first Bash command

    A session’s first Bash command used to wait for the shell to start. Shell start-up files may now run before the command is approved, even if it’s refused. Set CLAUDE_CODE_DISABLE_SHELL_HEAD_START=1 to turn this off.

  • Stricter permission checks

    Some actions that used to run without asking now ask first or are refused.

    • ExitWorktree asks before removing a worktree that may hold unsaved work. It’s refused in don’t-ask mode or with nobody to answer, unless an allow rule, auto mode or bypass permissions mode allows it.
    • Path checks refuse some symbolic links, and what counts as inside a working directory changed, so some paths now ask for permission.
    • permissions.blockReadsOutsideWorkingDirectories asks about more Bash commands in bypass and auto modes and denies some in auto mode. It also refuses more Bash commands that name a path under a Read or Edit deny rule, where it used to ask.
    • Auto mode ignores more allow rules that run any package, like Bash(pnpm dlx *), and path or version forms of ones it already ignored (/usr/bin/npm run:*); the safety check decides those.
    • Bash commands whose variables expand to very long text are denied, with a message that says to use shorter values or a file.
    • The PowerShell tool asks before one more command, even under a rule naming it. If nothing answers, it’s refused unless a whole-tool rule, auto mode or bypass permissions mode allows it.
    • A subagent resumed by a sibling’s message follows the session’s permission settings, so it may now ask, or be refused where nobody can answer.
    • Claude in Chrome refuses to upload some credential files; attach those to the page yourself.
    • The arrow keys on most permission prompts stop at No instead of wrapping around, and a number past the last answer moves to No.
  • Notice that auto mode’s billed classifier fallback is going away

    Auto mode’s notice about falling back to billed classifier requests now says that an upcoming release removes the fallback, after which each action it would have checked will be asked about or denied. Only the notice changes in this release.

  • Artifact approval

    In organizations that require approval of each new artifact:

    • An artifact that only a plugin created or allowed can be refused.
    • Sessions with nobody to ask refuse a new artifact at once, with no permission prompt.

    The Artifact tool also refuses calls once settings turn Artifacts off, in sessions already running too. The publish prompt stops offering “don’t ask again” in subagents and after a background task result, someone else’s message or a compaction. The tool can read an uploaded file by the address the artifact’s page shows, and ignores prompt, limit and label on some calls that do not use them instead of failing.

  • Sandbox and worktrees

    • Claude now sees when a command exempt from the sandbox stayed in it because its permission check relied on the sandbox.
    • The refusal for shell commands with no rm that the dangerous rm check can’t parse is clearer, so Claude can resend harmless ones in plain syntax instead of giving up.
    • --worktree with a relative --add-dir beside the launch folder gives the Bash sandbox that folder, not one beside the worktree. Some starts with a relative --add-dir above the launch folder, such as .., give the Bash sandbox and a --bg session only the worktree.
    • Code Mode no longer refuses to start when an installed mod hooks tool calls; an administrator can still keep Code Mode off in managed settings.
  • Commits that leave secrets out

    On newer models and in PowerShell, Claude is now told not to commit files that likely contain secrets.

  • Long replies and long sessions

    • Resuming very long sessions: a transcript read that ends early is retried once, so messages are lost less often.
    • Subagent answers that hit the output token limit twice more often come back whole or say up front that they are partial.
    • On unrecognized models, a reply cut at 32,000 output tokens now continues with a limit of 128,000.
    • After compaction, if Claude can’t read a completed subagent’s output file, it is told to ask the agent with SendMessage.
  • Subagent models

    • Subagents launched without a model stay on the model they started on when resumed, including after /model.
    • The first subagent on a model waits up to 1.5 seconds (10 in claude -p) for that model’s settings from Anthropic, instead of starting without them.
    • Restarted background subagents, and turns that start by themselves, wait for plugins to load.
    • Subagent progress summaries in terminal sessions on Amazon Bedrock, Google Vertex AI and Microsoft Foundry are written from short notes, not the whole conversation, using far fewer tokens.
  • Speed

    • Windows: start-up is faster with no Git Bash and no pwsh on PATH, by checking PowerShell’s standard install locations at once, and System32’s powershell.exe now wins over one earlier on PATH. When PATH points to Git for Windows’ bin folder, git.exe starts directly instead of through its launcher. The PowerShell tool is up to about half a second faster per command.
    • The Bash tool’s diff of changed files is ready sooner in auto and bypass permissions modes.
    • The Bash permission check on very deeply nested missing paths on macOS and Linux, and secret masking on very long text with a URL, are faster.
    • Large PNG images are read faster, and the JPEG sent in their place looks better.
    • Non-interactive (-p) mode runs fewer git commands before the first request.
  • Screens and controls

    • MCP server pages in /mcp: local, remote and agent servers share one layout, menus end in Back, and actions are no longer numbered outside screen reader mode.
    • /sandbox and most /config value lists are unnumbered outside screen reader mode; use the arrow keys and Enter.
    • In narrow terminals, /status, forms and detail screens lay out better, /model and /effort fit at about 40 columns, and key hints such as ←/→ to adjust stay.
    • The repository, secret and API key steps in /install-github-app, and the download question in /desktop, use the standard list and keys.
    • In /plugin, the question before removing a marketplace now says that its plugins’ settings and saved data are deleted.
    • Transcript search finds text in edits and written files.
    • The warning shown when an API key and an Anthropic profile are both set says which one is in use and how to switch to the profile.
  • Other changes

    • claude mcp add --scope project stops, instead of overwriting the file, when .mcp.json lists its servers at the top level with no mcpServers key.
    • Anthropic-hosted cloud sessions ignore more of a repository’s flag and plugin delivery settings; its CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC now acts at most as DISABLE_TELEMETRY.
    • claude plugin eval keeps its deny rules over a plugin’s permission hook, and flags calls the hook let through.
    • MCP server logs record the mode, action and field names of elicitation requests and hook answers, not their full contents.
    • Prompt history leaves out most launch prompts of sessions that another Claude Code session started, such as claude --bg run by Claude.
    • Most prompts ignore answers other than Esc for a moment after resuming with fg.
    • Some pre-started background sessions are discarded after an account change, and a workflow paused at a usage limit in the terminal stays paused after a login, until the earlier login returns or you type a prompt.
    • First-run setup skips terminal setup in remote VS Code, Cursor and Devin Desktop sessions, where it cannot change settings.
  • [VSCode] Extension improvements

    • Several edits in a row are faster: queued edits share one wait for new problems, though a problem may be reported with a later edit.
    • @-mention file search is faster in large workspaces when rg is on your PATH; results rank much as in the terminal, with less tolerance for typos.
    • The model picker is ready at once in folders opened for the first time, empty windows and worktrees, except on third-party providers.
    • A chat edit’s diff stays open and keeps asking for approval when a terminal session in the same window sends a prompt.
    • Unused tools were removed from the IDE connection (openFile, saveDocument, getOpenEditors and related).

Bug fixes

Fixes that could lose files or settings

  • Remote Control: stopping the server in worktree mode deleting a running session’s git-ignored files, such as .env.
  • Self-hosted runners with --use-anthropic-git-proxy deleting a non-empty directory named by GIT_CONFIG_GLOBAL at startup — the runner now keeps it, ignores the variable and warns.
  • claude mcp add and claude mcp remove with project scope deleting other top-level keys from .mcp.json, such as $schema or another tool’s servers.
  • /export overwriting an existing file without asking — the dialog now asks, and /export <name> keeps the file and says to run /export.
  • A command you had allowed still running after you pressed Stop, when the approval arrived after a restart, in cloud and self-hosted runner sessions with no feature flags loaded.

Accidental input

  • Enter closing /teleport’s load error screen, and a click followed by Enter in /plugin installing or disabling a plugin.
  • A half-typed ! command running on an extra Enter after the usage limit menu.
  • A second x on a task’s details in /tasks stopping the next task too, and Esc being ignored on a permission prompt that had just appeared.

Permissions and settings

  • Some --disallowedTools rules with parentheses in their content.
  • Auto mode ignoring some wildcard PowerShell allow rules that name a script with .\, such as PowerShell(.\scripts\build.ps1 *).
  • A running Code Mode script in auto mode getting permission prompts and denials once Claude started a second script that auto mode also allowed.
  • A nested claude with its own token being refused by forceLoginOrgUUID — commands that don’t get the session’s token no longer get its CLAUDE_CODE_OAUTH_SCOPES; set it on any that need it.
  • A settings change from /config and similar commands failing to save with no warning — a line under the prompt now says so.
  • /statusline writing to ~/.claude/settings.json when CLAUDE_CONFIG_DIR points to another folder, and claudeMdExcludes patterns on Windows not matching a path whose drive letter is written in the other case.
  • /model listing the wrong models in some terminal sessions when a project’s .claude/settings.json sets ANTHROPIC_BASE_URL to an LLM gateway.
  • Claude Code refusing to start when https_proxy or HTTPS_PROXY is a bare host:port and neither its input nor its output is a terminal (the desktop app, an SDK, cron).
  • The spend limit menu reporting a changed limit when the server refused it.

Conversations, compaction and resumed sessions

  • Headless sessions losing stored messages on resume when a message was sent again with the same UUID after the process was killed.
  • A session resumed after an empty reply or a killed command losing an answer, or bringing back a rewound prompt, after another crash or a move to the background.
  • A remote session forgetting messages sent after Stop was pressed during a restart, if Claude Code then crashed.
  • Tasks created after /clear being lost, and cleared tasks coming back, when a cloud or self-hosted runner session with no feature flags loaded resumed later.
  • A compaction right after a reply cut at the output token limit losing that reply’s tool call and its result.
  • /rewind closing without a word when some files could not be restored.
  • Pasted images being dropped when the prompt starts with a file path such as /tmp/a.txt.
  • Agents passed with --agents being lost once plugins loaded or reloaded, and a plugin’s agent being dropped when resuming a session from the --resume picker.

Hangs and crashes

  • claude -p hanging before its first request when the fetch of a model’s settings stalled, such as at a proxy — it now goes on without them after 10 seconds.
  • The screen staying blank or frozen after a brief out-of-memory error, and a rare display fault that could freeze the screen or end the session.
  • Claude Code on Linux sometimes returning to the shell while restarting itself at startup, such as after the first sign-in to a Claude apps gateway or when turning on Code Mode.
  • A turn hanging when a mod’s $.model.complete or $.model.classify call met a usage limit — the call now gets the API’s error at once; mods should handle that error.
  • Stalls on a compaction reply with thousands of unclosed tags and on some very long WebFetch URLs — WebFetch now refuses a URL over 2,000 characters before any permission prompt.
  • A message with thousands of @ mentions stalling before Claude replies — only the first 100 mentions are now looked up as files.
  • The prompt freezing after rejecting a write to a very large file — a rejected write now shows a short preview.
  • Cloud sessions breaking when a program left thousands of connections open to the session’s network proxy, and a crash when a burst of keys reached the search box in /plugin.
  • A false crash report and exit code when a suspended session resumes, or at exit, where a Linux security policy blocks a process from signalling itself.

Tools

  • Edit refusing with “File has not been read yet” after a compaction on unchanged files outside the project that Claude had already read in full.
  • Grep repeating or skipping results when paging with head_limit and offset — content and count results are now sorted by file path.
  • Read failing on Jupyter notebooks that contain an output of an unknown type, and NotebookEdit removing the notebook file’s final newline.
  • The Read tool reporting 512KB instead of the real size when a file of 10 MB or more is too large to read at once.
  • The Bash tool’s diff of changed files not naming files that are binary, too large or too many to show.

MCP

  • Remote MCP servers staying disconnected after a longer outage such as a VPN drop — most servers on other machines reached by hostname over https are now retried in the background for about a day.
  • /mcp saying no servers were configured after one was added during a session or declined — it now says what to do.
  • The MCP tool list in /mcp and /plugin losing your place when going back from a tool, and an MCP server’s long question being cut off after one row.

Subagents and agent teams

  • In-process agent teammates on a different model from the lead compacting at the lead’s context limit and on the wrong model — they now use their own limit and model, at that model’s rate.
  • A finished subagent resuming on the model and effort of a sibling subagent that messaged it.
  • The main conversation not being told a background agent had finished when the subagent that started it ended by itself without reading the result, outside auto mode.
  • Claude reporting a background agent as still running when it had waited 30 seconds or more on a permission prompt in the desktop app, on the web and in the SDK.
  • Claude not being told in auto mode when a background agent’s reply to a follow-up message was dropped — repeat wake-ups from agents waiting on background commands are also reduced.
  • The desktop app, Claude Code on the web and VS Code showing a raw task notification as a subagent’s prompt after its background task woke it.

Remote Control, cloud and artifacts

  • Messages sent from another session with “later” priority joining the running turn, instead of waiting for it to end, in Remote Control and Claude Desktop sessions.
  • Messages to cloud and Remote Control sessions being reported as failed with a stale address after a timeout or rate limit — Claude now says when a message may have arrived.
  • Cloud sessions giving no error when a UserPromptSubmit hook blocks a message sent while Claude works.
  • Artifact publishes failing with “the source file changed between approval and publish” when a synced or remote-backed folder had only changed the file’s timestamp.
  • A new artifact being refused after you approved it in a cloud scheduled task’s session, or after an app built on the Agent SDK approved it, in organizations that require approval of each new artifact.
  • /artifacts showing part of your list, or “No artifacts yet”, when a request for more of the list failed — it now tries again, then warns if it can’t load the whole list.
  • Long ListAgents results hiding most sessions on accounts with many cloud or Remote Control sessions — long lists now come in pages.
  • Slow turns in resumed sessions for organizations with tens of thousands of connector tool permissions.
  • Self-hosted runner: claude -p started by a session’s script or hook waiting out rate limits, because it inherited the session’s own retry setting.

Hooks

  • Failing hooks showing nothing: SubagentStop in background agents, SessionEnd at /clear and /resume, and CwdChanged and FileChanged in fullscreen.
  • A Stop hook that failed to run being shown as having reported a problem, and focus view keeping a finished reply hidden while a Stop hook was running.
  • Claude getting a long managed PostToolUse hook output twice when a mod added context to the tool call.
  • /hooks leaving out hooks given by --settings, and /hooks help naming input fields that do not exist.

Display, input and terminals

  • A blank screen and stray mouse codes in the shell after quitting with ctrl+c just after ← opens the agents view, the shell flashing on screen when ← opens the agents view in fullscreen mode, and Ctrl+C right after the trust question leaving the terminal in fullscreen.
  • Terminal display faults: most scrambled scrollback in Ghostty on resize, link addresses hidden in Windows Terminal under old tmux and in VTE 0.50.0, and no selection highlight with 16 colors.
  • Some garbled rows in tmux with allow-passthrough on inside kitty, Ghostty or iTerm2.
  • The / menu listing a row for each skill of the same name, though every row ran the first.
  • n and N in transcript search skipping matches, and cancelling a transcript search (ctrl+o, then /) in a long session landing far from where the search started.
  • Up and down losing the cursor’s column over a short or blank line, and Tab in shell mode filling in a file name after &&, ; or |, where a command goes.
  • The selected session leaving the screen in claude --resume and /resume when branch names or folder paths are long.
  • The “+N lines” count being too high for command output with links or colors, and /teleport showing no message when the chosen session failed to resume.
  • Claude trying to read design system token files that do not exist when starting a deck or design, and exit not saying that a worktree was kept.
  • Two sign-in error messages that pointed to the Claude subscription option on computers where forceLoginMethod is set to console.

VS Code

  • The permission prompt not showing the reason that a PreToolUse hook gives when it asks for confirmation (anthropics/claude-code#85950).
  • Long tool and file names being cut off in a permission prompt’s title.
  • A terminal session’s diff showing the previous proposed edit after you typed in it and Claude edited the same file again.
  • Escape also stopping Claude’s response when it closes the feedback or “Build a custom style” dialog, the @-mention menu, the model, mode or ”+” menu, or another popup.

Notes

  • If your shell start-up files do things you don’t want run unasked, note that they may now run before a session’s first Bash command is approved, even if it’s refused. Set CLAUDE_CODE_DISABLE_SHELL_HEAD_START=1 to turn this off.
  • If you use auto mode, its notice now says an upcoming release removes the fallback to billed classifier requests; this release only changes the notice. Auto mode also ignores more allow rules that run any package, like Bash(pnpm dlx *).
  • If you use permissions.blockReadsOutsideWorkingDirectories or run sessions unattended, some paths outside the working directory, symbolic links, ExitWorktree and one more PowerShell command now ask, or are refused where nobody can answer. Check such runs after updating.
  • If a nested claude relied on CLAUDE_CODE_OAUTH_SCOPES, commands that don’t get the session’s token no longer inherit it; set it on any that need it.
  • If your mods call $.model.complete or $.model.classify, they now get the API’s error at once at a usage limit and should handle it.
  • If you run in-process teammates on a different model from the lead, they now compact on their own model and limit, at that model’s rate.
  • If your organization requires approval of each new artifact, artifacts that only a plugin created or allowed, and new artifacts in sessions with nobody to ask, can be refused.
  • If you answer prompts by habit, the arrow keys on most permission prompts now stop at No, and /mcp actions, /sandbox and most /config lists are unnumbered outside screen reader mode.
  • This post covers the main items only. See the GitHub release notes for the full list.