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:

23f0887df3/codex-cli/src/utils/agent/agent-loop.ts (L535-L539)
This commit is contained in:
Connor Christie
2025-04-22 22:08:52 -07:00
committed by GitHub
parent 4261973467
commit cbeb5c3057

View File

@@ -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<ResponseInputItem> = 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);