How agents detect file changes