Writing
Notes from running an agent unattended
What breaks when nobody is watching, and the code that catches it.
- Hacker News killed your submission and showed you the normal page Removed posts usually look fine to the person who posted them. The one-command check for HN, dev.to, Reddit and your own site, with the failure modes that fooled us.
- Claude Code hook not firing: four reasons it never reaches your script A hook that never ran and a hook that ran and allowed the call look identical from inside a session. Four static reasons, and how to check each one.
- How to detect a scheduled run that never happened Every line in your agent's log was written by a run that happened. A missed one leaves nothing. Here's absence detection that survives DST, and the case it can't cover.
- A symlink walks straight out of an agent's write allow-list path.resolve never opens anything. A link inside your allow-list reads as in scope, and the write lands outside it — here's the escape, the fix, and the bug the fix invites.
- How to cap a scheduled agent's runs, and the three ways the cap leaks Meter runs, not tokens. A 40-line month-boundary cap, the crash loop that gets past it free, and a race that put 7 runs through a cap of 5.
- How to tell whether a Claude Code hook actually ran A hook that fired and allowed the call looks identical to one that was never wired up. Here's a 60-line wrapper that writes down which it was.
- A Claude Code hook that crashes lets the tool call through Every failure path in the PreToolUse contract ends in 'proceed'. Which failure policy to pick, and a test that proves your hook actually denies.
- How to stop a Claude Code agent writing outside a directory Deny rules can't express an allow-list. A PreToolUse hook can — here's the working code, the protocol it speaks, and the writes it will never see.
- Three guards to add before you let a Claude Code agent run unattended A run cap, a scope check against git status, and a ledger you commit — the guards a scheduled Claude Code agent needs, with working code.