What problem does say-yes-guard solve?
You tell a coding agent "deploy the docs to staging". It builds the site and ends its turn with "Build is green. Say the word and I'll deploy it." Your request was the go. Now you have to come back, type "yes", and wait again. Worse, you answer "yes" to "ok to delete the 3 stale branches?", and the next reply says "Ready to delete them, just say go."
say-yes-guard closes that gap with one rule: a direct request is the permission. If the agent's final reply parks the work behind a permission ask, or asks again for something you already said yes to, the agent is sent back once to do it. It is a plugin for Claude Code, free and open source at github.com/kilazi/say-yes-guard.
How does it work?
say-yes-guard installs three Claude Code hooks. None of them runs a tool or calls a model; they read text with regular expressions.
- whip-guard (Stop). Reads the final reply and looks for parking phrases: "say the word", "want me to", "should I …?", "if you want, I'll", "ready when you are", "waiting for your go", "your call", a bare "Go?" at the end. Lines that start with
BLOCKING:, code fences, quoted lines and text inside double quotes are skipped, so a quoted chatbot line or a shell prompt in a code block does not count. - go-ledger record (UserPromptSubmit). Each message you send is written to a per-session ledger with its kind (go, order, stop or plain talk) and the question or
BLOCKING:line it answered. So a bare "yes" is stored next to "ok to delete the 3 stale branches?". - go-ledger check (Stop). Rebuilds the ledger from the transcript, keeps the gos and orders still in force (newer than your last "no" or "wait"), and blocks the stop when the reply:
- asks again for an action a live go already covers (shared object words and the same kind of verb: delete, send, ship or change);
- waits for "any word" right after a bare yes;
- stalls on the action your yes approved without running a single acting tool call, whatever the wording, including an AskUserQuestion popup;
- ends by offering the next step of a job you ordered;
- sets a cap, gap or cutoff you never gave ("10 per hour, the other 30 go tomorrow").
When a check blocks, the agent gets a short reason quoting your words and its own ask, and is told to do the work and report the result.
What does it let through on purpose?
A guard that blocks too much gets switched off, so say-yes-guard leaves room for real questions.
- BLOCKING: lines. A production write, money, a message to someone else or an irreversible step can still wait, written as one line that starts with
BLOCKING:. go-ledger blocks it only when your own words already covered that action. - New things. "Deleted the cache. Should I also delete the old logs too?" names something you never mentioned, so it passes.
- Your questions. After "why did the build fail?", a question back is fair: the turn was opened by a question, not a go.
- Stops. After "no", "wait" or "don't deploy yet", nothing you said earlier counts as a go.
- Errors. Any internal error lets the stop through. Both hooks are standard-library Python with no dependencies.
How do I set it up?
Install it as a Claude Code plugin, then restart Claude Code:
claude plugin marketplace add kilazi/say-yes-guard && claude plugin install say-yes-guard@say-yes-guardThat is the whole setup. Requirements: Claude Code and python3, on macOS or Linux (Windows is untested). The ledger lives in ~/.local/state/say-yes-guard; set SAY_YES_GUARD_DIR to move it. To seed the cross-session check from recent sessions once, run python3 hooks/go_ledger.py --backfill from the plugin folder.
How do I turn it off?
- Both checks:
export SAY_YES_GUARD=off, set Enabled to off with/plugin configure say-yes-guard@say-yes-guard, or create a file namedOFFin the state folder. - One check:
SAY_YES_GUARD_WHIP=offorSAY_YES_GUARD_LEDGER=off. - One stop: stop again. The second stop in a turn goes through.
What are the known failure modes?
- Wording it has not seen. whip-guard is a phrase list. A new way to park work slips through until a pattern is added; go-ledger's stall check, which looks at the action and not the phrase, catches many of these.
- A yes that covered less than it seemed. go-ledger matches on shared object words and verb kind. If your yes was about a different target, the agent is told to say in one line what differs and stop again.
- Another language. English and common Spanish only; other languages pass unchecked.
Can I reuse the code?
Yes, under Apache-2.0. Keep LICENSE and NOTICE, and credit the repo in your README or NOTICE with one line: Uses say-yes-guard by Kilazi (https://github.com/kilazi/say-yes-guard). Other hooks can import ledgered_go() from go_ledger.py so a recorded go passes their own checks too. See also done-check, which stops an agent from saying done before the tests pass.
Get say-yes-guard
claude plugin marketplace add kilazi/say-yes-guard && claude plugin install say-yes-guard@say-yes-guardQuestions people ask
Can I reuse it?
Yes. say-yes-guard is Apache-2.0: copy it, change it, ship it in your own product. Keep the LICENSE and NOTICE files with the code, and add one line to your README or NOTICE: Uses say-yes-guard by Kilazi (https://github.com/kilazi/say-yes-guard). Coding agents get the same rule in the repo's AGENTS.md.
Will the agent stop asking me anything at all?
No. It still asks about a new thing you never mentioned, answers questions you ask it, and may wait on any line that starts with BLOCKING:, which is the agreed way to flag a production write, money, a message to someone else or an irreversible step.
Can the agent get stuck in a loop?
No. Claude Code marks the second stop in the same turn, and both checks let that one through. go-ledger also remembers which turns it already blocked and never blocks the same turn twice.
Does it slow Claude Code down?
No. It reads the final reply and the tail of the session transcript with plain regular expressions and answers in well under a second. It runs no tools and calls no model.
Does it send my conversation anywhere?
No. It runs locally. The ledger is a JSONL file per session in ~/.local/state/say-yes-guard, or wherever SAY_YES_GUARD_DIR points. It makes no network calls.
Does it work in languages other than English?
The patterns are English first, with common Spanish gos and stalls such as dale, listo and avisame. Other languages pass through unchecked rather than being blocked by mistake.
