Annotated safety ledger
T1 to T5 were separate stdin calls to a Bash script copy under an isolated subdirectory. Each command piped one reserved test sample via printf into bash and checked status, stdout and stderr. Masks shown here are not the test inputs. The matching samples used unissued numbers in the specified test range. T5 used the phone format in notes.txt.
| Ref | Masked format | Command | Result | Evidence |
|---|---|---|---|---|
| T1 | ***-**-4320 | Pipe dashed sample into isolated Bash copy | Status 2 · blocked | T1 evidenceThe dashed groups matched with non-digit boundaries. One redacted isolated receipt was written. The block message went to stderr; stdout was empty. |
| T2 | *** ** 4321 | Pipe spaced sample into isolated Bash copy | Status 2 · blocked | T2 evidenceBoth separators were spaces. The script returned status 2 and produced one redacted isolated receipt. |
| T3 | *****4322 | Pipe nine-digit sample into isolated Bash copy | Status 2 · blocked | T3 evidenceNine consecutive digits matched. The same pattern can also match an account number; this result does not establish identity or intent. |
| T4 | 4323 | Pipe last four only into isolated Bash copy | Status 0 · allowed | T4 evidenceFour digits alone did not match. The script printed nothing and wrote no receipt for this call. |
| T5 | ***-0142 | Pipe phone into isolated Bash copy | Status 0 · allowed | T5 evidenceThe seven-digit phone format did not match. The script printed nothing and wrote no receipt for this call. |
Checks beyond the five calls
Self-test: 12/12 passed
bash guard/ssn-check.sh --self-test exited 0. Dashed, spaced, compact, bare nine-digit account false positive, non-digit-boundary and logging-failure cases exited 2. Last-four, phone, ZIP+4, mixed-separator, numeric metadata and digit-boundary cases exited 0. The test used a temporary directory within guard and left the live log untouched.
Receipt failure did not permit a match
An isolated receipt log was set read-only (mode 0444); append failed and the log remained empty. The Bash copy still exited 2 and printed a safe warning and block message. An isolated OMP callback still returned block: true and a safe warning. The Bash self-test separately used a directory as its append-failure target. Neither check was a real later-session interception.
Real names, minimal receipts
An isolated Claude-style envelope kept NotebookEdit and the exact id-note.md destination. OMP synthetic callbacks kept web_search and mcp__vendor__thing. Receipts held only validated tool name, permitted destination and the reason contiguous SSN pattern. The isolated receipts were removed after testing; the live guard/denials.log was not populated by tests.
Scope of the match
Three digits, dash, two digits, dash, four digits; the same groups consistently separated by spaces; or nine consecutive digits. Non-digit boundaries are required. Mixed separators and ZIP+4 are not matching formats. A bare nine-digit account or digits in ordinary text can falsely match. Last four alone are allowed.
Where this demonstration stops
Claude Code / selected tools
.claude/settings.json selects Write| at PreToolUse. The command runs Bash from $CLAUDE_PROJECT_DIR. The stdin JSON envelope includes session_id, prompt_id, transcript_path, cwd and tool_use_id; the script uses sed to remove these metadata values before scanning while retaining tool input. It is not a general JSON parser and cannot guarantee escaped-input coverage. Claude Code normally permits calls after hook errors unless onFailure is block; this handler sets block and still exits 2 when receipt logging fails.
OMP / tool input only
.omp/hooks/pre/ssn-guard.ts registers a tool_call callback and tests JSON.stringify(event.input). Names commonly are lowercase, including read, write, edit, bash and web_search. OMP tool_call handler errors fail closed; the callback catches receipt errors and returns an explicit block with a safe warning. A fresh OMP session is needed to load this hook. Synthetic calls here do not prove a later-session interception.
Blind spots and platform
Split inputs, runtime assembly, escaped input, unguarded Claude tools and command output are not covered. OMP scans only tool input, not subsequent output. On Windows, selecting a PowerShell tool still routes to a Bash command: Bash and the project script must be available. Neither guard makes reads private. Reading the pay stubs already exposes their contents to the model provider; they were not read for these checks.
Before a real bill
This packet is not a full Financial Assistance Policy. The fictional facility has not been found compliant. The incomplete assistance summary does not settle covered providers, amounts-generally-billed limits, all documentation rules or complete collections terms. Obtain the full policy and provider list before relying on these terms.