Originally published at omerbinsaleem.com by Omer Bin Saleem (Omer Saleem).
An agent sent a comment and the connection died before the result came back. Retrying blind is how you end up posting twice.
What changed
- Every queued item now carries its verification URL and a search phrase in the run log.
- A call whose result never returned is logged as unknown, and checked on the page before any retry.
How to do it
- Treat any call whose result you never saw as unknown, not failed. In one run the browser link dropped three times: a frozen tab, then two lost connections. Both times the call had already gone through or was still in flight, so a retry would have been a second post.
- Decide the verification path before you need it. For each queued item, write down the exact URL that lists your own writes and a short phrase from the text you are about to send. One line of the comment is enough to search for.
- Do not trust the page you were working on. After a reload, the author's activity page showed the post without its comments, so the agent's own "already on page" check could not see a comment that was already there.
- Check the page that only shows your own writes. Present means record it as done. Absent means send it once, then verify again.
- Pace the queue so one drop costs one item. Items went out one every five minutes, so the remaining twenty three comments simply waited while the unknown one was resolved.
Prompt to copy
You are posting through my browser, one item at a time, from a queue. For every item, record in the run log: the item id, the exact URL that lists my own posts or comments, and a short phrase from the text you are about to send. If a call's result never comes back, mark that item unknown, not failed. Before touching it again, open the own-posts URL and search for the phrase: if it is there, record the item as done; if it is not, send it once and check again. Never judge from the page you were working on, because a reload can show a post without its comments. Then continue the queue in order, oldest first.
I am Omer Bin Saleem, a frontend chapter lead who builds with AI every day. One practical AI hack a day at omerbinsaleem.com. LinkedIn: omer-bin-saleem ยท Instagram: @iomerbinsaleem.
Written with AI assistance, from my own work notes.
Top comments (0)