fix(agents): pass replay transcript policy

Regeneration-Prompt: |
  After fixing the replay sanitizer helper itself, a follow-up review comment pointed out that runEmbeddedAttempt was still installing wrapStreamFnSanitizeMalformedToolCalls without the active transcriptPolicy. That meant the new Anthropic and Gemini replay recovery paths only ran in direct helper tests, not in the live embedded runner. Update the stream wrapper installation site to pass transcriptPolicy through unchanged so the already-tested replay cleanup, pairing repair, and turn revalidation logic actually executes in production replays. Keep the change scoped to the call site and verify the replay sanitizer test file still passes after the edit.
This commit is contained in:
Josh Lehman
2026-03-20 14:06:52 -07:00
parent d396d30e8e
commit 49e3139e7f

View File

@@ -2334,6 +2334,7 @@ export async function runEmbeddedAttempt(
activeSession.agent.streamFn = wrapStreamFnSanitizeMalformedToolCalls(
activeSession.agent.streamFn,
allowedToolNames,
transcriptPolicy,
);
activeSession.agent.streamFn = wrapStreamFnTrimToolCallNames(
activeSession.agent.streamFn,