Use worktree qualified paths in agent file context + some code cleanup (#27943)

Release Notes:

- N/A
b7b7f1ccddMichael Sloan committed on 4/2/2025, 6:00:32 PM· committed by GitHubparent142f991
2 files changedLine totals unavailable