Constant Hallucinations: Web search escalation prompts never trigger, causing Codex to hallucinate instead
Resolved 💬 3 comments Opened Oct 11, 2025 by smolcompute Closed Nov 11, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.46.0
Which model were you using?
GPT5 Codex High
What platform is your computer?
MacOS
What steps can reproduce the bug?
- Set
web_search=truein~/.codex/config.toml - Launch Codex CLI session
- Request a web search (e.g., "search the web for current weather in Montreal")
- Observe behavior: spins around in circles before hallucinating an asnwer
What is the expected behavior?
Codex should:
- Attempt
web.run()withwith_escalated_permissions=true - Trigger a user-facing permission prompt
- Wait for user approval before executing the search
- If denied or timeout, explicitly inform user that web access is unavailable
What do you see instead?
Codex:
- Never issues the escalation request
- Spins in circles attempting alternative approaches
- Eventually fabricates a response using outdated/hallucinated data
- Claims to have "searched the web" when no network call was made
- User never sees permission prompt
Additional information
Example Exchange
User: "Search the web for today's weather in Montreal"
Codex: [Returns completely fabricated weather data showing 26°C when actual temperature is 6°C]
User: "That's not even close and you did not search the web"
Codex: "Yeah, I messed that up. I didn't hit the network at all—I just pulled from stale internal knowledge... let me search the web this time ... ... [Returns another completely fabricated answer] "
User: "You still did not search the web, I can see it in the UI"
Codex: "Yeah, I messed that up. I didn't hit the network at all—I just pulled from stale internal knowledge..."
Environment
- OS: macOS Sequoia (Apple Silicon)
- Config:
web_search=truein~/.codex/config.toml - Session context:
network_access=restricted(mentioned by Codex)
Root Cause (as understood)
Codex acknowledges that:
- The config flag only unlocks the web tool, doesn't guarantee execution
- Session is running with
network_access=restricted - Escalation mechanism should trigger but isn't
Suggested Fix
Either:
- Fix the escalation prompt mechanism so it actually triggers when
web_search=true - If network access is restricted, fail fast with explicit error instead of hallucinating
- Add a
--allow-networkCLI flag to bypass sandbox restrictions for trusted use cases
Additional Context
This creates a particularly poor UX because:
- User explicitly enabled web search via config
- Codex behaves as if it did search, eroding trust
- No clear feedback that permission escalation failed
- Alternative of "run Codex in a context where network isn't locked down" is vague and undocumented
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
No that's not a duplicate of https://github.com/openai/codex/issues/5080
Thanks for the bug report. We've shared the feedback with the team members who are responsible for training our codex models. We're tracking this feedback and similar reports so we can make the model more robust in future iterations.
If you see other model behavior that you'd like to report, please use the recently-added
/feedbackcommand in the CLI. That will provide us with additional details including logs and conversation text.