Our first hook had a 3 second budget. The check it ran took 3.2 seconds. So for one version of our CLI, the feature worked perfectly and said nothing about the exact thing it was built to catch.
That was the easy bug. The hard one came a few hours later, when the hook finally spoke up, and the coding agent listened carefully, thought about it, and declined.
Three times.
1. What we were building
The idea is simple. When a coding agent writes a file, a hook runs right after. Since checks the file, and if the agent just wrote something already dead, like a model ID that was retired last month, the agent hears about it on the spot, with what to write instead.
Not after the build fails. Not in code review. On the line it just wrote.
The rules we gave ourselves:
- only files that name a model, a version, a runtime or a package get checked
- a clean file says nothing
- the same note is never said twice in a session
- the agent never waits long
That last rule is where the first bug lived.
2. The silent version
The agent's hook contract gives you a timeout. We picked 3 seconds for our own wait, because a hook that makes your agent feel sluggish gets uninstalled.
Before shipping, we'd already spent an evening on speed. A one-file check took 1.75 seconds in production, and when we counted, the read made 15 database queries one after another, each waiting on the last for no good reason. We ran the independent ones together and stopped reading the same row twice, and a one-file check went from about 20 sequential round trips to 11.
Then we measured the real thing, end to end, through the real CLI:
| What the agent just wrote | End to end |
|---|---|
| A file naming only a package | 0.8 s |
| A file with a model ID, seen before in another session | 2.0 s |
| A file with a model ID, first time | 3.2 s |
The fast cases were fine. The case the whole feature exists for, a model ID the agent just wrote, came in at 3.2 seconds. Our hook gave up at 3.
So version 0.5.0 did exactly what we designed: when Since is slow, say nothing rather than stall the agent. It said nothing about the one thing we built it to catch. We published 0.5.1, with a 6 second wait, eight minutes after 0.5.0.
Lesson one, cheap and obvious in hindsight: measure the case you care about, not the average case. The average was great.
3. The agent that said no
Next, we wanted proof the note actually changes what an agent writes. We have a benchmark that asks coding models everyday questions and checks whether their answers use things that are already retired. We added a hook arm: the model answers, the hook checks the files it wrote, and if something is proven wrong, the model gets the note and one turn to revise.
We ran it on a small, fast model first. The note arrived. The model read it. And three times, it left the retired model ID exactly where it was.
Here's the part I didn't expect: it explained itself each time. No hallucinated compliance, no ignoring us. It gave reasons. Good ones.
Here's what the note looked like back then (this one is the example from our CLI's own tests):
Since.dev checked what was just written and found:
- src/llm.ts:3: gpt-3.5-turbo on OpenAI API: retirement 2026-10-23. Use gpt-5.6-terra. Write: export const ask = (q) => client.chat.completions.create({ model: "gpt-5.6-terra", messages: [{ role: "user", content: q }] });
Read it as a careful engineer would. It's a list of facts. The instruction, "Use gpt-5.6-terra," is buried in the middle, after a date. There's no source. And there's no ask.
4. The three reasons
Reason one: "That file doesn't exist." The note named a file the benchmark had made up, src/file1.py, because the model's answer hadn't named its files and our harness invented a placeholder. The model looked at its own answer, saw no such file, and reasonably concluded the note was about something else.
Reason two: "I didn't write that." The note named the dated model ID, while the code used the short alias. To us those are the same model. To a careful reader, the note was complaining about a string that didn't appear anywhere in the code.
Reason three: "I can't verify that." The note said to use a replacement, with no source. The model had no way to check that the replacement was real, so it kept what it knew. Which, honestly, is the behavior you'd want from an agent when a stranger's message tells it to change a model ID.
Each of those is a bug in the note, not in the model. The model was doing exactly what we'd want it to do with a vague, unsourced, slightly wrong message.
5. The rewrite
We changed four things:
- the note leads with the instruction, and quotes the model ID the way the line actually writes it
- it drops the tail that listed how many other things work differently
- it links the source, the provider's own deprecation page
- it ends with the ask
And in the benchmark, files are named the way the answer named them, and the model has Since's lookup tools available (with no rule telling it to use them), so if it doubts a replacement, it can check.
The same example, rewritten:
Since.dev checked what was just written and found:
- src/llm.ts:3: replace gpt-3.5-turbo here with gpt-5.6-terra. gpt-3.5-turbo on OpenAI API: retirement 2026-10-23. Write: export const ask = (q) => client.chat.completions.create({ model: "gpt-5.6-terra", messages: [{ role: "user", content: q }] }); Source: https://developers.openai.com/api/docs/deprecations
Fix each one before you go on.
Same facts. Different order, one link, one sentence at the end.
On the same 8 cases, the revisions went from 1 clean to 7 clean.
6. What changed in how I think about it
I had been writing the note for a human skimming a terminal: facts first, the eye finds the fix. An agent doesn't skim. It reads every word, takes them literally, and weighs them against what it can see. A note that names a file it can't find, or a string it didn't write, isn't a weak signal to an agent. It's evidence the note is wrong.
Which means a message to an agent is closer to an API than to a log line. It needs to be exact, it needs to say what to do, and it needs to show its work.
What I'd tell myself before
- Time the slow case before you pick the timeout, not after.
- When an agent ignores your instruction, read its reasons before you make the instruction louder. Ours were right.
- Put the action first and the proof last, and always include the proof.
What's the most reasonable excuse a coding agent has given you for not doing what you asked?
I'm Nabil. I build Since, which tracks what your code depends on and tells you before it breaks.
Top comments (3)
The three refusals are the best part — each one was the agent being right and the note being wrong. "I didn't write that" because the note used the dated model ID while the code used the short alias is the kind of mismatch I'd never have thought to check. One thing I'm wondering: the first-time lookup still takes 3.2 seconds against a 3-second budget, so did the rewritten note ship with a longer timeout, or did you find a way to make that first lookup faster? And of the three fixes, which was the hardest to get right in practice?
The 1/8 to 7/8 result is promising, though several things changed together: the note, filenames, and access to lookup tools. Separate ablations would show which change helped. I'd also keep a counter for timed-out checks: a silent timeout and a clean file otherwise look identical to the agent.
3.2s on a 3s budget is the whole story. the hook never got to speak.