Follow Discord
Sweep 10 Nov 2026 · 02:18Z Build v2.1.322 539 read Stable v2.1.311 Latest v2.1.322 Next v2.1.322 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.277 ·

New prompt.attachment plugin hook lets hooks rewrite or drop attachment text

Plugins can now implement a prompt.attachment hook to rewrite or remove text attached to a message before it reaches the model

Group of 2 Use it now Notable New Features
JSON All of v2.1.277
Use it nowTier: how much it should matter to you
5Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
Plugin HooksArea: what it touches
New FeaturesKind: in v2.1.277,
What probably matters to youSection of the release

Unclear Whether prompt.edit does anything yet is unclear, since it appears in the event list without any visible dispatch wiring.

What Claude Code adds a new hook event type, prompt.attachment, that plugins can implement to inspect and change text attached to a user's message. A hook can rewrite the attachment's text or leave it out entirely before it reaches the model. Claude Code logs what changed and which plugin or hook made the change, including whether the origin was the plugin, a hook, or the engine's own default handling.

Why This lets plugins control what attachment content actually gets sent to the model, for example filtering or transforming pasted content before use, with a record of what was changed and by what.

Read from
Names in the bundleprompt.attachment
What the documentation says
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Confirmed since Anthropic's documentation has since written up prompt.attachment, on Mods reference. | `prompt.attachment` | Claude Code adds a message of its own for Claude, such as a reminder. `e.type` names the kind, and for the kinds the types declare, `e.detail` holds the facts the text was written from. | `{ text }`, or `{ text: nul… plugins/mods/reference see the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtWhether `prompt.edit` does anything yet is unclear, since it appears in the event list without any visible dispatch wiring.
Anthropic's documentation agreesAnthropic's documentation has since written up prompt.attachment, on Mods reference.

See this entry in the whole of v2.1.277 →

Feedback