‘Project Hail Mary’s ending makes one big change from the book. Here’s why.

However, Project Hail Mary does make one addition in its final minutes that isn’t in the book.
The film ends very much like Weir’s novel, with biologist Ryland Grace (Ryan Gosling) living not on Earth, but on alien Rocky’s (voiced by puppeteer James Ortiz) home planet of Erid. He’s sent the Hail Mary‘s beetle probes back to Earth with instructions on how to breed the Astrophage-eating Taumoeba and save the sun. In the book, after Grace has spent years on Erid, we learn that the sun’s luminosity has been restored, meaning Grace’s research made it to Earth and humanity is saved.
However, we never actually see what that process looks like in Weir’s book. In fact, we never return to Earth, as we’re in Grace’s mind the whole time.
Stratt’s fate remains a mystery in the novel, although she believes that she’ll eventually wind up in prison due to the extreme actions she took to get the Hail Mary off the ground. (The Sahara Desert plan, for example, proves an environmentally destructive resource drain, although it gets the job done.) The film takes a more optimistic approach, showing that Stratt is still alive and has received the beetles. Now, she’s ready to start work on the next phase of Project Hail Mary.
“Quite honestly, I love writing Stratt,” screenwriter Drew Goddard told Mashable while discussing Stratt’s ending. “This movie is about three characters, really. It’s a triangle between three characters, and we need to give her her moment.”
Thus, Stratt’s epilogue was born, granting us a hopeful glimpse into humanity’s recovery effort.
Goddard continued: “That’s what great about movies. You can cut away, whereas the book stayed with Grace. Once I put [the scene] in, no one questioned it. I was really grateful that they let us do it, because I thought it was really important to see her.”