Skip to main content

Crate kcode_k1_codex_websearch

Crate kcode_k1_codex_websearch 

Source
Expand description

§kcode-k1-codex-websearch

This Unix-only library runs one isolated, non-interactive Codex live-Web search. Runner::run accepts exact query bytes, a Codex model suffix, an effective reasoning effort, and the caller’s absolute monotonic deadline.

Before provider traffic, each call performs bounded codex --help and codex exec --help compatibility checks. It then starts codex exec directly, without a shell, in a fresh empty temporary directory. The invocation ignores user configuration and exec-policy rules, uses ambient Codex authentication, enables only live Web search through explicit strict configuration, uses a read-only sandbox with approval policy never, and adds no prompt text.

The query is written verbatim to stdin. JSONL and stderr are drained concurrently. Success requires exit status zero, turn.completed, and the exact text of the last completed agent_message. Unknown well-formed events and fields are tolerated. Fixed safe failures expose no inputs or subprocess data.

Every child is its own process-group leader. Deadline expiry, future cancellation, or owner teardown kills the group and reaps the direct child. There is no retry, fallback, cache, provider SDK, persistent session, streaming API, progress event, arbitrary input/output cap, or custom recovery.

Structs§

Request
Runner