deny-record
Phase 1 of the deny-record follow-up to Hermes PR #158289 (still open/unmerged)
and roadmap issue #158538. One behavior: when the user denies an agent
cronjob_manage approval, the normalized when/what/who is recorded; when the
agent proposes a matching job again, the prior denial is surfaced on the
approval card. Nothing else. No PR or issue comment is filed from this repo.
What it writes
One JSON line per explicit user denial to
~/.hermes/deny-record/denied-jobs.jsonl (override with
DENY_RECORD_DATA_DIR; HERMES_HOME scopes the default):
{"key":"dr_<hex>","profile":"<id>","tool":"cronjob_manage","ts":"<iso>"}
The key is sha256(canonical schedule + hashed target)[:20]. every 1d and
every 24h both canonicalize to interval:1440, so a rename or a change of
display string still matches. The job name is display-only and deliberately
excluded from the target hash.
What it reads
The same JSONL file, on every cronjob_manage create proposal, to decide
whether to add "you denied a similar job on <date>" to the approval card.
list/run/pause/update are left untouched. The source argument is
compatibility-only — main's hook dispatcher does not pass it; the real guarantee
is that a direct hermes cron add never reaches a tool hook.
What it does not store
No message or prompt text, no tool arguments beyond schedule and target digest,
no session ids, no commands, no approval choice, no network calls, no telemetry.
All values in the record are identifier-shaped (1–80 ASCII letters/digits/_.:/-).
Privacy guarantees
- 0700 data directory, 0600 event file; symlinked or loosely-permissioned
store paths are refused, never chmod-clobbered. - Profile-scoped through
get_hermes_home()/current_profile_name(), so
multiplexed sessions do not share a store. - Fail open: any recording or lookup error leaves the agent untouched.
- Observer/annotation only:
pre_tool_callreturns anapprovedirective (it
never returns a block). The user still decides on the standard approval card. - Explicit user
denyonly: smart/aux denials, timeouts and cancellations are
not recorded as user denials. - Exact rule attribution: a denial is recorded only when its
pattern_key
matches the key stored for that specifictool_call_id; impostor or empty
keys cannot claim it. - Per-call
[a]lwaysgrain: therule_keyincludes thetool_call_id, so one
"always" click cannot permanently suppress future denial notes.
Known limits: on main there is no native approval card for cronjob_manage,
so phase 1 uses its own approve directive to open the standard gate — this
means agent job proposals ask for approval, including in unattended contexts
where Hermes fails closed without a human. A tool call rejected before plugin
hooks run is invisible. Phase 2 hooks the schedule / schedule_edit
approval kinds introduced by #158289 to hold a proposal before the card is
drawn; it is intentionally not shipped here.
Install (review only)
Copy this directory to ~/.hermes/plugins/deny-record/ and enable it with
hermes plugins enable deny-record. No config hand-edits, no pyproject.toml,
stdlib only.
Verify
python3 adversarial_probe.py
python3 -m unittest discover -s tests -v
python3 smoke_load.py
hermes plugins validate /home/lakshaya/projects/hermes-deny-record
hermes plugins doctor /home/lakshaya/projects/hermes-deny-record
Captured output of the fresh runs is in validation/.
References / disclosure
Built against Hermes main at commit 3b42157858. Hook pattern and privacy
discipline follow github.com/percyhendrux123-prog/hermes-tripwire (catalog
tripwire, observer hooks + JSONL identifier-only discipline) and
github.com/percyhendrux123-prog/hermes-standing; both were offered as
reference points, not requests to merge. This plugin cooperates with rather
than competes with them.
README from the reviewed commit 87eec67; it updates when the author re-pins.

LangerSword
