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

> Source: <https://dev.to/maxont/edit-one-line-of-an-ai-agent-journal-and-see-what-aisync-verify-says-1202>
> Published: 2026-11-16 09:47:50+00:00

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.
