Merge "ref/profiles/internal/rt: Ensure the agents client doesn't close before it should."