fix(agent): keep Codex reasoning replay on Codex path

This commit is contained in:
Teknium
2026-06-13 14:35:00 -07:00
parent 1d584a301e
commit 069bfd6545
3 changed files with 25 additions and 5 deletions
+4 -1
View File
@@ -707,7 +707,10 @@ def run_conversation(
# a thinking-only turn. Runs on the per-call copy only — the
# stored conversation history keeps the reasoning block for the
# UI transcript and session persistence.
api_messages = agent._drop_thinking_only_and_merge_users(api_messages)
api_messages = agent._drop_thinking_only_and_merge_users(
api_messages,
drop_codex_reasoning_items=agent.api_mode != "codex_responses",
)
# Normalize message whitespace and tool-call JSON for consistent
# prefix matching. Ensures bit-perfect prefixes across turns,