Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Hooks reference changedhooks

Nearest release: v2.1.335, published 5 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 3 Dec 2026 03:27 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 3 Dec 2026 03:37 UTC.

Upstream edited
Recorded here
Lines+2added
Lines−1removed
From line 1,919 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits177to this page, all time

The whole hunk

from line 1919, old and new numbered
/
lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 1919
19191919>
19201920> The list is best effort and in public beta. Claude Code can miss a change, include a file that another process changed at the same time, or stop at its size limits. The field shape may change. Use the list to find what to review, not to enforce a policy.
19211921 
1922`changedFiles` and `files` list what the command changed; the remaining fields say how complete and how reliable that list is.
1922The `changedFiles`, `createdFiles`, `deletedFiles`, and `files` fields list what the command changed.
19231923 
19241924| Field | Type | Example | Description |
19251925| :- | :- | :- | :- |
19261926| `changedFiles` | array | `["/path/to/src/app.ts"]` | Absolute paths of the files the command changed, at most 200. Present whenever `files` holds a diff or `moreFiles` is above zero |
1927| `createdFiles`, `deletedFiles` | array | `["/path/to/src/new.ts"]` | The paths in `changedFiles` that Claude Code can tell were created or deleted. Each field is absent when empty. Requires Claude Code v2.1.335 or later |
19271928| `files` | array | `[{"filePath": "/path/to/src/app.ts", "hunks": [...]}]` | Diffs of up to 5 changed files, for display. `created` or `deleted` is `true` for a file the command added or removed |
19281929| `moreFiles` | number | `2` | Count of changed files with no diff in `files` |
19291930| `unavailable` | boolean | `true` | Set when the diff is incomplete or couldn't be taken |
from line 3663
36623663 
36633664#### PreModelSwitch decision control
36643665 
3665`PreModelSwitch` hooks can cancel the switch, ask the user to confirm it, or let it proceed. Exit code 2 or a top-level `decision: "block"` cancels the switch.
3666 
3667For finer control, return `permissionDecision` and `permissionDecisionReason` in a `hookSpecificOutput` object, as on [PreToolUse](
3666`PreModelSwitch` hooks can cancel the switch, ask the user to confirm it, or let it proceed.
Feedback