At what point is context applied?

Simple question: If I add FileA for context, then I edit FileA, then submit my prompt, does the model receive the content of FileA before or after the edit? I would assume it acts like a pointer and sends the latest version on submit, but sometimes I get results that make it seem like that isn’t the case.

As a precaution I’ve been tediously removing and readding files if I edit them. Some clarification would be appreciated. Thank you.