Skip to content

v0.78.0 panics instead of graceful error when .codex/rules contains invalid Starlark #8803

@r-firpo

Description

@r-firpo

What version of Codex is running?

0.78.0

What subscription do you have?

max

Which model were you using?

No response

What platform is your computer?

No response

What issue are you seeing?

Description

Codex 0.78.0 crashes with a Rust panic when a project contains a .codex/rules file with invalid content (e.g., markdown instead of Starlark). Instead of a parse error, it panics in the system-configuration crate.

Repro

mkdir test-project && cd test-project
mkdir .codex
echo "# some markdown content" > .codex/rules
codex

Expected behavior

Error: Invalid Starlark syntax in .codex/rules at line 1

Or other helpful graceful handling

Actual behavior

thread 'main' panicked at system-configuration-0.6.1/src/dynamic_store.rs:154:1:
Attempted to create a NULL object.

And running codex crashes with no error messaging in the terminal

Analysis

  • 0.77.0: Works (likely doesn't read project-local .codex/ directories)
  • 0.78.0: Panics
  • Both versions bundle system-configuration-0.6.1

The new project-aware configuration feature in 0.78 appears to trigger sandbox/network initialization when processing .codex/rules, which hits a known upstream bug in the system-configuration crate when running under macOS Seatbelt.

Environment

  • macOS 26.2 (Darwin 25.2.0)
  • Apple Silicon (arm64)
  • codex-cli 0.78.0 via npm

Workaround

Remove or fix the invalid .codex/rules file, or downgrade to 0.77.0.

What steps can reproduce the bug?

  mkdir test-project && cd test-project
  mkdir .codex
  echo "# some markdown content" > .codex/rules
  codex

What is the expected behavior?

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingsandboxIssues related to permissions or sandboxing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions