Documentation
¶
Overview ¶
Command replystamp refuses a reply that does not carry the local date and time CLAUDE.md requires of every one.
⛔ A WRITTEN RULE WITH NO GATE IS BROKEN FOR A WHOLE SESSION AT A TIME. The rule is the first one in CLAUDE.md:
Start every reply with the local date and time, 24-hour clock: **[2026-11-01 21:05 CET]**, never am/pm. Take it from the latest PostToolUse hook line « Current date/time: … », never from the session start date. Re-read this after every compaction.
Measured on 2026-11-11, in this session: EVERY reply from the start of the session until the moment the rule was re-read after a compaction carried no stamp at all. Nothing said so. The rule had been written, read, and silently dropped, because the only thing enforcing it was my own memory of it — and a compaction is precisely the event that empties that memory. The rule even says "re-read this after every compaction", which is an instruction to remember to remember.
So the check runs instead of being remembered. It is a Stop hook: the reply is already written when Stop fires, the transcript holds it, and a hook that answers `{"decision":"block"}` sends it back to be written again with the stamp on it.
What it judges, and what it deliberately does not ¶
It judges the FIRST text block of the turn — the start of the reply, which is what the rule is about. Text written between tool calls later in the same turn is not a reply's beginning and is not asked to carry a stamp.
The four findings are each a distinct way the rule has been broken:
missing no **[...]** at the start at all (this session, every reply) am/pm a 12-hour clock (the rule names it) hour an hour of 24 or more stale a stamp far from the clock NOW (the session start date)
⛔ IT CANNOT CHECK THE ONE THING THE RULE ASKS FOR MOST DIRECTLY: that the time came from the latest PostToolUse hook line rather than from somewhere else. A stamp is a string; where it was copied from leaves no trace. What staleness measures is the CONSEQUENCE of the forbidden source — a session start date is hours or days from now — and that is the part a program can see. A stamp inside the tolerance that was nevertheless invented passes.
Why it allows whenever it cannot read ¶
Same rule as recur's gate, for the same reason: a refusal is not a verdict. An unreadable transcript, a turn that ended on a tool call, a payload that is not a Stop payload — each of those is a question that could not be put, and blocking the session on one would make the gate's own breakage look like a finding. It says so on stderr and gets out of the way.
Why it stops blocking after a while ¶
A Stop hook that blocks is re-entered when the next reply ends, so a model that cannot satisfy it loops. --max-blocks bounds that: after this many consecutive blocks in one session it allows, saying that it has given up. The count is per session, kept beside the other durable state, and is cleared the moment a stamped reply goes through.
Exit status, outside --hook: 0 the reply is stamped, 1 it is not, 2 the question could not be put. Inside --hook the status belongs to the hook protocol, not to that convention: it is 0 whatever the verdict, and the verdict travels in the JSON on stdout, so that a crash of this program can never be read as a refusal of the reply.