I created an agent to process all selected documents in a view, and sometimes when I trigger this agent just after having triggered it, it tries to process the same document that was processed before.
If you have the agent to run against selected documents it will do that - doesn’t matter if you’ve set them to processed, if they’re in the view and selected then it will perform the action against them
There’s also a possibility that even if they’re removed from the view they’re still selected (can’t remember the exact scenario).
At the very least do a workspace.refresh to update the view, you may also need to do a notesuiview.deselectall