pub struct ForkCommand { /* private fields */ }Expand description
Fork a previous interactive Codex session, creating a new branch of conversation.
Implementations§
Source§impl ForkCommand
impl ForkCommand
pub fn new() -> Self
Sourcepub fn session_id(self, id: impl Into<String>) -> Self
pub fn session_id(self, id: impl Into<String>) -> Self
Session ID (UUID) to fork.
Sourcepub fn prompt(self, prompt: impl Into<String>) -> Self
pub fn prompt(self, prompt: impl Into<String>) -> Self
Optional prompt to start the forked session with.
pub fn config(self, key_value: impl Into<String>) -> Self
pub fn enable(self, feature: impl Into<String>) -> Self
pub fn disable(self, feature: impl Into<String>) -> Self
pub fn image(self, path: impl Into<String>) -> Self
pub fn model(self, model: impl Into<String>) -> Self
pub fn oss(self) -> Self
pub fn local_provider(self, provider: impl Into<String>) -> Self
pub fn profile(self, profile: impl Into<String>) -> Self
pub fn sandbox(self, sandbox: SandboxMode) -> Self
pub fn approval_policy(self, policy: ApprovalPolicy) -> Self
Sourcepub fn full_auto(self) -> Self
pub fn full_auto(self) -> Self
Run in full-auto mode, emitted as --sandbox workspace-write.
codex fork rejects --full-auto outright in codex-cli 0.145.0
(“unexpected argument”), so this emits the replacement the CLI names
for the exec family. An explicit sandbox call is
more specific and wins over it.
Sourcepub fn approve_for_me(self) -> Self
pub fn approve_for_me(self) -> Self
Route approval requests through automatic review, using the
workspace-write sandbox (--approve-for-me).
Added in codex-cli 0.147.0. Older releases reject it as an unexpected
argument, so this is the one builder method with a floor above the
wrapper’s tested minimum. codex exec review and codex exec resume
do not accept it.
Sourcepub fn strict_config(self) -> Self
pub fn strict_config(self) -> Self
Error on unrecognized config keys (--strict-config).
Sourcepub fn no_alt_screen(self) -> Self
pub fn no_alt_screen(self) -> Self
Do not use the terminal alternate screen (--no-alt-screen).
Sourcepub fn remote(self, addr: impl Into<String>) -> Self
pub fn remote(self, addr: impl Into<String>) -> Self
Connect the TUI to a remote app server endpoint (--remote <ADDR>).
Sourcepub fn remote_auth_token_env(self, env_var: impl Into<String>) -> Self
pub fn remote_auth_token_env(self, env_var: impl Into<String>) -> Self
Env var holding the bearer token for the remote app server
(--remote-auth-token-env <ENV_VAR>).
pub fn cd(self, dir: impl Into<String>) -> Self
pub fn add_dir(self, dir: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for ForkCommand
impl Clone for ForkCommand
Source§fn clone(&self) -> ForkCommand
fn clone(&self) -> ForkCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CodexCommand for ForkCommand
impl CodexCommand for ForkCommand
Source§impl Dangerous for ForkCommand
impl Dangerous for ForkCommand
Source§fn bypass_approvals_and_sandbox(self, _allow: &DangerousClient) -> Result<Self>
fn bypass_approvals_and_sandbox(self, _allow: &DangerousClient) -> Result<Self>
--dangerously-bypass-approvals-and-sandbox). Read moreSource§fn bypass_hook_trust(self, _allow: &DangerousClient) -> Result<Self>
fn bypass_hook_trust(self, _allow: &DangerousClient) -> Result<Self>
--dangerously-bypass-hook-trust). Read more