From cbeb5c30574a414961c44df697453484a7d264dd Mon Sep 17 00:00:00 2001 From: Connor Christie Date: Tue, 22 Apr 2025 22:08:52 -0700 Subject: [PATCH] fix: remove unreachable "disableResponseStorage" logic flow introduced in #543 (#573) This PR cleans up unreachable code that was added as a result of https://github.com/openai/codex/pull/543. The code being removed is already being handled above: https://github.com/openai/codex/blob/23f0887df3323a2b2a5bd87780c8845776b56bba/codex-cli/src/utils/agent/agent-loop.ts#L535-L539 --- codex-cli/src/utils/agent/agent-loop.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/codex-cli/src/utils/agent/agent-loop.ts b/codex-cli/src/utils/agent/agent-loop.ts index 8d99e46c..aaca48f3 100644 --- a/codex-cli/src/utils/agent/agent-loop.ts +++ b/codex-cli/src/utils/agent/agent-loop.ts @@ -543,22 +543,6 @@ export class AgentLoop { ); } else { turnInput = [...abortOutputs, ...input].map(stripInternalFields); - - // When response storage is disabled we have to maintain our own - // running transcript so that the next request still contains the - // full conversational history. We skipped the transcript update in - // the branch above – ensure we do it here as well. - if (this.disableResponseStorage) { - const newUserItems: Array = input.filter((it) => { - if (it.type === "message" && it.role === "system") { - return false; - } else if (it.type === "reasoning") { - return false; - } - return true; - }); - this.transcript.push(...newUserItems.map(stripInternalFields)); - } } this.onLoading(true);