Skip to content

fix(codex): report hosted search timeouts accurately - #115837

Merged
steipete merged 1 commit into
mainfrom
codex/fix-codex-search-timeout
Jul 29, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-codex-search-timeout

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Closes #115439

What Problem This Solves

Fixes an issue where Codex hosted web_search requests that reached their configured/default bound were reported as generic caller aborts. Slow-but-valid searches therefore looked unsupported instead of timing out at the operator-visible limit.

Why This Change Was Made

The bounded Codex turn now has one absolute-deadline timer instead of a second competing collector timer. That timer owns one per-turn TimeoutError, names the effective bound, and is the only reason identity allowed to classify the turn as timed out; caller cancellations retain the established generic aborted-turn error contract.

The upstream Codex contract was checked at openai/codex commit d06c7ac055920c7cb140c25ebda3f3db20197b45, including codex-rs/app-server/README.md, codex-rs/app-server-protocol/src/protocol/common.rs, and codex-rs/app-server-protocol/src/protocol/v2/turn.rs: turn/interrupt cancels the active turn and completion is observed through the terminal turn event.

User Impact

Hosted searches now report errors such as codex app-server hosted search turn timed out after 30s, with name: "TimeoutError", while explicit caller cancellation remains distinguishable as turn aborted. Operators can raise tools.web.search.timeoutSeconds for slow searches without diagnosing a false unsupported-query failure.

AI-assisted: implemented and reviewed with Codex; the full owner path and upstream interrupt contract were inspected before landing.

Evidence

  • Before: focused regression failed with codex app-server hosted search turn aborted; 5 adjacent controls passed.
  • After: 42 focused tests passed across bounded turns, hosted search, settled finalization, and media consumers.
  • Live, isolated local state with the Molty OpenAI key: ASX latest market news succeeded with a 90s bound in 35.254s on gpt-5.6-sol, returning 4 search records; the same query with a 5s bound returned TimeoutError: codex app-server hosted search turn timed out after 5s.
  • Blacksmith Testbox changed gate: tbx_01kypnbd4nat781txkv890t0b6, Actions run https://github.com/openclaw/openclaw/actions/runs/30442258069 — exit 0. Portal cleanup sync timed out after the successful command; the one-shot lease had already stopped.
  • Final Codex autoreview: clean, no accepted/actionable findings; confidence 0.96.

@steipete
steipete merged commit 7bc453f into main Jul 29, 2026
89 of 94 checks passed
@steipete
steipete deleted the codex/fix-codex-search-timeout branch July 29, 2026 10:21
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

pull Bot pushed a commit to yann0001/openclaw that referenced this pull request Jul 29, 2026
* origin/main:
  fix(codex): restore connected apps for token-authenticated runs (openclaw#115075)
  fix(codex): classify hosted search timeouts (openclaw#115837)
  fix(msteams): keep attachment replies in channel threads (openclaw#94348)
  fix(telegram): linkPreview:false is ignored on streamed replies (openclaw#114125)
  fix(protocol): make Swift model checks non-mutating (openclaw#115793)
  fix(searxng): avoid duplicating search endpoint (openclaw#113661)
  fix(agents): preserve tool-result middleware identity (openclaw#115821)
  refactor(meetings): consolidate runtime facades (openclaw#115819)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
* origin/main:
  fix(codex): restore connected apps for token-authenticated runs (openclaw#115075)
  fix(codex): classify hosted search timeouts (openclaw#115837)
  fix(msteams): keep attachment replies in channel threads (openclaw#94348)
  fix(telegram): linkPreview:false is ignored on streamed replies (openclaw#114125)
  fix(protocol): make Swift model checks non-mutating (openclaw#115793)
  fix(searxng): avoid duplicating search endpoint (openclaw#113661)
  fix(agents): preserve tool-result middleware identity (openclaw#115821)
  refactor(meetings): consolidate runtime facades (openclaw#115819)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hosted Codex web_search cancels at default 30s bound and misreports the timeout as "turn aborted"

1 participant