OhMyPrivacy

Secrets never reach the model. Two hosts, one core (omp/), zero dependencies beyond
Python 3.11+.
- Claude Code: a
UserPromptSubmit hook blocks any message that contains a secret
before it reaches the model; a PreToolUse hook refuses commands that read a vault back
or dump the environment.
- Hermes Agent: a native plugin refuses any tool call whose arguments contain a secret
(
pre_tool_call), and forbids the model from repeating a secret pasted by the user
(pre_llm_call).
In both cases the value goes to the vault of your choice, and the agent only receives its
name: $OMP_JWT_B5352DF5.
See it block
A staging key pasted into a Claude Code prompt. The message never reaches the model:
$ echo '{"prompt":"here is our staging key sk-ant-api03-7Jk2mQ9xVb4Lp8Rz3Wc6Yd1Nt5Fh0Sg2Vb-real-example-shaped-testkey can you use it to call the API"}' \
| python3 omp/hook.py
OhMyPrivacy intercepted 1 secret(s). The message is BLOCKED: it never reached the model.
Vault: discard.
$OMP_ANTHROPIC_7C9ED3C7 (anthropic): discarded (no vault configured). the value no
longer exists; set it again outside this session, or configure a vault: python3 -m omp.setup
Your cleaned message is available via ~/.claude/omp-last-prompt.txt. Paste it as is to continue:
--- cleaned message ---
here is our staging key $OMP_ANTHROPIC_7C9ED3C7 can you use it to call the API
False positive? python3 -m omp.telemetry --false-positive 284c09c8
Not a mockup: real output of omp/hook.py on a UserPromptSubmit event, default vault
(discard, level 3). Level 2 (age) and level 1 (doppler) name where the value actually
went instead of discarded; see The three levels.
Origin
Not a response to one bad paste. More people are vibe-coding with AI agents than ever
have a background in security, and an agent now routinely holds far more privilege over a
machine than any tool they used before it: it reads files, runs commands, calls other
services. In every training session we run, the same point comes up: most people do not
grasp what a leaked password, API key, or .env file actually costs until it has already
cost them. We cannot make every user security-aware before they paste a key into a chat
window. We can make the agent refuse to carry it forward.
That is the threat model this plugin targets (ADR-0008):
the well-meaning user who does not know better, not the adversary trying to defeat their
own guard. It follows that the plugin is not tuned to stay unobtrusive: it blocks the
prompt outright, denies the command outright, redirects the read outright, precisely
because the person on the other end may not know why any of that was necessary. Friction
at the boundary is the point. Silence everywhere else is the other half of the point: a
clean message, an authorized command, a name-only debug session should never notice the
plugin is there.
Why block, never mask
No host rewrites a prompt in flight. The Claude Code UserPromptSubmit hook schema (read
from binary 2.1.246) only accepts additionalContext, sessionTitle and
suppressOriginalPrompt; updatedInput belongs to PreToolUse. A hook that claims to mask
sees its field silently ignored and the value reaches the model. That is exactly the bug that
started this project. Hermes, for its part, only offers context injection.
A value that has reached a context is burnt: the only correct answer is revocation.
OhMyPrivacy keeps it from getting there.
The three levels
| Level | vault | Where the value goes | Who can read it back |
|---|
| 3, default | discard | Nowhere. It lives for the duration of the hook and dies with the process. | Nobody. |
| 2, recommended on a dev machine | age | Encrypted with your public key. The private key is passphrase-protected, prompted on /dev/tty. | You, in your terminal. Not the agent: its shell tool has no terminal. |
| 1, teams and deployments | doppler | doppler secrets set NAME, value on stdin, silent output. | You. And the agent too when the CLI is authenticated on the machine: the PreToolUse guard closes the known read forms, as an allowlist. |
Level 2 is strictly safer than level 1 on a machine where the vault CLI is logged in.
Level 1 is for what must be shared.
Invariant