You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Anton Dziatkovskii
tonydzi
Non-technical founder building a multi-agent lab. I publish the artifacts from running it daily: agent consensus, governance, persistent memory.
Cross-file dedupe exposure in Claude Code transcripts: measure the loss, split the loser shapes, and price the proposed zero-record guard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
firefox_places_doctor -- audit a Firefox places.sqlite you wrote into (url_hash / origin_id / ANALYZE), plus a verified reference implementation of Firefox's url_hash
firefox_places_doctor
If you write rows into Firefox's places.sqlite by hand, this tells you in 30 seconds whether Firefox will actually use them — or quietly pin a CPU core instead.
The pain
You migrated history or bookmarks into a Firefox profile (from Chrome, Arc, Safari, another profile, your own exporter). The rows are there. SELECT count(*) looks right. And then:
"Firefox sits at 100% CPU after I imported my history and I can't tell why."
"The URLs are in moz_places but the address bar never suggests them."
Which cap actually binds your Claude Code MEMORY.md index (UTF-16 units, not bytes) and what it silently drops
Which cap actually binds your MEMORY.md, and what it silently drops
The Claude Code auto-memory index is loaded through a truncation step with two caps: 200 lines and 25,000 size units. Three things about that step are easy to get wrong, and all three cost you content you never see go missing.
1. The size cap is not counted in bytes. The implementation measures trimmed.length on a JavaScript string, which is UTF-16 code units. The field is named byteCount, the cap is named byteCap, and the user-facing message formats it with a byte formatter. If your index is not pure ASCII, the number you are shown is not the number on disk, and the error always runs in the direction of compacting more than needed.
For a Cyrillic index at 1.38 bytes per unit, the real ceiling is around 34,500 bytes on disk, not 25,000. For CJK it is higher still.
2. Truncation is line-first, then size. The line cap is applied, and only then is the survivor cut at the last newline before the size cap. When bo
Recover the scheduled-task taskId -> executing sessionId link from Claude Code transcripts (read-only, stdlib)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Google Takeout MyActivity.html renders in the export-time timezone: two exports of one account don't dedupe (measured: 62,367 rows, 0 residual). Zero-dep UTC normalizer + selftest.
Takeout MyActivity.html renders in the export-time timezone, so two exports of one account don't dedupe
A ~90-line, zero-dependency Python helper that normalizes Google Takeout MyActivity.html timestamps to UTC, so importing a second export of the same account doesn't silently double your database.
The symptom
You imported your Takeout activity history months ago. You export again to top it up, run the same importer, and:
your row count roughly doubles instead of growing by a few thousand;
every old event is now in there twice, exactly one hour apart;
Four fuses + detector-agreement cascade for batch LLM jobs (fail-cache, circuit breaker, per-run cap, cheap-detectors-first). Measured: 887 calls/night -> <=40; 0.2% error on 1012 golden verdicts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test-Ps1Encoding.ps1: find .ps1 files that Windows PowerShell 5.1 silently mis-parses (UTF-8 without BOM read as ANSI; a smart-quote byte terminates the string early). Scheduled, such a script fails with 0x80070001 and writes no log at all. Read-only scan, -Fix adds a BOM, -SelfTest included.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
headroom v2.0.8: simulate the shipped MessageDeduper against a log tree and classify what survives it (replay + partial-snapshot classes)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Measure API-wait stalls across a whole Claude Code transcript corpus (stdlib only, read-only)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scheduled-tasks-doctor: find and restore Claude Desktop routines that vanished from the Routines list (registry is per-account; prompts survive on disk)
scheduled-tasks-doctor
Your Claude Desktop routines vanished from the Routines list — after an app update, after
signing in with a different account, or for no visible reason at all. This finds them and puts
them back.
They are almost certainly not deleted. The app splits a routine across two places: