Skip to content

codex exec --sandbox workspace-write panics in system-configuration / reqwest / opentelemetry-otlp before prompt execution #16908

@QuangThai

Description

@QuangThai

Title: codex exec --sandbox workspace-write panics in system-configuration / reqwest / opentelemetry-otlp before prompt execution

Summary

Running codex exec non-interactively with a writable sandbox crashes before the mission prompt can create any artifacts.

The repro command was:

codex exec --sandbox workspace-write \
  --output-last-message /Users/mac/Desktop/Workspace/personal/codexkit/.tmp/next16-supabase-mission-review/codex-mission-review.txt \
  '/prompts:mission integrate supabase with nextjs 16'

Instead of running the prompt to completion, the Codex CLI process panics in:

  • system-configuration
  • reqwest
  • opentelemetry-otlp

This happened before .missions/ or .beads/ could be created, so it blocks end-to-end prompt-path testing even though the repo-local mission runtime works when invoked directly.

Environment

  • Codex CLI: OpenAI Codex v0.118.0 (research preview)
  • OS: macOS (Apple Silicon)
  • Working repo: /Users/mac/Desktop/Workspace/personal/codexkit/.tmp/next16-supabase-mission-review
  • Sandbox mode: workspace-write
  • Approval mode: never

Reproduction

  1. Prepare a writable repo with a valid mission prompt setup.
  2. Run:
codex exec --sandbox workspace-write \
  --output-last-message /Users/mac/Desktop/Workspace/personal/codexkit/.tmp/next16-supabase-mission-review/codex-mission-review.txt \
  '/prompts:mission integrate supabase with nextjs 16'

Expected

  • codex exec starts normally
  • the mission prompt runs
  • if the prompt succeeds, it creates .missions/<id>/mission.json and .beads/artifacts/...
  • if the prompt fails logically, it should still return a normal model/tool failure rather than crash the runtime

Actual

The CLI panics with output including:

thread 'reqwest-internal-sync-runtime' ... panicked at ... system-configuration ...
Attempted to create a NULL object.

thread '<unnamed>' ... panicked at ... reqwest ...
event loop thread panicked

thread 'main' ... panicked at ... opentelemetry-otlp ...
called `Result::unwrap()` on an `Err` value: Any { .. }
Could not create otel exporter: panicked during initialization

The run then shows the standard Codex header, but no mission artifacts are created.

Artifact Check After Failure

After the crash:

  • .missions/ did not exist in the target repo
  • .beads/artifacts/ did not exist in the target repo
  • the requested output-last-message file was empty

Why this looks like a Codex CLI bug

  • The panic occurs inside Codex runtime initialization, not mission logic.
  • The repo-local deterministic mission runtime works when invoked directly via shell script.
  • The writable prompt-path test is blocked by the CLI process dying before prompt execution can finish.

Impact

This blocks validation of prompt-based end-to-end workflows that rely on codex exec --sandbox workspace-write, even when the underlying repo scripts and orchestration flow are healthy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingexecIssues related to the `codex exec` subcommandsandboxIssues related to permissions or sandboxing

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions