From 905b7555c2090df70875101cc069097be3d984af Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Mon, 27 Apr 2026 19:39:37 -0300 Subject: [PATCH] fix(codex): prevent unexpected protocol leakage and fabricated instructions on bare chat completion requests without tools (#1686) --- open-sse/executors/codex.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/open-sse/executors/codex.ts b/open-sse/executors/codex.ts index 67793ffac0..ff9bd55489 100644 --- a/open-sse/executors/codex.ts +++ b/open-sse/executors/codex.ts @@ -1002,9 +1002,11 @@ export class CodexExecutor extends BaseExecutor { !body.instructions || (typeof body.instructions === "string" && body.instructions.trim() === "") ) { - body.instructions = hasTools - ? CODEX_DEFAULT_INSTRUCTIONS - : "You are a helpful AI assistant."; + if (hasTools) { + body.instructions = CODEX_DEFAULT_INSTRUCTIONS; + } else { + delete body.instructions; + } } }