Secret attempts for AGI have two problems that seems to get repeatedly ignored when this issue is discussed:
First, if there is a real danger that the first AGI is going to go foom and control everything, then having fewer people look at the code makes it more likely that something will go wrong.
FWIW, I discussed that a couple of months ago here.
Full transparency—with lots of people having access—is desirable from society’s point of view. Then, there are more eyes looking for flaws in the code—which makes is safer. Also, then, society can watch to ensure development is going along the right lines. This is likely to make the developers behave bettter, and having access to the code gives society the power to collectively protect itself aginst wrongdoers.
FWIW, I discussed that a couple of months ago here.