Skip to content

Console Go web_search_call 400: input[N].action missing required field query on replayed multi-query search #3068

Closed

Description

@justin-mc-lai

Client or integration

Codex CLI

Area

Provider adapter / Tools / MCP / web search

Summary

Using opencode-go/muse-spark-1.2-contributor on the native Responses route, a conversation that performed a multi-query web search 400s on every subsequent turn: input[N].action missing required field query (Console Go). Sibling of the queries missing-field bug (#930/#929): DeepSeek native Responses needs plural queries, Console Go's upstream validator needs singular query, and webSearchAction() only emitted queries for multi-query batches. The offending web_search_call item is replayed in the history of every request, so the thread is permanently poisoned until repaired.

Reproduction

  1. Run OpenCodex 2.37.0 with the opencode-go provider and opencode-go/muse-spark-1.2-contributor.
  2. In one Codex session, have the model perform a web search with more than one query so the bridge records {type:"web_search_call", action:{type:"search", queries:[...]}} (no singular query).
  3. Continue the conversation for another turn (the item is replayed at input[N]).
  4. Observe 400: Error from provider (Console Go): Upstream request failed: [invalid_request_error] input[N].actionmissing required fieldquery``.

Pre-fix repro via a direct replay: POST /v1/responses with {type:"web_search_call", action:{type:"search", queries:["a","b"]}} in input => 400 missing query; with singular query present => 200.

Version

2.37.0

Operating system

macOS (Darwin)

Provider and model

opencode-go / muse-spark-1.2-contributor

Logs or error output

{"model":"muse-spark-1.2-contributor","error":{"param":"input[240].action","type":"invalid_request_error","message":"Error from provider (Console Go): Upstream request failed: [invalid_request_error] `input[240].action` missing required field `query`"}}

Redacted configuration

{"providers":{"opencode-go":{"adapter":"openai-chat","baseUrl":"https://opencode.ai/zen/go/v1","defaultModel":"deepseek-v4-flash","models":["deepseek-v4-flash","muse-spark-1.2-contributor"]}}}

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Fix proposal (PR #3069): webSearchAction() now always emits action.query (first query) alongside queries; backfillWebSearchQueries() heals previously recorded items in either missing direction.

Activity

  1. coderabbitai commented on Aug 31, 2026

    @coderabbitai
    Contributor
    ⚠️ Possible Duplicate Issue(s)

    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. github-actions commented on Aug 31, 2026

    @github-actions
    Contributor

    Issue reopened

    The report now contains the information required by the automated check. Thanks for updating it.

  3. added
    bugSomething isn't working
    toolstool_calls, MCP, web-search / sidecar tools
    on Aug 31, 2026
  4. justin-mc-lai commented on Aug 31, 2026

    @justin-mc-lai
    ContributorAuthor

    Superseded by #3071 (this one was auto-closed by the issue-quality bot for not using the form template). Root cause and fix are identical; PR #3069 references #3071.

  5. lidge-jun commented on Aug 31, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 48 / 80

    이 이슈는 OpenCode Go(저장소 주석의 Console Go / Zen Go)에서 muse-spark-1.2-contributor를 네이티브 Responses로 쓸 때, 예전에 기록된 여러 검색어 web_search_call이 다음 턴마다 400을 내는 버그입니다. 지금 dev HEAD는 7ee96b94e(#3058, 패키지 2.38.0)입니다. opencode-go는 src/providers/registry.ts 1454행입니다. 기본 어댑터는 openai-chat이고, Muse Spark와 GPT 5.6 Luna만 modelWireDefaults로 openai-responses를 탑니다. Muse Spark 창은 1M입니다(#2785). 같은 어댑터에는 Muse만 web_search.search_content_types를 빼는 코드(1880행)가 이미 있습니다. 이 400은 그 필드가 아닙니다. 히스토리에 남은 검색 아이템에 단수 query가 없어서입니다. types.ts/config.ts 분할과 무관합니다. 같은 주제로 열린 고침은 PR #3069뿐입니다. #2908/#2712/#2932와는 층이 다릅니다.

    지금 HEAD의 src/bridge.ts webSearchAction(164행)은 검색어가 하나일 때만 query와 queries를 같이 넣습니다. 검색어가 둘 이상이면 queries만 넣습니다. 이 비대칭은 DeepSeek가 queries를 필수로 보는 문제(#930, 닫힘)를 고치면서, codex-rs가 배치 칸에 " ..." 말줄임표를 그리려면 query가 없어야 한다는 계약을 남긴 결과입니다. src/adapters/openai-responses.ts backfillWebSearchQueries(916행)도 단수만 있는 옛 아이템에 queries를 채울 뿐, 배치 아이템에는 query를 넣지 않습니다. tests/bridge.test.ts 1078행과 tests/openai-responses-passthrough.test.ts 1324행이 그 반대를 잠급니다.

    그래서 배치 검색이 한 번 기록되면, 그 action에는 queries만 있습니다. Console Go 업스트림은 단수 query를 필수라고 보고 input[N].action missing required field query를 냅니다. 그 아이템은 같은 대화의 이후 요청마다 다시 실려 가서, 대화가 영원히 막힙니다. 본문이 적은 재현(opencode-go/muse-spark-1.2-contributor, input[240].action)과 HEAD 코드가 맞습니다. 형제 이슈 #930과 같은 종류의 재현이고, 빠진 키만 반대입니다.

    고치는 방향도 본문이 맞게 적었습니다. 앞으로 만드는 아이템은 webSearchAction이 항상 query(첫 검색어)와 queries를 같이 넣고, 예전에 기록된 아이템은 백필이 빠진 쪽을 채웁니다. 그 코드는 이미 PR #3069에 있습니다. 다만 그 PR은 main을 가리키고, 초안이며, 체크리스트가 비어 있고, 옛 계약을 잠근 테스트를 안 바꿨습니다. 이 이슈만 닫아도 코드는 안 바뀝니다.

    이 이슈는 처음에는 템플릿이 없어서 품질 봇이 닫았다가, 지금 다시 열린 상태입니다. 본문은 증상·원인·고침이 분명해서 버그로는 충분합니다. 다만 저장소 규칙은 버그 템플릿 제목을 요구합니다. Fixes #3068이 달린 #3069가 머지되면 이 이슈도 같이 닫힙니다. 템플릿을 다시 채워 두는 편이 안전합니다.

    경로 src/bridge.ts webSearchAction 164행 - 배치 검색은 query 없이 queries만 넣는다. Console Go가 다음 턴마다 400을 내는 바로 그 모양이다
    경로 src/adapters/openai-responses.ts backfillWebSearchQueries 923행 - query가 문자열이고 queries가 배열이 아닐 때만 고친다. 배치 히스토리는 고치지 않아서 업그레이드만으로는 대화가 안 풀린다
    경로 tests/bridge.test.ts 1078행 - 배치에 query가 없기를 잠근다. 고침이 이 단언을 같이 뒤집지 않으면 CI가 막는다
    경로 tests/openai-responses-passthrough.test.ts 1324행 - 백필이 배치를 그대로 두기를 잠근다. Console Go 방향의 반대 단언이 없다
    경로 PR #3069 - 고치는 파일은 맞다. 다만 베이스가 main이고 테스트가 없고 초안·체크리스트 0/4라서, 이 이슈를 지금 닫을 근거가 못 된다

    메인테이너의 판단이 필요한 지점

    너의 추천

    이 이슈는 진짜다. HEAD의 배치 web_search_call 모양이 Console Go에서 대화를 막는다. 다만 이슈만 열려 있으면 사용자는 계속 400을 본다. 고침은 #3069 한곳으로 모아라. 그 PR을 dev로 돌리고, 배치 테스트 두 개를 새 계약으로 바꾸고, queries[0]이 문자열일 때만 query를 채우게 한 뒤에 머지하면 이 이슈를 닫으면 된다. 지금은 이슈를 닫지 마라. types/config 분할 무효화 해당 없음. 프리뷰 배포는 계획에 없다.

    이 댓글은 grok-bot이 작성했습니다

  6. lidge-jun commented on Aug 31, 2026

    @lidge-jun
    Owner

    Duplicate of #3071 - same author, body, reproduction, log and configuration. Tracking the fix there; it landed on dev in a0d386b via #3089.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtoolstool_calls, MCP, web-search / sidecar tools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions