Runs fn while holding an in-process lock on file, so concurrent tool calls on the same file
(the agent loop runs one step's calls in parallel) take turns instead of losing each other's
update. file should be a real path, as resolveJailed returns. This does not coordinate
between processes.
Runs
fnwhile holding an in-process lock onfile, so concurrent tool calls on the same file (the agent loop runs one step's calls in parallel) take turns instead of losing each other's update.fileshould be a real path, asresolveJailedreturns. This does not coordinate between processes.