@devries-cameron20 / t3code Mirror · read-only / commits / f2d4df0367
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

fix(server): Codex web searches list the query once (#39585)

Co-authored-by: MarcoDotIO <20867620+MarcoDotIO@users.noreply.github.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>

tiliakoos committed Nov 20, 2026 at 09:33 UTC f2d4df0367451f1771e94619021dfbb9982b463f
2 files changed +10 -5
apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts
+9 -4
@@ -699,10 +699,15 @@ function toCodexUserInputAnswers(
699 }
700
701 function compactStrings(values: ReadonlyArray<string | null | undefined>): ReadonlyArray<string> {
702 - return values.flatMap((value) => {
703 - const trimmed = trimText(value);
704 - return trimmed === undefined ? [] : [trimmed];
705 - });
702 + // Codex derives the item's `query` from its action, so it often repeats an action value.
703 + return [
704 + ...new Set(
705 + values.flatMap((value) => {
706 + const trimmed = trimText(value);
707 + return trimmed === undefined ? [] : [trimmed];
708 + }),
709 + ),
710 + ];
711 }
712
713 function webSearchPatterns(item: CodexWebSearchItem): ReadonlyArray<string> {
apps/server/src/orchestration-v2/testkit/fixtures/web_search/codex_output.ts
+1 -1
@@ -37,5 +37,5 @@ export function assertWebSearchOutput(
37 const webSearchItems = projection.turnItems.filter((item) => item.type === "web_search");
38 assert.lengthOf(webSearchItems, 1);
39 assert.equal(webSearchItems[0]?.status, "completed");
40 - assert.include(webSearchItems[0]?.patterns ?? [], WEB_SEARCH_QUERY);
40 + assert.deepEqual(webSearchItems[0]?.patterns, [WEB_SEARCH_QUERY]);
41 }