agent2: Fix agent location still being present after thread stopped (#36471)

Release Notes:

- N/A
97a31c59c9Bennet Bo Fenner committed on 8/19/2025, 10:22:17 AM· committed by GitHubparent5df9c7c
2 files changedLine totals unavailable