I tested by reloading to before the bug expressed itself, but the bug is retroactive and permanent, and cannot be avoided in my game.
This is how the bug came about:
- I had Nick Valentine as my current companion. I had previously completed all stages of "The Dig" except the final one in which I would speak to Hancock.
- After finishing a main quest mission, I stopped by the State House and completed the final stage by speaking to Hancock.
- After speaking to Hancock, I followed him with Nick out onto the balcony for his speech.
- After his speech, I spoke to him and proceeded to complete the recruitment.
- I sent Nick to Sanctuary Hills the first and second times I tested, and I sent him to County Crossing the third time. In all three cases, Nick permanently disappeared from the game, and cannot be recovered. He no longer spawns at any location, including his home. All items he was carrying disappeared as well.
I do not know what factors are at play. I assumed that a hidden population limit had broken him at Sanctuary Hills, where I had a large number of settlers and companions, but the bug occurred regardless of whether he was sent to that location.