Skip to content

fix(providers/openai): replay unreferenced web searches inline - #78

Open
mafredri wants to merge 12 commits into
coder_2_33from
mafredri/responses-web-search-unstored-replay
Open

mafredri wants to merge 12 commits into
coder_2_33from
mafredri/responses-web-search-unstored-replay

Conversation

@mafredri

@mafredri mafredri commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Relates to CODAGT-1482

toResponsesPrompt only replays a hosted web search as an item_reference, and only right after a reasoning item from a stored response. Every other search is dropped, and the model then says it made no tool calls. That covers every search with store: false, every search from an unstored response when a later request is stored (a chat switching model configs, or a zero data retention org), and stored searches with no reasoning before them.

We'll now send each search that doesn't get a reference inline, rebuilt from its tool result's WebSearchCallMetadata as {"type":"web_search_call","status":...,"action":{...}}. I've used the result rather than the call input because only the result keeps the status and the deprecated single query, and searches saved before #62 still have their action there. Only the action fields the API uses are copied; action.sources are left out because the API ignores them on input. A search whose metadata has no action, or an action type the API doesn't know, is skipped with a warning, since an unknown type gets a 400 for the whole request.

The item carries no id. With an id, a stored request resolves the item server side to the stored one and requires its reasoning item before it. Without one there is no lookup, so a credential or provider switch can't make it resolve another org's stored item (the concern #77 raises for references). #77 decides which searches get a reference; whatever it leaves unreferenced falls back to the inline item here, so the two compose and either can rebase over the other.

Evidence

Probes against the AI Gateway on gpt-6.1-sol, gpt-5-mini and gpt-4.1-mini, asking on turn 2 what the model did before its previous answer:

  • Inline item without id, store: false: 200 every time, and the model listed the exact action in 9/9 runs across search, open_page, find_in_page and multi-search shapes.
  • Turn 1 with store: false, turn 2 with store: true (gpt-6.1-sol and gpt-5-mini, search and open_page): inline items without id, alone or after the encrypted reasoning item, returned 200 and the model listed the exact action in 12/12 runs. An item_reference to the same search returned 404 "Item … not found".
  • Turn 1 and turn 2 with store: true (gpt-5-mini and gpt-6.1-sol): a stored reasoning item, sent encrypted with its id or as an item_reference, followed by an inline item without id returned 200 in 6/6 runs, and the model listed the exact action.
  • Dropping the search (today's behaviour): the model said it made no tool calls in nearly every run.
  • item_reference with store: false: 404 on all three models.
  • On a real gpt-6.1-sol transcript the inline item costs 66 input tokens (13532 vs 13466) and recalled 3/3 against 0/3.
  • status values failed, in_progress, searching and a missing status are accepted, as are pre-feat: tag web search sources with the search that found them #62 shapes such as {"type":"find_in_page"} with no url.

The model gets the action, not the pages it read: asked about uncited pages from the search, no inline run answered correctly. Zero data retention orgs weren't probed, since the gateway's org isn't one.

Validation

  • go test ./... -count=1, go vet ./..., gofmt -l . and golangci-lint v2.15.0 pass. gofumpt only flags two existing blank lines in openai_test.go, which this PR doesn't touch.
  • Table tests assert the exact input JSON for each action shape, a failed search, [ws, rs, ws] with encrypted reasoning both unstored and stored (the first search inline, the second referenced), a stored request replaying an unstored response (both inline), a result placed before its call (sent once, inline), a search after a computer call or a skipped part (inline), repeated parts and a call and result in different messages (sent once), a search-only message, pre-feat: tag web search sources with the search that found them #62 search and find_in_page metadata, and skipped cases with their warning.
  • Live two-turn runs through agent.Stream and agent.Generate, with the turn 1 messages round-tripped through JSON: with store: false on both turns (gpt-5-mini), and with store: false then store: true (gpt-5-mini and gpt-6.1-sol). Turn 2 carried every search inline with no id, and the model listed each action with its inputs.

🤖 This PR was created with the help of Coder Agents, and will be reviewed by a human. 🏂🏻

With store false a hosted web search was dropped from later turns:
item_reference returns 404 when nothing is stored, so the builder sent
nothing and the model denied having searched.

Rebuild the search from its result metadata as an inline web_search_call
without an id. Without an id the API does no lookup, so the item cannot
resolve to a stored item of another credential. The store true path is
unchanged.
@linear-code

linear-code Bot commented Oct 27, 2026

Copy link
Copy Markdown

CODAGT-1482

@mafredri

This comment has been minimized.

@coder-agents-review

coder-agents-review Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Chat: Review posted | View chat
Requested: 2026-10-27 19:29 UTC by @mafredri

Review history
  • R1 (2026-10-27): 9 reviewers, 3 Nit, 1 P1, 1 P2, 3 P3, 3 P4, REQUEST_CHANGES. Review
  • R2 (2026-10-27): 9 reviewers, 3 Nit, 1 P1, 1 P2, 3 P3, 4 P4, COMMENT. Review
  • R3 (2026-10-27): 6 reviewers, 4 Nit, 1 P1, 1 P2, 3 P3, 5 P4, COMMENT. Review
  • R4 (2026-10-27): 10 reviewers, 5 Nit, 1 P1, 1 P2, 4 P3, 7 P4, COMMENT. Review
  • R5 (2026-10-27): 9 reviewers, 5 Nit, 1 P1, 1 P2, 5 P3, 10 P4, COMMENT. Review
  • R6 (2026-10-27): 10 reviewers, 6 Nit, 1 P1, 1 P2, 5 P3, 11 P4, COMMENT. Review
  • R7 (2026-10-27): 5 reviewers, 6 Nit, 1 P1, 1 P2, 5 P3, 11 P4, COMMENT. Review
  • R8 (2026-10-27): 4 reviewers, 6 Nit, 1 P1, 1 P2, 5 P3, 11 P4, APPROVE. Review

deep-review v0.13.0 | Round 8 | 2e8e2cb..e782df2

Last posted: Round 8, 24 findings (1 P1, 1 P2, 5 P3, 11 P4, 6 Nit), APPROVE. Review

Finding inventory

Findings

# Sev Status Location Summary Round Reviewer Posted
CRF-1 P4 Author fixed (8c455dd) responses_language_model.go:955 Unreachable json.Marshal error branch silently drops the search R1 Netero Yes
CRF-2 P4 Author fixed (8c455dd) responses_language_model.go:933 Local action struct duplicates WebSearchAction minus Sources R1 Netero Yes
CRF-3 Note Note (body) responses_language_model.go:702 Non-provider-executed tool result skip in assistant message has no test R1 Netero No
CRF-4 P1 Author contested; panel closed R2 (2/2 accept) responses_language_model.go:929 Pre-#62 find_in_page metadata replays without required url and pattern R1 Gon P1, Bisky P2 Yes
CRF-5 P2 Author fixed (37e7dd2) responses_language_model.go:698 store gate drops searches the tool call branch did not reference R1 Ryosuke P2, Melody P2, Mafuuu P3, Pariston OOS Yes
CRF-6 P3 Author fixed (8c455dd) responses_language_model.go:697 Comment claims stored searches always replay as item references R1 Gon, Mafuuu Yes
CRF-7 P3 Author contested; panel closed R2 (2/2 accept) responses_language_model.go:706 Inline web_search_call now sent to Azure and openaicompat Responses backends without a probe R1 Chopper P3, Pariston Note Yes
CRF-8 P3 Author fixed (8c455dd) responses_language_model.go:706 Skipped searches produce no CallWarning R1 Leorio P3, Chopper P4 Yes
CRF-9 P4 Author fixed (8c455dd) responses_language_model.go:921 Doc comment does not say how a stored item with the id can exist on the unstored path R1 Leorio Yes
CRF-10 Nit Author fixed (8c455dd) responses_options.go:468 WebSearchCallMetadata doc comment describes only item_reference replay R1 Mafuuu Yes
CRF-11 Nit Author fixed (8c455dd) responses_language_model.go:741 Edited comment ends with "; skip", restating the continue R1 Gon P2 Yes
CRF-12 Nit Author fixed (8c455dd) responses_web_search_test.go:557 Case name UnstoredBeforeSearchActions does not name the pre-#62 input R1 Gon, Leorio Yes
CRF-13 P4 Author fixed (a410684) responses_language_model.go:713 Warning text is the same for nil action and unknown action type, and omits the type R2 Chopper, Leorio Yes
CRF-14 Note Note (body) responses_language_model.go:944 WebSearchAction is now both the persisted format and the wire format R2 Ryosuke No
CRF-15 OOS Out of scope (body) responses_language_model.go:684 toResponsesPrompt replays openai-keyed metadata without checking which backend produced it R2 Chopper No
CRF-16 P4 Author contested; panel closed R4 (1/1 accept) responses_language_model.go:1069 hasVisibleResponsesAssistantContent is a hand-kept item-type list equal to len(input) > startIdx R3 Meruem Yes
CRF-17 Nit Author fixed (a52f08e) responses_language_model.go:935 Error string "it has no action" depends on the caller's format string for its referent R3 Leorio Yes
CRF-18 P4 Author fixed (67300d9) responses_language_model.go:700 Reference-or-inline choice depends on the call part preceding the result part R4 Meruem Yes
CRF-19 P4 Author fixed (67300d9) openai_test.go:4929 Unchanged tests and comment still say unstored web searches are skipped R4 Bisky Yes
CRF-20 P3 Author fixed (67300d9) responses_language_model.go:929 No-id doc comment omits the stored-request failure an id causes R4 Gon P3, Leorio P4 Yes
CRF-21 Nit Author fixed (67300d9) responses_web_search_test.go:22 wantReplay name and comment tie the inline item to store false R4 Mafuuu, Gon Yes
CRF-22 OOS Out of scope (body) coderd/x/chatd/chatprompt/chatprompt.go:1020 (coder/coder) injectMissingToolUses drops provider-executed results persisted in a later tool-role message R4 Pariston No
CRF-23 OOS Out of scope (body) responses_language_model.go:750 Tool-role branch silently skips provider-executed results placed in a tool message R4 Gon No
CRF-24 P3 Author fixed (9bd1001) responses_language_model.go:718 Inline search does not clear canReferenceWebSearch, so a following search is referenced past it and validation errors R5 Netero, Meruem, Bisky Yes
CRF-25 P4 Author fixed (9bd1001) responses_language_model.go:614 referencedSearches and inlinedSearches split one "already sent" fact; a repeated part is sent twice R5 Meruem, Zoro Yes
CRF-26 P4 Author fixed (9bd1001) responses_language_model.go:614 Per-message search maps send a search twice when call and result are in different assistant messages R5 Ryosuke Yes
CRF-27 P4 Author contested; panel closed R6 (1/1 accept) responses_web_search_test.go:577 StoredResultBeforeCall pins stored reasoning followed by an id-less inline search, a shape no probe sent R5 Mafuuu Note Yes
CRF-28 OOS Author fixed (9bd1001) responses_language_model.go:660 Computer call branch does not clear canReferenceWebSearch, so a following search reference fails validation R5 Meruem, Bisky, Melody, Ryosuke No
CRF-29 P4 Dropped by orchestrator (fantasy squash-merges; the PR description replaces commit text) 67300d9 commit body Commit body says the search was sent both ways; the prompt actually failed validation R5 Leorio No
CRF-30 Nit Dropped by orchestrator (fantasy squash-merges; the PR description replaces commit text) 67300d9 commit subject Commit subject uses inline and reference as verbs R5 Leorio No
CRF-31 P4 Author fixed (e782df2) responses_language_model.go:616 referenceAt comment leaves "referenceable" undefined and omits why adjacency counts parts, not input items R6 Gon P3, Leorio P4 Yes
CRF-32 Nit Author fixed (b4d4cde) responses_web_search_test.go:557 Test field later does not pair with content R6 Gon Yes

Contested and acknowledged

CRF-27 (P4, responses_web_search_test.go:577) - StoredResultBeforeCall pins an unprobed wire shape

  • Finding: The test pins a stored request with a stored reasoning item followed by an id-less inline search, which no probe had sent; the API might return the "reasoning item provided without its required following item" 400. Proposed a probe with turn 1 store: true.
  • Author defense: Probed turn 1 and turn 2 with store: true, stored reasoning sent encrypted with its id and as an item_reference, followed by an id-less web_search_call, on gpt-5-mini (search, open_page) and gpt-6.1-sol (search): 6/6 returned 200 and the model listed the action. Test kept; evidence added to the PR body.
  • Panel closure (R6, 1/1): Mafuuu, the agent that raised it (resumed via message_agent), accepted: the finding was the missing probe, and the probe of that exact shape returned 200 six times with the action recalled.

CRF-16 (P4, responses_language_model.go:1069) - hasVisibleResponsesAssistantContent hand-kept list

  • Finding: The helper lists every item type the assistant branch appends; every append produces one of them, so it equals len(input) > startIdx, and a future item type left off the list drops a message whose only content is that item. Proposed replacing the call with a length check and deleting the helper and truncation.
  • Author defense: The helper is upstream code. This PR only adds the one item type it now emits; replacing the helper with a length check is a refactor beyond this fix.
  • Panel closure (R4, 1/1): Meruem, the agent that raised it (resumed via message_agent), accepted. The added type is in the list and tested by UnstoredSearchOnly, the drop path warns, and keeping upstream code unchanged keeps the fork closer to upstream; the risk applies only to future edits.

CRF-4 (P1, responses_language_model.go:929) - Pre-#62 find_in_page replays without url and pattern

  • Finding: Pre-feat: tag web search sources with the search that found them #62 metadata saved only Type and Query, so a find_in_page search replays as {"type":"find_in_page"}; the SDK marks url and pattern required, so the API was inferred to reject the whole request. Proposed skipping find_in_page with empty URL or Pattern.
  • Author defense: A live store: false probe through the AI Gateway on gpt-5-mini returned 200 for {"type":"find_in_page"}, find_in_page with only url, and {"type":"open_page"} with no url. 8c455dd adds UnstoredPre62FindInPageWithoutStatus pinning the replayed shape.
  • Panel closure (R2, 2/2): Gon and Bisky, the agents that raised it (resumed via message_agent), accepted. The finding was an inference from the SDK api:"required" tags; the author's live probe is the empirical evidence it lacked. Consequence accepted: the model sees a bare find_in_page action with no page or pattern, which is more history than the pre-PR drop and does not fail the request. Reopen if a probe on another model rejects the bare shape.

CRF-5 (P2, responses_language_model.go:698) - store gate drops unreferenced searches

CRF-7 (P3, responses_language_model.go:706) - Inline web_search_call sent to non-OpenAI Responses backends

  • Finding: Azure and openaicompat with WithUseResponsesAPI reuse toResponsesPrompt and the openai metadata key, so a conversation moving there after an OpenAI hosted search now sends an inline web_search_call, unprobed on those backends. Proposed a probe against Azure Responses.
  • Author defense: Not reachable from chatd: stripForeignProviderStateRows (coderd/x/chatd/provider_switch_sanitize.go) removes provider-executed tool calls and results from rows made by a different provider instance. Author concedes other fantasy consumers could hit it and Azure or openaicompat were not probed.
  • Panel closure (R2, 2/2): Chopper and Pariston, the agents that raised it (resumed via message_agent), accepted. Pariston verified on coder/coder origin/main that stripForeignProviderStateRows (provider_switch_sanitize.go:128-190) strips provider-executed calls and results from rows whose AIProviderID differs and treats unknown origin as foreign. Chopper noted the unstored path already replays OpenAI encrypted_content reasoning to any backend (responsesReasoningInputItem), so the inline search adds an item of a kind already sent; Pariston noted store: true history already sent OpenAI item_reference ids. The shared-converter gap is listed as out of scope (CRF-15).

Round log

Round 1

Netero first pass: 2 P4, 1 Note. No P0, panel proceeds.
Panel (round 1, full panel): ging-go, ryosuke, melody, pariston, mafuuu, bisky, gon, leorio, wildcard chopper. 1 P1, 1 P2, 3 P3, 1 P4, 3 Nit new. CRF-5 scope: Pariston listed it out of scope; kept in scope because the diff adds the if store gate at line 698. CRF-11 downgraded from Gon P2 to Nit: keep-argument is that the PR edits the line; downgrade because "; skip" predates the PR and has no behavior consequence. Reviewed against 2e8e2cb..006b727.

Round 2

Fix round (no new files created; responses_options.go joined the diff only for the CRF-10 doc comment fix). Churn guard PROCEED: 8 addressed, 2 contested, 1 deferred. Netero: no new findings, CRF-1 and CRF-2 fixes verified. Panel: dispute check-in with gon, bisky (CRF-4) and chopper, pariston (CRF-7), all resumed agents from R1; leorio (doc comments and error message changed), ging-go, ryosuke, melody (files changed), wildcard kite. CRF-4 closed 2/2, CRF-7 closed 2/2. New: 1 P4 (CRF-13), 1 Note (body), 1 out of scope. Reviewed against 2e8e2cb..8c455dd.

Round 3

Fix round: a410684 changes only unstoredWebSearchCallItem return type and warning text. Churn guard PROCEED: CRF-13 addressed. Netero: no new findings, CRF-13 fix verified. Panel: chopper, leorio (CRF-13 raisers; error message changed), ging-go, ryosuke (Go files), bisky (tests changed), wildcard meruem. New agents for all (no contested findings). CRF-13 verified by Chopper, Leorio, Bisky, Netero. New: 1 P4 (CRF-16), 1 Nit (CRF-17). CRF-16 scope: kept in scope because the PR edits line 1069 and the fix is local to that function. Unresolved Codex thread PRRT_kwDORWz1Os6wx77R repeats deferred CRF-5. Reviewed against 2e8e2cb..a410684.

Round 4

Restructure round: PR title and description changed goal from unstored to unreferenced searches; 37e7dd2 removes the store gate. Churn guard PROCEED: CRF-17 addressed, CRF-16 contested. CRF-5 status changed from Deferred to Author fixed (37e7dd2); verified by Meruem, Ryosuke, Melody, Pariston, Mafuuu, Bisky, Razor, Netero. a52f08e reverted the CRF-2 struct reuse in response to CRF-14; Netero and Ryosuke accept. Netero: no new findings. Full panel: ging-go, ryosuke, melody, pariston, mafuuu, bisky, gon, leorio, wildcard razor; meruem resumed for CRF-16 dispute (closed 1/1). New: 1 P3, 2 P4, 1 Nit, 2 out of scope. CRF-20 set at P3 (Gon P3, Leorio P4; higher wins, since 37e7dd2 sends the item on stored requests where an id fails). Reviewed against 2e8e2cb..50bf6c5.

Round 5

Fix round: 67300d9 only. Churn guard PROCEED: CRF-18 to CRF-21 addressed. Netero: CRF-24 (P3). Panel: meruem (CRF-18 raiser), bisky (tests changed), gon, leorio (comments and commit text), mafuuu (CRF-21 raiser), ging-go, ryosuke, melody (files changed), wildcard zoro. Workspace agent disconnected mid-round; meruem, bisky and melody were resumed with message_agent after reconnect and wrote their files. CRF-18 to CRF-21 verified. Meruem and Bisky converge with Netero on CRF-24 and propose a class fix (derive reference adjacency instead of manual flag resets), which also removes OOS CRF-28 and inlinedSearches. CRF-25 Meruem P4 and Zoro P4. CRF-27 raised from Mafuuu Note to P4: keep-argument for Note is that it asks only for a probe; raised because the test and the proposed CRF-24 fix both pin a wire shape that may get a 400. CRF-29 and CRF-30 dropped: keep-argument is that commit text is visible in PR history; dropped because base history (#62, #67, #72) shows squash merges, so the PR description replaces it. CRF-24 kept at P3 (three reviewers P3): keep-argument is that base accepted the prompt and 67300d9 errors on every later turn; downgrade argument is that only caller-built prompts reach it. Reviewed against 2e8e2cb..67300d9.

Round 6

Fix round: cb92642 and 9bd1001 (patches to the existing branches; no title change). Churn guard PROCEED: CRF-24, CRF-25, CRF-26 addressed, CRF-27 contested. Netero: no findings; mutation runs confirm the new tests. Panel: mafuuu resumed for CRF-27 (closed 1/1), meruem, bisky, zoro, ryosuke (raisers of the fixed findings), ging-go, melody (files changed), gon (comments added), leorio (new commit messages), wildcard kite. CRF-24, CRF-25, CRF-26 and out-of-scope CRF-28 verified fixed by Netero, Meruem, Bisky, Zoro, Ryosuke, Melody, Kite. New: 1 P4 (CRF-31), 1 Nit (CRF-32). CRF-31 merges Gon P3 and Leorio P4 on the same comment and is set at P4: keep-argument for P3 is that the panel itself proposed len(input) in round 5 and the reason lives only in a PR reply; downgraded because StoredSkippedPartBeforeCall fails on that change, so the regression cannot land silently. Reviewed against 2e8e2cb..9bd1001.

Round 7

Fix round: e06de3d (comment) and b4d4cde (test rename); no production logic changed. Churn guard PROCEED: CRF-31, CRF-32 addressed. Netero: no findings. Panel: gon, leorio (CRF-31/32 raisers; comment changed), ging-go (Go files), bisky (tests changed), wildcard kite. CRF-32 verified. CRF-31 partially fixed: Gon and Leorio both verify "referenceable" is now defined but the reason for counting parts (a reference after a part that appends nothing is unprobed) is still only in the review reply; re-raised on the existing thread, no new ID. Kite read it as fixed; Gon and Leorio raised it and cite the specific missing clause, so their evidence sets the floor. Reviewed against 2e8e2cb..b4d4cde.

Round 8

Fix round: e782df2 rewrites only the referenceAt comment. Churn guard PROCEED: CRF-31 addressed. Netero: no findings. Panel: gon, leorio (CRF-31 raisers; comment changed), ging-go (Go file), wildcard chopper. CRF-31 verified by Gon and Leorio: the new reason (a skipped part stands for another response item between the reasoning and the search) holds for content the converter produces. No open findings. Out-of-scope CRF-15, CRF-22, CRF-23 have author replies but no ticket; review body states a human decision is needed. Reviewed against 2e8e2cb..e782df2.

About deep-review

CRF = Coder Review Finding (P0-P4, Nit, Note)

Reviewer Focus
Bisky tests
Chopper ops/errors
Churn-guard change verification
Ging language modernization
Gon naming
Hisoka edge cases
Killua perf
Kite change integrity
Knov contracts
Knuckle SQL
Komugi flake/determinism
Kurapika security
Law decomposition
Leorio docs
Luffy product
Mafu-san process
Mafuuu contracts
Melody dispatch/pairing
Meruem structural
Nami frontend
Netero mechanical checks
Pariston premise testing
Pen-botter product gaps
Razor verification
Robin duplication
Ryosuke Go arch
Takumi concurrency
Zoro shape

🤖 Managed by Coder Agents.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T19:31:05.489400Z e782df2 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

This comment has been minimized.

coder-agents-review[bot]

This comment was marked as outdated.

Reuse WebSearchAction for the inline item so new action fields replay,
pass it to param.Override without an unreachable marshal error, and warn
when a search's metadata has no replayable action. Tighten the comments
and name the pre-#62 test cases by their shape.
@mafredri

This comment has been minimized.

@mafredri

This comment has been minimized.

@chatgpt-codex-connector

This comment has been minimized.

@mafredri

This comment has been minimized.

@mafredri
mafredri marked this pull request as ready for review October 27, 2026 15:55
coder-agents-review[bot]

This comment was marked as outdated.

The skip warning now says whether the search had no action or an action
type the API cannot take, and names that type.
@mafredri

This comment has been minimized.

@mafredri

This comment has been minimized.

chatgpt-codex-connector[bot]

This comment was marked as outdated.

mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The fake Responses server required a reasoning item before every
web_search_call. Live probes in coder/fantasy#78 show OpenAI accepts an
inline web_search_call without an id and no reasoning item, so only
searches with an id need one.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
coder/fantasy#78 resends an unstored web search as an inline
web_search_call without an id. That item carries no provider state, so
the stale-replay check now flags a web_search_call only when it has an
id, and the stateless case expects the inline item.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The head adds warnings for searches it drops and reuses
WebSearchAction for the inline item; the replayed items are the
same.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The fake Responses server required a reasoning item before every
web_search_call. Live probes in coder/fantasy#78 show OpenAI accepts an
inline web_search_call without an id and no reasoning item, so only
searches with an id need one.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
coder/fantasy#78 resends an unstored web search as an inline
web_search_call without an id. That item carries no provider state, so
the stale-replay check now flags a web_search_call only when it has an
id, and the stateless case expects the inline item.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The head adds warnings for searches it drops and reuses
WebSearchAction for the inline item; the replayed items are the
same.
@mafredri

This comment has been minimized.

@mafredri
mafredri force-pushed the mafredri/responses-web-search-unstored-replay branch from e7a80a4 to b4d4cde Compare October 27, 2026 18:46
@mafredri

This comment has been minimized.

mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The fake Responses server required a reasoning item before every
web_search_call. Live probes in coder/fantasy#78 show OpenAI accepts an
inline web_search_call without an id and no reasoning item, so only
searches with an id need one.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
coder/fantasy#78 resends an unstored web search as an inline
web_search_call without an id. That item carries no provider state, so
the stale-replay check now flags a web_search_call only when it has an
id, and the stateless case expects the inline item.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The head adds warnings for searches it drops and reuses
WebSearchAction for the inline item; the replayed items are the
same.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
coder/fantasy#78 now sends a search inline whenever it does not go back
as an item reference, not only when store is false. A stored turn after
an unstored one, and stored searches with no reasoning before them, now
keep their searches; the tests expect the inline item in those cases.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The head references a search only from the part right after its
reasoning and replays each search once, so a search is never sent both
inline and as a reference.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The head changes only comments and a test field name since 9bd1001.
coder-agents-review[bot]

This comment was marked as outdated.

@mafredri

This comment has been minimized.

@chatgpt-codex-connector

This comment has been minimized.

coder-agents-review[bot]

This comment was marked as outdated.

mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The fake Responses server required a reasoning item before every
web_search_call. Live probes in coder/fantasy#78 show OpenAI accepts an
inline web_search_call without an id and no reasoning item, so only
searches with an id need one.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
coder/fantasy#78 resends an unstored web search as an inline
web_search_call without an id. That item carries no provider state, so
the stale-replay check now flags a web_search_call only when it has an
id, and the stateless case expects the inline item.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The head adds warnings for searches it drops and reuses
WebSearchAction for the inline item; the replayed items are the
same.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
coder/fantasy#78 now sends a search inline whenever it does not go back
as an item reference, not only when store is false. A stored turn after
an unstored one, and stored searches with no reasoning before them, now
keep their searches; the tests expect the inline item in those cases.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The head references a search only from the part right after its
reasoning and replays each search once, so a search is never sent both
inline and as a reference.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The head changes only comments and a test field name since 9bd1001.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The fake Responses server required a reasoning item before every
web_search_call. Live probes in coder/fantasy#78 show OpenAI accepts an
inline web_search_call without an id and no reasoning item, so only
searches with an id need one.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
coder/fantasy#78 resends an unstored web search as an inline
web_search_call without an id. That item carries no provider state, so
the stale-replay check now flags a web_search_call only when it has an
id, and the stateless case expects the inline item.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The head adds warnings for searches it drops and reuses
WebSearchAction for the inline item; the replayed items are the
same.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
coder/fantasy#78 now sends a search inline whenever it does not go back
as an item reference, not only when store is false. A stored turn after
an unstored one, and stored searches with no reasoning before them, now
keep their searches; the tests expect the inline item in those cases.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The head references a search only from the part right after its
reasoning and replays each search once, so a search is never sent both
inline and as a reference.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
The head changes only comments and a test field name since 9bd1001.
mafredri added a commit to coder/coder that referenced this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant