DEV Community

Sungsoo Youn
Sungsoo Youn

Posted on

My Count Started at 1:36 PM. My Sentence Started at Midnight.

A field note from the autonomous Claude Code agent I run every day on one Windows PC. The numbers come from its own ledgers, not from memory.

Free to read first: a PDF sample of the book behind this setup — its first 3 chapters: https://dbsoul.gumroad.com/l/autonomous-ai-agents-claude-code-free-sample

In my last note I wrote that a size warning fired twice while my agent's handoff note sat over 400 lines. The numbers in that note were right. Two sentences around them were not, and neither was one in a short post I had queued for another channel. An independent auditor agent caught all three before anything went out.

What the numbers counted

The count was 84 commits that changed the handoff note, every one leaving it over 400 lines, and 96 shell calls that ran git commit in the same stretch. Both counts start at one commit: the one at 1:36 PM on September 21 that took the note from 399 to 407 lines.

The draft said it differently. One sentence started with From September 21 to the morning of October 8. Another started with From September 21 on. A short post I had queued for another channel said the same thing in Korean.

What the date opens

If you count from midnight on September 21 instead, git log gives 90 commits, not 84. 6 of them left the note under 400 lines: they are the earlier commits that day, between 1:49 AM and 1:07 PM, and they took the note from 360 to 399 lines. The shell calls become 104 calls, not 96.

So the sentence claimed every one of those commits was over 400 lines, and six of them were not. Nothing in the numbers was wrong. The window was.

It got worse. I had written a test that checks the note against git, and my own test asserted the wrong wording was present. It locked the mistake in.

Another short post I had written earlier about the same file, still waiting in the queue, had it right. It said the count ran from the commit that took it over 400 lines again. I had the correct boundary in one place and the date in three.

Two numbers nobody could rebuild

The same audit found two numbers that the auditor could not reproduce: one in my progress log and one in a code comment in the hook. Both gave a start date, September 6 in the log and September 19 in the comment. Neither said whether calls stopped before running were counted.

The auditor's own recount: the session logs only go back to September 10, and 148 calls in them actually ran. The old check accepted 10 of them, the new one 146. Calls stopped by a pre-tool hook before running are not in that count. I deleted both numbers. In the progress log I wrote the recount down together with how it was counted.

Three passes

The first pass flagged the three sentences and the two numbers. I opened all three sentences with the commit instead of the date, added the old wording to the test as text that must not appear, and kept the date-opened count of 90 in a test as well.

The second pass failed again, on the same shape in two other places. The handoff note's own entry for that cycle still opened the window with dates, which would make it 104 calls. And the hook's test file kept the numbers in its header that I had removed from the hook's comment. I fixed both.

The third pass passed.

The rules

  • Write a window's start in the unit you counted in. If you counted from a commit, say the commit. A date includes everything else that happened that day.
  • If you want the date, recount with the date. Then you have two numbers, and you can say which one you mean.
  • A test that copies your sentence copies your mistake. Check the sentence against the source, not against itself.
  • A total without its counting rule cannot be checked. Write what it includes and what it leaves out next to the number, and check the start date against the data you counted.
  • When you fix a sentence, look for its siblings. The second pass failed on copies I had not checked.

Where this comes from. Every post here comes from one setup I run daily: a CLAUDE.md, memory files the agent reads before it touches anything, and a separate auditor agent that returns PASS or FAIL. The first 3 chapters of the book that walks through it are free as a PDF: https://dbsoul.gumroad.com/l/autonomous-ai-agents-claude-code-free-sample

The full edition is 11 chapters plus 4 ready-to-use templates (CLAUDE.md starter, memory files, auditor checklist, measurement guide) and a hands-on section for every chapter, $19 as a PDF: https://dbsoul.gumroad.com/l/autonomous-ai-agents-claude-code

Questions about the setup are welcome in the comments — I'll answer with what actually happened, not theory.

Top comments (0)