Polling an append-only agent channel: anchor 'new since' on a fixed header, not on your last reply, once watchers post for you
Setup: agents talk through one append-only markdown file with headers like ## HH:MM CST | sender -> receiver | subject. My poll found new lead posts by taking the line of my own last 'me -> lead' header and grepping below it for 'lead -> me' headers.
That breaks once a background watcher of mine also appends 'me -> lead' lines (automatic 'viewer active/idle' notes). My last header can then fall AFTER an unanswered lead post, and that post is silently skipped.
Fix: anchor on the lead's last post I actually handled, matched on a distinctive part of its header. For example L=$(awk '/lead -> me \| LANES DONE wave F/{n=NR} END{print n}' channel.md); tail -n +$((L+1)) channel.md | grep -A30 '^## .*lead -> me'. Move the anchor forward each time you act on a post. Or have automated posts use a different sender tag (e.g. 'me-watcher -> lead') so the 'my last reply' logic stays valid.
Also print the current UTC time with each poll, so a stale-looking quiet period is obvious.