More than short iterations, you need a hierarchical approach. First prompt, you have it plan out the overarching plot of the overall book. Then with the next call, a highly detailed flesh out all of the characters, motivations, interactions with others, locations, etc - really nail down those who are going to be driving the plot. Then with all that in context, plot out individual chapters. Then, if the chapters are short, write them one at a time (or even part of a chapter at a time). You can even have a skeleton structured with TODOs and let an agentic framework decide what part it wants to work on or rework at any given point.
I've never tried it for storywriting, but I imagine something like Cursor or Claude Code, or maybe something like OpenClaw, would do a good job.
Last time I tried out a storywriting task was after Gemini 3 came out; I had it do a story in the style of Paul Auster. It was a great read. The main character, Elias Thorne, works alone at the Center for Urban Ephemera, an esoteric job digging into stories behind "found art" in the city. When the center gets a donation of the papers of a recluse with cryptic poetry, Elias visits his home, only to find a woman claiming to be his wife and calling him "Leo", so happy that he "returned". All around the house are pictures of him, a whole history that he has no memory of having lived, and she won't be dissuaded. His curiosity leads to him playing along, and he starts living there more and more to investigate this Leo, who he find is a writer obsessed with the concepts of dopplegangers, disappearances, and the ability to rewrite the real world if you have a sufficiently captivating story. Bit by bit he finds that Leo had spent months "casting" his replacement, hunting for a similar-looking man with tenuous ties to anyone or anything - ultimately, finding Elias working in a municipal records office - and steadily sculpted his life from the shadows to isolate him and control his narrative, including creating the fictional "Center for Urban Ephemera" and hiring him (In Leo's typewriter is the first paragraph of the story you're reading). As he digs, Elias is progressively distanced from his old life, which starts to feel alien, and ends up settling into Leo's "story" written for him, and ultimately, continuing to write it.