`spacetime publish` panics in `system_configuration` when run from Codex tool context on macOS
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
- From Codex app tool context, run:
spacetime publish --project-path spacetimedb/ my-db-test
- 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_configurationwhen 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_
4 Comments
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.
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
uvdid.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.
I'm having the same issue with
codex-cli 0.101.0and 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
@Ashutosh0x did you publish the fix ?