Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/core/src/pipeline/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2051,6 +2051,13 @@ ${matrix}`,
postWriteWarnings: [],
hookHealthIssues: output.hookHealthIssues,
tokenUsage: output.tokenUsage,
// Preserve runtime state artifacts from the original write output if the
// chapter analyzer did not produce new ones. Without this, normalizing
// chapter content causes runtimeStateDelta to be dropped, which prevents
// saveRuntimeStateSnapshot from running and leaves chapter_summaries.json
// stale — causing the next chapter to repeat the same plot events.
runtimeStateDelta: analyzed.runtimeStateDelta ?? output.runtimeStateDelta,
runtimeStateSnapshot: analyzed.runtimeStateSnapshot ?? output.runtimeStateSnapshot,
};
}

Expand Down