Claude Code · tool · fg-0614

UserPromptSubmit hooks no longer redact Code Mode script output after 2.1.328

If you see Secrets or text that a UserPromptSubmit hook used to mask now appear in script output, the cause and the fix for Claude Code are below, last verified 2026-11-20.

Verified Nov 2026trust 50/100
Symptom
Secrets or text that a UserPromptSubmit hook used to mask now appear in script outputManaged UserPromptSubmit hooks seem to be skipped for Code Mode scripts
Cause
2.1.328 stopped running UserPromptSubmit hooks, including managed ones, on the output of Code Mode scripts.
Fix
Move the redaction to a PostToolUse hook that returns updatedToolOutput.
Apply
Add a PostToolUse hook in settings.json that returns {"updatedToolOutput": "<redacted text>"}
Affected
Claude Code 2.1.328 and later, Code Mode
Sources

Last verified 2026-11-20 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun