← Back to Insights

Insight

Rules That Run, Part 6: The Promise at the End of the Reply

Ariel Agor
Updated
A promise at the end of a reply lives only in prose. Nothing tracked it, so nothing made it happen.

Listen · Read by Ariel

0:00 / n/a

Rules That Run is a ten-part series on the rules that keep an AI agent setup honest. This is part 6.

On October 19, 2026, two of Claude's replies ended with a version of "next I'm emailing X." The email was never sent. Each time, my next message brought a new request, and the agent moved on to it. Nobody lied and nothing crashed. The promise had only ever existed as the last line of a reply. Nothing tracked it, so nothing made it happen.

This post covers what I built that same day: a small commitments ledger, a Stop hook that catches a turn ending on an unrecorded promise, and a prompt hook that puts every open commitment in front of the agent at the start of each new message.

Why the promise falls through

A Claude Code turn ends when the model stops writing. Whatever it said it would do next is just text in the transcript. Nothing schedules it. If my next prompt is about something else, the agent answers that prompt, and the old promise becomes one paragraph in a long history. After a compaction it may not survive at all.

People do this too, and the fix for people is old: write it down somewhere you will look again. The difference with an agent is that you can make writing it down a condition of ending the turn.

The pattern that failed is specific. The agent did what a turn-based system does: finish the current reply, then handle the next input. The promise sat in the gap between those two steps, where no rule was looking.

The ledger

The ledger is a JSON file with a small CLI in front of it. Three verbs cover everything:

commitments add "Email the vendor the revised scope" --waiting-on me --due <YYYY-MM-DD>
commitments done <id> --evidence "sent; the outbox log has the message"
commitments drop <id> --reason "superseded by the new plan"

A record looks like this:

{
  "id": "<short id>",
  "what": "Email the vendor the revised scope",
  "waitingOn": "me",
  "due": "<YYYY-MM-DD>",
  "status": "open",
  "evidence": null
}

Three details matter more than the format.

done takes evidence. Closing a commitment means saying how you know it happened, which ties straight back to part 5. "Sent" with nothing behind it is a self-report.

drop exists and is recorded. Plans change, and a promise that no longer makes sense should be closed on purpose with a reason, instead of left open to rot or quietly forgotten.

waitingOn separates what the agent owes from what it is waiting for. Some open items are blocked on me or on someone outside. Listing those alongside the agent's own work means it can chase them instead of treating them as somebody else's problem.

The agent writes to the ledger itself through the CLI, so recording a promise costs it one command and costs me nothing.

The Stop hook

Claude Code runs Stop hooks when the agent is about to end its turn. The hook receives JSON on stdin, including the path to the session transcript and a stop_hook_active flag that is set when the agent is already continuing because a Stop hook blocked it.

The hook does four things. It reads the last assistant message from the transcript. It checks that message for future-action phrasing ("I'll", "next I'm"). If it finds some, it checks the ledger for an open entry that covers it. If there is none, it blocks the stop and tells the agent why.

// ~/.claude/hooks/promise-keeper.mjs (sketch)
import { readFileSync } from "node:fs";

const input = JSON.parse(readFileSync(0, "utf8"));
if (input.stop_hook_active) process.exit(); // block once, never loop

const lastReply = readLastAssistantText(input.transcript_path);
const PROMISE = /\b(I'll|I will|next I'm|I'm going to)\b/i;
if (!PROMISE.test(lastReply)) process.exit();

const open = loadLedger().filter((c) => c.status === "open");
if (open.some((c) => coveredBy(lastReply, c))) process.exit();

logBlock(input.session_id, lastReply);
console.log(JSON.stringify({
  decision: "block",
  reason:
    "Your reply promises future work that is not in the commitments ledger. " +
    "Do it now, or record it with `commitments add`, then stop.",
}));

The reason goes back to the agent as its next instruction, so the turn continues. The agent has two ways out. It can do the work now, which is usually the better answer, or it can record the promise so it survives the turn.

The hook blocks once. On the second attempt stop_hook_active is set and the hook lets the stop through. A Stop hook that blocks forever can trap a session in a loop, and I would rather lose the occasional promise than wedge a session. The cost is real: a turn that ignores the reason can still end on an unrecorded promise. I accepted that trade.

The injection

The second hook runs on UserPromptSubmit, which fires every time I send a message. Whatever it prints is added to the context the agent sees with my prompt. Mine prints every open commitment, with overdue ones flagged:

OPEN COMMITMENTS
- [OVERDUE] Email the vendor the revised scope (waiting on: me, due <date>)
- Re-run the import and post row counts (waiting on: me, due <date>)
- Pricing decision on the new tier (waiting on: owner)

This is the half that would have saved October 19. The failure was a new request arriving and pushing the old promise out of view. With the injection, every new request arrives with the open promises stapled to the top of it.

The Stop hook alone would not be enough. It makes the agent write the promise down, but a ledger nobody reads is a diary. The injection is what turns the ledger into something the agent works from.

What the numbers say, and what they do not

As of November 18, 2026, the ledger holds 317 commitments recorded since October 19. Of those, 252 are done, 24 were dropped and 41 are open.

Over the same period the Stop hook blocked 1,787 turn endings. That figure is easy to misread, so to be plain about it: it counts blocked stops. It does not count broken promises caught. Many of those blocks ended with the agent simply doing the work before it stopped, so no ledger entry was ever needed. Others would have ended with an entry added. A phrase matcher also reacts to wording, and wording is not always intent. The figure alone cannot say how the 1,787 split between those cases, and I am not going to guess.

What the numbers do show is that the ledger is used. Commitments get recorded, most get closed with evidence, and a meaningful share get dropped on purpose. The 24 drops are a good sign. Each one is a decision written down instead of a promise left to fade.

The 41 open items are the honest part. An open commitment is either work still owed or a wait on someone else, and every one of them appears at the top of every prompt until it is done or dropped. Any that pass their due date are flagged as overdue. An overdue promise that keeps appearing is annoying, and it is meant to be.

Choices worth copying

Make the cheap path the right one. When the hook blocks, the fastest way for the agent to finish is often to do the small thing it promised. That is the outcome I want most, and the hook makes it the path of least resistance.

Keep the match loose. The hook's job is to notice a promise, not to parse it. False alarms cost one extra step for the agent. Missed promises cost a dropped email.

Log every block. Without the log I would have no idea whether the hook fires, how often, or in which sessions. With it, I can at least see the volume, and I can see where I still cannot interpret it.

Show waiting-on items too. A list of only the agent's own tasks hides the things stuck on other people. Those are often the ones that go stale.

This pattern is not specific to Claude Code. Any agent that talks in turns has the same gap at the end of each turn, and any harness with a stop event and a prompt event can close it the same way.

Build it yourself

  1. Create a JSON ledger and a CLI with add (what, waiting on, due date), done (evidence required) and drop (reason required).
  2. Add a Stop hook in ~/.claude/hooks/ that reads the last assistant message from transcript_path, matches future-action phrasing, and returns {"decision": "block", "reason": ...} when no open ledger entry covers it.
  3. Exit quietly when stop_hook_active is set, so the hook blocks once and never loops.
  4. Add a UserPromptSubmit hook that prints every open commitment, overdue first.
  5. Log every block, and read the log as stops, not as broken promises.

Part 5: Done Means Shown

Want this kind of automation working for your business?

Agor AI designs and ships the systems these posts describe, scoped in weeks, not quarters.

Book a Free Strategy Call