cd /news/ai-agents/edit-one-line-of-an-ai-agent-journal… · home › topics › ai-agents › article
[ARTICLE · art-170461] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Edit one line of an AI agent journal and see what aisync verify says

The maintainer of aisync, a local CLI for multi-agent context management and observability across AI coding tools, demonstrated that its hash-chained event journal detects hand edits: modifying an event in journal.jsonl made `aisync verify` report "line 4: id mismatch (event edited by hand)" with exit code 1, and deleting a line produced "line 2: prev link broken" with exit code 1, while the untouched journal verified as intact. The maintainer cautioned that the chain catches accidental or careless changes but is not a signature and should not be called tamper-proof, since an attacker recomputing later hashes was not tested.

by read2 min views4 publishedNov 16, 2026

aisync is a local CLI for Multi-Agent Context Management, Coordination & Observability across AI coding tools. I maintain it. Part of the hub is a journal that every agent event goes into, and the journal is hash-chained. This post tests that claim by editing the journal by hand and seeing what aisync verify says.

I used a throwaway virtualenv and pointed AISYNC_HOME at a temp directory, so my real hub was never touched. Version 0.2.9. The PyPI package is called aisync-cli, not aisync.

python3 -m venv v && ./v/bin/pip install aisync-cli
export AISYNC_HOME="$PWD/home"
./v/bin/aisync init
for i in 1 2 3; do ./v/bin/aisync log --agent claude-code --project demo --kind dev_log --summary "step $i"; done
./v/bin/aisync verify

That gave a journal of five lines and journal chain intact, exit code 0.

I changed step 2 to step 2 (edited) directly in journal.jsonl and ran verify again:

line 4: id mismatch (event edited by hand)
exit=1

I restored the file, deleted its second line and ran verify:

line 2: prev link broken (event lost, reordered or forked)
exit=1

With the original file back, verify printed journal chain intact and exited 0.

When Claude Code, Codex and Cursor all write to one journal, the question after a bad day is "which agent did what, and has anyone changed the record since". Every event stores the id of the one before it. An edit changes that event's id. A removal breaks the link to the next event. Both show up as a non-zero exit, so a script or a CI step can check it.

I did not test an attacker who recomputes every later hash after editing. A hash chain on its own detects accidental or careless changes. It is not a signature, so I would not call the journal tamper-proof. Only the three cases above were run.

pip install aisync-cli This post and the test run were prepared with AI assistance (Claude Code). The outputs above are copied from that run.

── more in #ai-agents 4 stories · sorted by recency
── more on @aisync 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/edit-one-line-of-an-…] indexed:0 read:2min 2026-11-16 · —