fix(codex): config via -c flags, drop baked config.toml + fix dead web_search key#250
Merged
Merged
Conversation
…d web_search key The codex agent baked a ~/.codex/config.toml at runtime that set web_search under [tools]. In codex 0.120 that key is silently ignored (verified: setting it false still leaves the tool registered), so search rode only on the default. Move all configuration onto the codex exec line as -c overrides and drop the config file entirely. web_search is now set via the top-level key codex actually honors, to "live" (fetch current pages, vs the stale "cached" index). view_image stays a real [tools] key. Signed-off-by: Elron Bandel <elron.bandel@ibm.com>
a0a7df8 to
60e225a
Compare
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.
What
The codex agent wrote a
~/.codex/config.tomlat container start. This drops that file and drives every setting as-coverrides on thecodex execline instead — one place for the agent's behaviour.It also fixes a latent bug: the config set
web_searchunder[tools], but codex 0.120 silently ignores that key — web search was only on because of codex's default. It's now set via the top-levelweb_searchkey codex actually honors, to"live"(fetch current pages, rather than the stale"cached"index).view_imagestays under[tools](a real key there).Why it's safe
Verified against real codex 0.120.0 by capturing the request it sends:
-c model_provider=...+ nested-c model_providers.*resolve the provider/model correctly (no config.toml present — codex only auto-creates its own trust file).-c web_search="live"registers theweb_searchtool;-c tools.view_image=trueregistersview_image.[tools].web_searchboolean is dead: setting itfalsestill left the tool registered, while top-levelweb_search="disabled"actually removed it.Caveat
This proves codex offers the search tool with the right config; it does not prove live search executes end-to-end through the eval-containers proxy (codex web search is a server-side tool on OpenAI's Responses API). That needs a live run to confirm — out of scope here.