Follow Discord
Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.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

TierUse it nowhow much it should matter to you
Useful5my rating, 1 to 5
Signal3worth watching, 1 to 5
AreaPlugin Hookswhat it touches
KindNew Featuresin v2.1.277,
Group of 2 Use it now Notable No documentation found

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

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
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.

See this entry in the whole of v2.1.277 →

Feedback