Skip to content

spacetime publish panics in system_configuration when run from Codex tool context on macOS #10482

Closed

Description

@coldpeteza

What version of Codex is running?

Version 260202.0859 (517)

What subscription do you have?

free

Which model were you using?

got-5.2-codex medium

What platform is your computer?

Darwin 25.2.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

No response

What issue are you seeing?

Title
spacetime publish panics in system_configuration when run from Codex tool context on macOS

Summary
Running spacetime publish from the Codex app tool context on macOS panics with Attempted to create a NULL object in system_configuration::dynamic_store::SCDynamicStoreBuilder::build, while the same command works fine in a regular terminal.

Environment

  • OS: macOS
  • Command context: Codex app tool execution
  • Working directory: /Users/pziersch/code/spacetimedb-connector/my-spacetime-app
  • SpacetimeDB CLI: installed locally (same binary used successfully in normal terminal)

Repro Steps

  1. From Codex app tool context, run:
    spacetime publish --project-path spacetimedb/ my-db-test
  2. Observe panic.

Expected
Module publishes successfully (same as running in a normal terminal).

Actual
Panic with Attempted to create a NULL object.

Backtrace (top)

system_configuration::dynamic_store::SCDynamicStoreBuilder<T>::build
hyper_util::client::proxy::matcher::mac::with_system
reqwest::async_impl::client::ClientBuilder::build
spacetimedb_cli::subcommands::publish::exec
spacetimedb_cli::main

Notes

  • Clearing proxy env vars (HTTP_PROXY, HTTPS_PROXY, NO_PROXY) did not help.
  • Full backtrace available (included below if needed).
  • Suggest investigating environment/entitlements differences or proxy detection in reqwest/system_configuration when run from tool context.

What steps can reproduce the bug?

Running spacetime publish from the Codex app tool context on macOS panics with Attempted to create a NULL object in system_configuration::dynamic_store::SCDynamicStoreBuilder::build, while the same command works fine in a regular terminal.

What is the expected behavior?

Expected
Module publishes successfully (same as running in a normal terminal).

Actual
Panic with Attempted to create a NULL object.

Additional information

No response

Activity

  1. added
    bug
    on Feb 3, 2026
  2. added
    app
    tool-calls
    on Feb 3, 2026
  3. added
    sandbox
    and removed
    tool-calls
    on Feb 3, 2026
  4. etraut-openai commented on Feb 3, 2026

    @etraut-openai
    Contributor

    Codex isn't panicking, correct? If I understand you correctly, one of the tools that the agent is calling is panicking when it's run within the Codex sandbox. It's probably not correctly handling an error condition that arises from the sandbox policy. You will probably need to work with the maintainers of the tool to get that fixed.

  5. corrylc commented on Feb 3, 2026

    @corrylc

    This may be related to the panic seen in uv, as the library and error are pretty much identical.

    Which means spacetime may just need to update the system_configuration library, as uv did.

  6. Ashutosh0x commented on Feb 4, 2026

    @Ashutosh0x
    Contributor

    I've updated the Seatbelt policy to allow access to SystemConfiguration and mDNS services. This should fix the panic in spacetime publish and the DNS resolution errors. Give it a shot on the latest build.

  7. Hebilicious commented on Feb 13, 2026

    @Hebilicious

    I'm having the same issue with codex-cli 0.101.0 and the latest codex app as well, for similar binaries https://moonrepo.dev/moon and https://moonrepo.dev/proto (https://github.com/moonrepo).
    I've asked codex to debug and this is the output

    • Root cause confirmed: this is a sandbox/runtime issue on my side, not your local Moon install.
    
      What I verified:
    
      - Inside default Codex sandbox:
          - moon query projects panics with system-configuration... Attempted to create a NULL object.
          - scutil --dns returns No DNS configuration available.
      - Outside sandbox (escalated run):
          - moon query projects works and lists all projects correctly.
          - scutil --dns returns normal resolver entries.
    
      Conclusion:
    
      - The Codex sandbox environment doesn’t expose macOS SystemConfiguration data (DNS/proxy store).
      - Moon/proto command paths that initialize HTTP/proxy detection hit that missing API and panic.
      - This is environment-specific to my restricted execution context.
    

    @Ashutosh0x did you publish the fix ?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugsandbox

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions