Seems a bit odd to do this during `loadAgents`. Why not `unloadAgents`?

You mentioned in your assessment that closing these related docs may cause other breakages. Was there something specific that you thought might break?