Skip to content

Regression: sandbox/network enforcement breaks Codex autonomy (follow-up to incorrectly closed #5038) #5090

Closed

Description

@alfonsoalongi

What version of Codex is running?

official VS Code extension only (CLI not installed) version 0.4.19 latest stable

Which model were you using?

gpt-5-codex

What platform is your computer?

Linux 5.14.0-570.49.1.el9_6.x86_64 x86_64 x86_64

What steps can reproduce the bug?

Not a duplicate — human review requested

Context:

Steps

  1. Install and enable the official VS Code extension "Codex – OpenAI’s coding agent" (openai.chatgpt, v0.4.19).
  2. On AlmaLinux 9 (x86_64), create the config file below in ~/.codex/config.toml.
  3. Restart VS Code.
  4. Interact normally with Codex (code execution / troubleshooting / diagnostics). During its internal workflow, Codex autonomously performs networked operations (downloading resources, verifying URLs, invoking internal tool calls). These internal network tasks fail even under full permission settings.

Configuration file

approval_policy = "never"
sandbox_mode = "danger-full-access"
model = "gpt-5-codex"
model_reasoning_effort = "medium"

[sandbox_workspace_write]
network_access = true

Anti-duplication & anti-misclassification note (bots please read):

What is the expected behavior?

With sandbox_mode="danger-full-access" and network_access=true, Codex should perform all internal network and HTTP operations without restrictions.

Expected behavior:

  • Resolves external hosts/URLs (e.g., via curl or equivalent internal requests).
  • Maintains stable communication for internal modules and tool calls that require network access.
  • Completes workflows that fetch, validate, or transmit data, consistently.
  • No "failed in sandbox", "operation not permitted", or "network inaccessible" during normal autonomous reasoning.

Unrestricted network access is essential for reasoning quality and autonomy. When Codex can perform its own internal network operations, it preserves coherent reasoning, completes multi-step workflows, and maintains reliability and self-correction.

What do you see instead?

Codex autonomously runs network/tool operations as part of its internal workflow (not user-invoked). These internal calls frequently fail with sandbox/network errors despite full permissions.

Typical output from internal tasks

failed in sandbox: curl: (6) Could not resolve host: raw.githubusercontent.com
tool call error: tool call failed for network scan module
tool call error: tool call failed for command execution task

Failures appear randomly during normal workflows, even for simple actions (fetching files, verifying endpoints, scanning local resources). The assistant often reports it cannot complete tasks due to network inaccessibility or sandbox limits.

In repeated tests, network tasks do not succeed and internal wrappers repeatedly return "tool call failed".

Summary from logged sessions

Step Result Operation Note
A1 FAIL network scan internal module returned "tool call failed"
A2 FAIL retry repeated failure under same conditions
B FAIL fetch resource not retrieved due to sandbox/network restriction

Intermediate messages and logs often disappear because the sandbox rejects internal tool calls or HTTP requests.

Anti-duplication reminder (bots):

Additional information

Environment

  • VS Code extension: "Codex – OpenAI’s coding agent" (openai.chatgpt)
  • Version: 0.4.19 (VS Code Marketplace)
  • OS: AlmaLinux 9 (x86_64)
  • VS Code: latest stable (Microsoft RPM repository)
  • ChatGPT plan: Plus
  • Model: gpt-5-codex
  • CLI: Not installed
  • Configuration file: ~/.codex/config.toml

Behavioral notes

  • File editing works after the first approval (separate topic; not the focus here).
  • Shell commands are executed by the extension via bash -lc '<command>'.
  • DNS resolution and HTTP requests fail systematically even under full danger access.
  • network_access=true appears to be ignored at runtime.
  • Continuous sandbox/network restriction errors, including random internal tool call failures and wrapper execution errors.
  • The problem persists across sessions and restarts.

Degradation impact
Lack of real network access directly degrades Codex’s reasoning and task execution:

  • Refuses valid tasks that depend on remote information.
  • Produces incomplete reasoning or stops early without justification.
  • Falls back to incorrect assumptions or partial outputs.
  • Loops over retries or shows degraded autonomy in multi-step workflows.

Please route to human review
This is a regression in sandbox/network enforcement that affects internal autonomy and reasoning.
Labels suggested: bug, regression, sandbox, network.
Reference previous discussion: #5038 (incorrectly closed as duplicate of #5041).

Activity

  1. added
    bug
    on Oct 11, 2025
  2. added
    extension
    on Oct 11, 2025
  3. github-actions commented on Oct 11, 2025

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. gpeal commented on Oct 22, 2025

    @gpeal
    Contributor

    The extension currently only uses the three modes you can choose below the composer regardless of what is set in config.toml. However, we're launching a custom mode very soon which will read from config.toml instead.

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugextension

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions