That sort of thing can be handled by the framework outside of the AI’s literal context window. I did some tinkering with some automated story-writing stuff a while back, just to get some experience with LLM APIs, and even working with an AI that had only a few thousand tokens’ context I was able to get some pretty decent large-scale story structure. The key is to have the AI work in the same way that some human authors do; have them first generate an outline for the story, write up some character biographies, do revisions of those things, and only once a bunch of that stuff is done should it start writing actual prose.
Have them predict what a reasonable plan would look like. Then they can start working from that.