New release
Claude Code 2.1.310 fixes Windows hooks and file cleanup
Claude Code 2.1.310 stops some Windows PreToolUse and PermissionRequest hooks letting a tool call through, and stops cleanup deleting recent pasted images.
- Date
- Works with
- Claude Code
What’s new
Claude Code 2.1.310 came out on 23 October 2026. On Windows, its changelog says it "Fixed PreToolUse and PermissionRequest hooks letting a tool call through when Git Bash is missing and the hook's command is only quoted strings, such as a quoted path".
It also fixes "background cleanup deleting some recent files, such as pasted images, when `cleanupPeriodDays` is set to a very large value". After a "Prompt is too long" error, compaction no longer keeps so much dense text, such as base64 or SVG, that the next request fails again. File read permission prompts now show where a symbolic link leads.
Auto mode's question before the first read outside your working folders now says when blocking those reads makes shell commands ask for permission. The Monitor tool now also works on Bedrock, Vertex and Foundry.
Why it matters
If you use a hook on Windows to stop risky tool calls, it could let a call through before this fix. This happened only when Git Bash was missing and the hook's command was only quoted strings, such as a quoted path to a script. If you set cleanupPeriodDays very high to keep old files, cleanup no longer deletes recent pasted images.
How to try it
Run this command: see the command below. Then run claude --version. It should show 2.1.310 or later. Version 2.1.310 is on the default "latest" channel. The "stable" channel still gives 2.1.308.
claude updateRelated
Source
Checked against the source on 26 Oct 2026