You open a work message, see that it needs a little investigation, and move on with the morning. Your assistant is supposed to collect those requests so you can return to them later.
Except this one never appears.
It's tempting to blame the model for overlooking it. But the model may never have received the message. In a forwarding script we reviewed, a failed send could be retried successfully only while the message still qualified as unread. Opening the conversation changed that condition.
For a personal assistant, that's an uncomfortable failure. Reading a request is often the first step in dealing with it. You should be able to open the conversation without making the request disappear from the assistant's next attempt.
We checked this by comparing an older unread-message forwarder with a newer assistant package, then running their collection and retry functions against made-up messages. Saving the failed batch helped. Looking more closely also turned up a gap when a retry holds up the next collection. The tests here use temporary local data and simulated failures; they don't establish how an employee deployment performs.
You should be able to read a message and come back to it
Suppose a colleague asks you to check why a delivery charge is missing. You read the message on your phone. The assistant's receiver happens to be busy, so the first forwarding attempt fails.
A useful assistant should still be able to bring that request back when its receiver is available. You shouldn't have to remember to mark the conversation unread, paste the message into another window, or ask your colleague to send it again.
Keeping a pending record gives the assistant something to return to after the failed attempt. It also gives you somewhere to look when you ask, “What is still waiting, and since when?”
Of course, getting the message through doesn't finish the investigation. Someone may still need to approve a change or contact dispatch. I'd want the assistant to show that unfinished task, even after its forwarding log has turned green.
The missing-charge request in this example is fictional. The collection and retry behavior below comes from the code we checked.
The retry ran, but it had nothing left to send
The older script reads two things: new messages after its saved position, and the conversations currently marked unread. A message has to satisfy both conditions, along with the sender, type and time-window filters, before it is forwarded.
On a failed send, the script keeps its saved position. That sounds sensible. The next run can scan the same messages again.
The problem is that it rebuilds the candidate list from the current unread state. It hasn't saved the failed payload separately. By the next run, the person may have opened the conversation.
Here's a simplified sequence from our synthetic fixture:
| Step | Human or system event | What the forwarder sees |
|---|---|---|
| 1 | Message 101 arrives and is unread | One message qualifies for forwarding |
| 2 | The send is rejected | Saved position stays at 100 |
| 3 | The person reads the conversation | The unread entry disappears |
| 4 | The script retries its scan | Message 101 is still in storage, but no longer qualifies |
| 5 | An empty run finishes | The script can move its saved position past 101 |
We ran the actual collection function against temporary message and unread tables. It returned one candidate before the unread entry was removed and zero afterward. The second scan proposed advancing to 101, even though our simulated failed send had left the saved position at 100. The empty-run branch in the script saves that proposed position.
This is the detail I'd look for when reviewing a retry implementation. Keeping the cursor lets the next run scan the same records, but the filters can still reject them. Retain the failed payload, or give the retry a stable way to retrieve it without consulting unread status again.
There was a second way to lose the candidate. Leave it unread long enough and it falls outside the rolling collection window. Our old-collector fixture reproduced that too. The message was present and unread, but the next scan skipped it as too old.
Save what you captured before relying on a later scan
The newer package has changed substantially. Despite keeping the old forwarder filename, its current collector takes new messages within a recent time window without consulting unread status. It also includes the account's outgoing messages. That's a different collection scope, which needs to fit the assistant's permissions and purpose.
When a send fails, the newer code saves the batch itself in a pending list, together with its count and window information. The saved scan position is written in the same state document. A later run tries pending batches before it collects fresh messages.
That means a previously captured batch can be sent again without asking the chat application's unread table whether the messages still deserve attention.
In our fixture, a batch survived a failed retry in a temporary JSON state file. After the simulated clock had moved beyond the normal collection window, the pending flush still sent the original message. It read the stored batch rather than collecting the message again.
For a new workflow, I'd save the eligible batch and scan checkpoint before the first network attempt. The code we inspected sends first and saves on success or failure. If the process stops before that save, it hasn't yet made a durable record of the attempt. That's another place I'd want a test.
This is the order I'd aim for in a small local design:
read new messages after the saved checkpoint
apply the configured collection scope
in one local transaction:
store the eligible messages as pending
advance the checkpoint for the records examined
retry pending deliveries independently of read status
record the receiver's acknowledgement
track task completion separately
This is proposed pseudocode, not a patch copied from our application. The transaction is the important part: storing pending work and advancing past the source records should succeed together. SQLite documents that atomic-commit behavior. The inspected package uses a temporary JSON file followed by file replacement; we haven't tested it for power-loss durability or concurrent writers.
You also need a clear collection policy. If an assistant deliberately collects only unread messages, a message read before its first scan may never enter its scope. Saving failed batches improves retries after capture. It can't recover a request that was never captured.
A stalled retry can hide the next request
There is another detail in the newer package that I'd test before trusting it with work requests. If a pending send fails again, the run returns without collecting new messages.
That avoids building a larger local queue during the outage. But the source collector still uses a rolling time window.
Suppose the pending batch keeps failing for ten minutes and the collection window is five minutes. A second request arrives during that wait. When the receiver recovers, the stored batch gets through. The second request may already be too old for a fresh scan.
Our synthetic fixture reproduced the collection part of this gap: after the delay, the newer collector returned no messages for the second request and proposed a scan position past it. The stored first request survived; the later, uncaptured one didn't qualify.
I'd usually separate capture from delivery so an unavailable receiver doesn't stop eligible messages being recorded locally. That requires a storage limit and an explicit response when the limit is reached. If capacity prevents capture, surface that condition and keep a recovery path to the unexamined source records. Silently skipping old requests makes an outage much harder to repair.
The current code has a cap of 20 pending batches and a branch that discards the oldest batch on overflow. We exercised that branch directly with 21 synthetic batches. It retained 20. Normal sequential execution stops collecting while pending delivery fails, so this test doesn't mean routine outages necessarily fill that queue. It does show why an overflow policy needs to be understood before anyone promises that every captured request will be retained.
Successful delivery can still happen twice
Now consider the opposite failure: the receiver accepts a batch, and the sender stops before saving the local acknowledgement.
On restart, the pending record is still there. Sending it again is a reasonable recovery choice, but the receiver may see the same message twice.
We simulated this by making the local save fail after receiver acceptance. On the next flush, our receiver stub accepted the same synthetic message ID again. This was a test of the retry function with a simulated receiver, not evidence that the live assistant executed a task twice.
Give the receiver a stable delivery identity. For example, a key might combine the source, account, conversation and message ID, provided those identifiers are stable in your source system. A uniqueness constraint can prevent a repeated delivery from creating another copy of the same inbox item.
Processing needs its own protection. An inbox row can be stored once while a worker still retries the action attached to it. External actions need an idempotent operation or a recoverable processing record appropriate to that action. Don't let a second copy of a message become a second refund, booking change or customer reply.
RabbitMQ's reliability guide discusses the same acknowledgement and redelivery problem. You can apply that reasoning to a local HTTP bridge without adopting a broker. What matters is agreeing exactly when the receiver takes responsibility and how it handles another copy.
In the newer forwarder, any 2xx response counts as a successful send. That only tells us what this sender accepts as acknowledgement. To call the delivery durable, we'd also need to verify what the receiver saves before returning that response. It still wouldn't mean the business request was finished.
Try reading the message during a failure
If you already have a chat assistant, this is a small test worth doing in an isolated test setup. Use a harmless synthetic request, make the receiver unavailable, and open the conversation before the next collection attempt. Then restore the receiver and follow the request all the way through.
I'd test these cases before adding more assistant features:
| Test | What you want to establish |
|---|---|
| Failed send, followed by the person reading the message | The captured payload remains available for retry |
| Restart with pending work on disk | The sender can recover it without another unread scan |
| Receiver unavailable longer than the collection window | New eligible requests remain recoverable |
| Receiver accepts, local acknowledgement save fails | Repeated delivery doesn't create duplicate work |
| Pending storage reaches capacity | An alert and a defined recovery path replace silent loss |
| Message forwarded, investigation still unresolved | The task stays open until the defined outcome is recorded |
Our six local checks covered the older read-status and age filters, persisted retry, the newer collection-window gap, repeated acceptance after an injected save failure, and the overflow branch. They didn't establish production reliability, end-to-end task completion, or behavior under simultaneous runs. The table is a broader acceptance checklist.
For a personal AI assistant at work, I'd make this behavior visible early: what was captured, what is waiting to be delivered, and what still needs attention. You can then decide which requests an agent should answer or act on with a clearer idea of what actually reached it.
Start with one synthetic message and a receiver that rejects it once. Read the conversation while it waits. If the request vanishes, you've found a useful fix to make before anyone has to depend on the assistant remembering it.
