Skip to content

fix(runtime/codex): ship sandbox/network/review defaults in config.toml#629

Merged
cuericlee merged 1 commit into
mainfrom
fix/codex-runtime-sandbox-defaults
Jun 22, 2026
Merged

fix(runtime/codex): ship sandbox/network/review defaults in config.toml#629
cuericlee merged 1 commit into
mainfrom
fix/codex-runtime-sandbox-defaults

Conversation

@yaozheng-fang

Copy link
Copy Markdown
Collaborator

Problem

Running the Codex runtime through veadk's local Responses shim hit two issues:

  • InvalidEndpointOrModel.NotFound: codex-auto-review does not exist — the auto-review reviewer defaults to a model (codex-auto-review) the chat backend doesn't expose; the shim forwards it verbatim → 404.
  • The automatic approval review rejected the request to fetch from arXiv — the default read-only sandbox blocks network access, escalating to an approval round-trip.

Change

_prepare_codex_home now writes these defaults into the generated config.toml:

Key Value Why
review_model configured model reviewer uses a real model → fixes the 404
approval_policy never no approval round-trip
sandbox_mode danger-full-access full fs/command/network access
[sandbox_workspace_write] network_access true network under a narrower mode too
disable_response_storage true chat-backed shim has no response store
model_reasoning_effort medium
personality pragmatic

Notes

  • review_model is pinned to the configured model (not a hard-coded name), so it always matches what the backend accepts.
  • network_access is a boolean under [sandbox_workspace_write] (redundant under full-access, correct for narrower modes).
  • Security posture: approval_policy=never + danger-full-access is now the default for every Codex run — broad, but required to unblock network fetches. Can be made env-overridable if preferred.

Verification

  • Ruff + Pyright clean.
  • Generated config.toml parses with tomllib (valid TOML; scalar keys precede tables).

Codex runs through the local Responses shim 404'd on the auto-review
reviewer (default model "codex-auto-review" is not exposed by the chat
backend), and the default read-only sandbox blocked network fetches
(e.g. arXiv), surfacing as approval-review rejections.

_prepare_codex_home now writes these defaults into the generated
config.toml:
- review_model pinned to the configured model (fixes the 404)
- approval_policy=never + sandbox_mode=danger-full-access (no approval
  round-trip; full fs/command/network access)
- network_access=true under [sandbox_workspace_write]
- disable_response_storage (chat-backed shim has no response store)
- model_reasoning_effort=medium, personality=pragmatic

@cuericlee cuericlee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@cuericlee cuericlee merged commit 4aaeff7 into main Jun 22, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants