pub struct ExecOptions {
pub model: Option<String>,
pub sandbox: Option<SandboxMode>,
pub approval: Option<ApprovalPolicy>,
pub full_auto: bool,
pub profile: Option<String>,
pub config_overrides: Vec<(String, String)>,
pub working_dir: Option<PathBuf>,
pub ephemeral: bool,
pub output_schema: Option<String>,
pub images: Vec<PathBuf>,
pub env_vars: Vec<(String, String)>,
pub dangerously_bypass_sandbox: bool,
}Expand description
Options for codex exec.
These map onto codex CLI flags. Only fields that are set will produce
flags; None / empty-vec fields are omitted.
Fields§
§model: Option<String>Model to use (e.g. "o4-mini", "codex-mini").
sandbox: Option<SandboxMode>Sandbox mode controlling file system access.
approval: Option<ApprovalPolicy>Approval policy for tool execution.
full_auto: boolEnable fully autonomous mode (auto-approve everything).
profile: Option<String>Named profile to load.
config_overrides: Vec<(String, String)>Config key=value overrides (passed as -c key=value).
working_dir: Option<PathBuf>Working directory for the execution.
ephemeral: boolRun in ephemeral mode (no session persistence).
output_schema: Option<String>JSON schema for structured output validation.
images: Vec<PathBuf>Image file paths to include as context.
env_vars: Vec<(String, String)>Additional environment variables to set.
dangerously_bypass_sandbox: boolSkip all confirmation prompts and execute without sandboxing.
Maps to --dangerously-bypass-approvals-and-sandbox.
Implementations§
Source§impl ExecOptions
impl ExecOptions
Sourcepub fn to_cli_args(&self) -> Vec<String>
pub fn to_cli_args(&self) -> Vec<String>
Convert these options into CLI arguments for the codex binary.
This does not include exec or --json — those are added by
ReadOnlyTransport::spawn.
Trait Implementations§
Source§impl Clone for ExecOptions
impl Clone for ExecOptions
Source§fn clone(&self) -> ExecOptions
fn clone(&self) -> ExecOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more