{"slug": "hours-unattended-the-memory-bugs-that-broke-my-autonomous-coding-agent", "title": "Hours unattended: the memory bugs that broke my autonomous coding agent", "summary": "A developer's autonomous coding agent failed repeatedly over 72 hours due to memory bugs, including silently dropped credentials, truncated logs, incorrect time calculations, and false success detection, leading to the creation of memctl, a free CLI that versions project memory files. The failures highlight that an agent's trustworthiness depends on its memory integrity.", "body_md": "## The setup\n\nI gave an autonomous coding agent a standing mission, three tools, and a rule: keep producing,\nnever wait for permission. The mission itself was unremarkable. What the *first 72 hours*\nexposed wasn't about the mission at all — it was about **memory**. Everything that went\nwrong was a memory failure, dressed up as a technical bug.\n\n## Bug 1: the silently-dropped secret\n\nAn operator pasted an inbox password into a message. The agent's pre-save caretaker consumed the\nmessage, saved nothing, and replied as if it had — *twice*. The second time, nobody noticed,\nbecause the failure mode was no error at all. A silent drop is the worst kind of bug: the happy-path\nmessage came back, so the system looked healthy.\n\nThe fix wasn't a bigger try/catch. It was an **evidence file**: every credential is\npersisted or rejected loudly, with a memento left behind, and every critical event lands in a\nsingle append-only log that nothing truncates. Now a drop is an event with a timestamp, not a\npolite void.\n\n## Bug 2: the truncation cascade\n\nThe caretaker's event log was a ring buffer that overwrote the oldest lines. The day the receipt of a submitted story mattered, the line had been silently replaced by a heartbeat. Deleting the first warning someone needs to see is functionally the same as deleting the secret: coverage that looks like it's on, isn't.\n\nLesson: if a log is capped, the cap needs *escalation*, not silence. The critical stream and\nthe heartbeat stream are different products.\n\n## Bug 3: the clock that posted into the future\n\nA backoff queue computed \"time since last attempt\" using a shell date string that included the timezone offset not applied to the comparison. The queue concluded it had just posted — because in its own arithmetic it was three hours in the future — and went to sleep. A queue that decides it has already done its job is indistinguishable from a broken queue, except that it's also smug.\n\nLesson: unix milliseconds from `Date.now()`\n\n, serialized once, in one unit, everywhere.\nNo parsing, no offsets, no local-time folklore.\n\n## Bug 4: the false success\n\nA submission helper piped its output to a file for inspection and forgot that \"the output\" had — by construction — become empty. An empty string matched the success regex; the system celebrated a post that never reached the public feed. Asserting on an artifact you just deleted for inspection is asserting on your own echo.\n\nLesson: success detection runs on the *real response body*, and failure strings\n(`too fast`\n\n, `expired`\n\n) are first-class outcomes, not lack of success.\n\n## What all of this is, actually\n\nEvery one of these is a **memory bug**: state written once and read back wrong, state\noverwritten, state never written, state asserted from the wrong source of truth. Which is the\nargument behind [memctl](https://raw.githack.com/EltonCherrington/memctl/main/README.md) —\na free CLI that versions your coding agent's project memory (`CLAUDE.md`\n\n/\n`AGENTS.md`\n\n), so \"what was I doing\" is a `git log`\n\naway instead of a guess.\nThe agent in this report runs on those same files; the two truest sentences I can write are:\n\n- an agent is only as trustworthy as the memory it keeps, and\n- the failure to warn is a failure mode.\n\n**Tools already left in the open, all self-contained, no tracking:**\n\n[plainqr](https://raw.githack.com/EltonCherrington/plainqr/main/plainqr.html)— QR codes, plain ·\n\n[tinyhash](https://raw.githack.com/EltonCherrington/tinyhash/main/tinyhash.html)— browser hashing, zero servers ·\n\n[onefile-unlock](https://raw.githack.com/EltonCherrington/onefile-unlock/main/onefile-unlock.html)— a crypto paywall in one HTML file. If one of them saved you five minutes, the shop has a receipt and tip rail:\n\n[memctl.sh](https://raw.githack.com/EltonCherrington/memctl-shop/main/site/index.html).", "url": "https://wpnews.pro/news/hours-unattended-the-memory-bugs-that-broke-my-autonomous-coding-agent", "canonical_source": "https://eltoncherrington.github.io/memctl-shop/essay.html", "published_at": "2026-08-30 15:42:05+00:00", "updated_at": "2026-08-30 15:51:54.983327+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-safety"], "entities": ["memctl", "Elton Cherrington"], "alternates": {"html": "https://wpnews.pro/news/hours-unattended-the-memory-bugs-that-broke-my-autonomous-coding-agent", "markdown": "https://wpnews.pro/news/hours-unattended-the-memory-bugs-that-broke-my-autonomous-coding-agent.md", "text": "https://wpnews.pro/news/hours-unattended-the-memory-bugs-that-broke-my-autonomous-coding-agent.txt", "jsonld": "https://wpnews.pro/news/hours-unattended-the-memory-bugs-that-broke-my-autonomous-coding-agent.jsonld"}}