Codex is not exactly a prologue to The Magicians, but a nicely constructed intellectual thriller that signals some of Lev Grossman's later work.
Again, the young male protagonist, Edward, is talented and smart, but not quite smart enough to achieve, or even know, exactly what he wants. Moreover, he is inevitably overshadowed, defeated even, by a more capable, or perhaps only more focused, woman, Margaret.
New York is again the setting, and again it is the city and the state's secret places, its libraries, that are the most interesting. Grossman is able to make the territory of the mind as engaging as the city streets - a hallmark of the intellectual thriller with a touch of metafictional conceit.
One thing that makes Codex particularly engaging is the way the story moves between the present-day narrative, the lost medieval codex of the title, and the open computer game-virtual world that reflects and in some ways binds them. All of these imaginary worlds are compelling, though for different reasons, and this is where the ability to create other worlds in books and games is singularly intriguing and a binding theme. And yet, as in The Magicians, the ultimate dreamworld, once achieved, somehow fails to satisfy, leaving the protagonist chastened if not wiser.