Alex, without realizing himself, was turning back to his former self.
He wasn't aware of it, but the connection he had with the AI was nourishing his body—internally and physically.
From the moment Alex had been connected to the AI, even before the apocalypse started, he had been provided with nourishment.
The golden line that Alex saw inside his body was a mass of energy that was connected to the AI, making it possible for his body to gain something extra, something that was not in his body.
If the magical element of the world, along with the power the humans had, were to suddenly vanish, Alex would find out that his body, which was already strong before, was better than before.
That same nourishment was healing his mentality as well—it was healing the wound he got from the betrayal.