the issue is tracking that the first step didnt contaminate the second step, i dont see how you can solve this in a non-probabilistic works 99% of the time way
I think what you're saying is agent can write to an intermediate file, then read from it, bypassing the taint-tracking system.
The fix is to make all IO tracked by the system -- if you read a file it has taints as part of the read, either from your previous write or configured somehow.