fix: preserve primary detail hash across frontmatter retries #443

Merged
xiaomo merged 1 commits from fix/439-detail-merge-and-acp into main 2026-05-23 14:14:53 +00:00

1 Commits

Author SHA1 Message Date
xiaoju 759c784267 fix: preserve primary detail hash across frontmatter retries
When the agent's first run output fails frontmatter extraction, the
retry loop (via options.continue) would replace agentResult entirely,
causing the 1-turn continuation detail to overwrite the original
multi-turn detail containing all tool-call history.

Now we capture primaryDetailHash from the first run and always use it
for the persisted StepNode, regardless of how many retries occur.

Fixes #439
2026-05-23 14:02:51 +00:00