Homebrew requires the XCode command-line tools to work. It never complains they are missing. But every time I do anything else that launches XCode, XCode itself asks me to install the command-line tools. I complained to Apple that once installed, they should be updated automatically when the rest of XCode is updated. Apple responded saying they do get included in the updates.
When I said, "Then why do I have to install them every time XCode launches?" there was no response.
The fact that homebrew builds and updates and installs always work suggests that they ARE installed. And this is confirmed by
WGroleau@MBP ~ % xcode-select --install xcode-select: error: command line tools are already installed, use "Software Update" to install updates
So why does XCode think they aren't, and how do I fix that?
Latest available non-beta versions of everything. Issue has been present for many versions (two years or more).
There is a related question, but nothing there really helps.