Repository navigation
Fix Codex hosted-search history imitation - #1005
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and expected behavior
Codex sometimes emitted
Hosted web search history ...as assistant text instead of making a hosted search. The uncommitted search-history replay draft supplied the model with synthetic assistant messages in exactly that format. An affected session contained both genuine hosted search events and fabricated assistant-text lookalikes. Search cards should remain visible without teaching the model to imitate them.Changes
web_searchis available directly, not via MCP discovery, and not to simulate a search in prose.Verification
REDISMS_DISABLE_POSTINSTALL=1 bun install --frozen-lockfile— passed; patch reapplies.bun scripts/test-isolated.ts packages/cli/src/patches.test.ts— 56 passed, 0 failed.bun scripts/test-isolated.ts packages/cli/src/extensions/openai-codex-web-search.test.ts— 5 passed, 0 failed.bun run lint,bun run typecheck,bun run build,bun run build:docs— passed.bun run testwith an ephemeralredis-memory-serverandPIZZAPI_REDIS_URL— exit 0; existing environment-specific skips remain.Risks and compatibility
No wire/schema or storage migration. Existing fake lines remain visible in historical transcripts, but are excluded from future model requests after a worker loads this patch. Native search events continue rendering as UI cards. This branch is not deployed; running workers keep their current code until updated/restarted. Cross-model requests no longer inherit search-card source URLs unless they are in ordinary assistant answer text.
UI evidence
N/A — no UI code changed; the existing search cards retain their metadata.
Contribution checklist