All posts

7 min readPost 1

It started with a small question: a countdown for a file

AI coding agents flood workspaces with throwaway scripts, logs, and screenshots, yet rule-file reminders fade after context compaction and manual cleanups default to irreversible rm -rf. Here is how Obituary started from that concrete annoyance, why file identity beat paths on night one, and the three bug classes exposed by our first code audit.

On this page
  1. Existing tools watch folders, not individual agent artifacts
  2. A 13-minute first prototype: track identity, never just paths
  3. First audit: 26 findings, one recurring danger
  4. Three rounds of naming: landing on Obituary
  5. Four engineering bets locked in on night one

Run AI coding agents long enough and every workspace fills up with temporary debris: one-off debug scripts, reproduction logs, screenshots, test output, and disposable worktrees. We originally put a rule in our agent instructions telling agents to clean up temporary files before finishing. In real sessions, that rule quietly failed.

After a few rounds of context compaction, instructions read at the start of a long session get forgotten. When an agent does remember, it usually reaches for rm -rf—bypassing the system Recycle Bin, with nobody checking whether the target path is right.

The only moment anyone knows how long a scratch file should live is the moment it gets created. If an agent attaches an expiry timer right when it writes the file and hands cleanup to a local background runner, nothing depends on the model remembering hours later. That is the premise behind Obituary (obit for the CLI, obitd for the background daemon): giving arbitrary files and folders a countdown lifespan.

Existing tools watch folders, not individual agent artifacts ​

Before writing a line of code, we surveyed what already existed. Nothing let a CLI or an AI agent attach a countdown to an arbitrary path.

Windows ships two built-in options:

  • Task Scheduler can run a one-shot Remove-Item job, which requires wiring up a separate task and script for every file.
  • Storage Sense sweeps fixed folders like Downloads by age, with no way to target a specific artifact inside a repo.

Third-party utilities follow the same folder-rule mold, and most free ones have gone years without updates. As a standalone commercial product, timed deletion is hard to defend—the core loop looks trivial and broader automation suites fold it in as a single rule.

So we skipped building a general file organizer or cloud sync tool. We focused on one narrow, recurring job: files an agent creates should carry their own lifespan from birth and leave the workspace safely when time runs out.

A 13-minute first prototype: track identity, never just paths ​

On the evening of 7 November 2026, we built the first working prototype in roughly thirteen minutes. At that point it was called Lifespan with a ttl binary, shipping add, list, extend, cancel, sweep, and log, each with JSON output for scripts and agents.

A login-time background process handled expiry:

  • Items that expired while the machine slept or stayed powered off were caught on the next wake or boot.
  • Expired targets went to the Windows Recycle Bin through IFileOperation; if the Recycle Bin refused an item for lack of space, the daemon kept the file in place and retried later instead of falling back to permanent deletion.

The foundational technical choice in that first build was identifying targets by filesystem identity rather than path string. On NTFS, identity means the volume serial number plus the 128-bit file ID. Rename or move the file and Obituary still finds it; replace the path with a brand-new file of the same name and the old countdown leaves the new file alone.

Registration also enforced hard safety boundaries from day one:

  • Drive roots, system folders, and Program Files could not be registered; the user's home directory itself was blocked, while files inside it were allowed.
  • Symbolic links and NTFS junctions were rejected outright.
  • Git repositories required --force and were rechecked before expiry cleanup.
Terminal output from rebuilding the initial ttl prototype: assigning lifespans to files and folders, rejecting system directories and folders containing .git, listing entries by expiry time, and previewing cleanup with --dry-run
Rebuilt from the initial prototype source: setting lifespans, refusing system paths and Git repositories, listing entries by expiry, and previewing cleanup with --dry-run.

The prototype had 17 tests, including one real Recycle Bin check gated behind an environment variable. To verify that our "do not delete on identity mismatch" test actually caught bugs, we temporarily broke the identity check. On the first try, leaving a variable unused caused a compile error—which proved nothing. Only after writing a broken version that still compiled did the test genuinely fail.

That small stumble became a permanent repo rule: proving a regression test works requires a broken variant that still compiles.

First audit: 26 findings, one recurring danger ​

Before installing the prototype on a daily machine, we ran two parallel read-only code audits—one focused on accidental-deletion guards and Win32 API usage, the other on concurrency, ledger persistence, the background runner, and CLI edge cases.

Ten minutes later, 26 findings came back. Checking each against the code confirmed almost all of them, clustering into three failure classes:

1. Deleting the wrong object ​

  • Registering a temporary hard link and deleting it allowed the 128-bit file ID lookup to resolve a different hard link pointing to the same data, sending an unrelated user file to the Recycle Bin.
  • Windows 8.3 short names (such as PROGRA~1) and paths under a parent junction slipped past string-based path protection checks.
  • Relocating Downloads or Desktop to another drive broke hardcoded default-path protections.

2. Failing open on check errors ​

  • The .git detector inspected only top-level subdirectories and treated read errors as safe to proceed.
  • Transient access errors—locked files or permission glitches—were misclassified as "file already gone," silently dropping the ledger entry.

3. Stale state and durability gaps ​

  • Cleanup iterated over a snapshot captured at the start of a sweep; extending or canceling an entry mid-run did not stop it from being removed.
  • Ledger writes lacked fsync before commit, risking lost updates on power loss.
  • Adding durations could overflow, bypassing the ten-year lifespan cap.

Finding 26 bugs in a 13-minute prototype was expected. What stuck with us was the common thread: mistaking the object currently at a path for the object originally registered is the deadliest failure mode in any deletion tool. Almost every major architectural decision over the next two weeks—replacing the Recycle Bin with a private graveyard, renaming over pinned handles, and compile-time mutation testing—grew directly out of closing that class of bug.

Three rounds of naming: landing on Obituary ​

Neither Lifespan nor ttl was memorable. Settling on a name took three passes:

  1. The first pass leaned poetic (morning dew, mayfly, night-blooming flower), which fell flat on a command line.
  2. The second pass tried expiry metaphors—Grim and Atropos (the Greek Fate who cuts the thread of life). Package searches killed both: grim is already a popular Linux Wayland screenshot tool, and Atropos collided with an active open-source AI project.
  3. On the third pass, we checked package registries first. After confirming zero collisions across npm, Homebrew, PyPI, crates.io, Debian, and Arch, we had a clean namespace.

The name became Obituary, with obit for the CLI and obitd for the background daemon.

Subcommands followed the same metaphor while keeping plain aliases for muscle memory: mark (add) sets a lifespan, spare (cancel) stops tracking, and reap (sweep) processes expired entries.

Four engineering bets locked in on night one ​

With the name and initial audit lessons settled, the roadmap took shape around four commitments:

  • Agent-first integration: hooks, an MCP server, and a Skill are first-class entry points, designed for one-command install, clean uninstall, and honest reporting of each host's limits; the human tray, desktop window, and context menus come second.
  • Native OS primitives first: build ironclad handle-level identity checks on Windows first, then carry the same safety contract to macOS and Linux.
  • Iterative write–review–fix loops: after each stage, run independent read-only audits, verify every finding against code, write a failing test first, and repeat until serious findings reach zero.
  • Go end to end: chosen for fast compile-time mutation testing and a mature ecosystem for native shell parsing.

All posts