# WO-53: Stop duplicate deferred reflection writes

Status: scoped source repair verified; publication remains with the operator.
Issue: https://github.com/robit-man/open-agents/issues/3

## Finding

Runtime 1.0.701 repeatedly upserted unchanged retained Telegram messages. The deferred branch computed an episode ID but unconditionally appended and returned `reused: false`. A captured 1.2 MB tail contained 138 copies of one message with identical content; the complete spool was 3,275,565,579 bytes. That sample does not attribute every byte of the backlog to this producer. Evidence and hashes: `/tmp/omnius-rapid-issues-a6e37rk0/manifest.json`.

## Repair

- `packages/cli/src/tui/telegram-reflection-corpus.ts`: fingerprint scoped message identity plus projected content and metadata; return the actual deferred reuse receipt. Preserve edits to text, mode, media and reply context.
- `packages/cli/src/tui/memory-paths.ts`: persist content-addressed revision receipts after a flushed JSONL append. Receipts survive process reload and maintenance rotation without opening episode or graph databases inline. Unkeyed callers retain their existing append behavior.
- Existing bot ownership serializes the producer. This is an at-least-once crash boundary: interruption between append and receipt can cause one replay; the receipt must never acknowledge an unwritten record. No global multi-writer exactly-once claim is made. The existing large spool is preserved for maintenance, not deleted or rewritten.

## Verification

- [x] 138 repeated unchanged upserts add exactly one record and return reuse.
- [x] Fresh module state plus rotated spool still reuses the persistent revision receipt.
- [x] Changed text/mode/media and different chat scope remain separate records.
- [x] Failed append does not create an acknowledgment; retry succeeds.
- [x] All seven cases in `memory-paths.test.ts` and `telegram-reflection-corpus.test.ts` passed: `/tmp/omnius-issue3-churn-tests.log`.
- [x] All-workspace build passed: `/tmp/omnius-issue3-build.log`.

## Remaining issue scope

The repeated context-snapshot recovery behavior remains in issue #3. The read-headroom comparison was refined: the first zero-headroom receipts occurred with 39,615/40,000 canonical input tokens, requesting another 4,718 and 3,203 tokens. Physical model free space is a different budget; the subtraction was not shown incorrect. Do not increase only the read ceiling, which could violate subsequent canonical admission. Neither behavior is claimed repaired by this scoped churn patch. No live inference, service restart, model change or backlog mutation was performed.
