Working directories and configuration
Control where Codex works and how the child CLI process is configured.
Codex runs in the current working directory by default. Set workingDirectory per thread when embedding it:
Use config for structured CLI configuration and configOverrides for raw TOML values. Raw overrides are applied after structured values and take precedence; SDK-managed settings and thread-specific options are applied afterward.
Use skipGitRepoCheck only when the host has deliberately chosen a non-repository working directory.
Updated Aug 31, 2026