pub struct CodexAgentConfig {Show 13 fields
pub command: PathBuf,
pub args: Vec<String>,
pub cwd: PathBuf,
pub auth_method_id: String,
pub authenticate: bool,
pub client_name: String,
pub client_version: String,
pub rpc_deadline: Duration,
pub max_line_bytes: usize,
pub max_output_queue: usize,
pub auto_allow_permissions: bool,
pub advertise_fs: bool,
pub raw_dump_path: Option<PathBuf>,
}Expand description
How to launch the ACP server process for Codex.
Fields§
§command: PathBufCommand to run (default: discover codex-acp, else npx).
args: Vec<String>Args after command (default: empty for codex-acp, or
["--yes","@agentclientprotocol/codex-acp"] for npx).
cwd: PathBufWorking directory for the process and default session cwd.
auth_method_id: StringAuth method id for ACP authenticate when authenticate is true.
codex-acp advertises ChatGPT login and API-key methods; default leaves
auth to existing codex login / OPENAI_API_KEY / CODEX_API_KEY.
authenticate: boolWhen true, send authenticate after initialize (may open a login flow).
client_name: StringClient name reported in initialize.
client_version: StringClient version reported in initialize.
rpc_deadline: DurationHandshake / RPC deadline.
max_line_bytes: usizeMax bytes per NDJSON line (fail-closed).
max_output_queue: usizeBounded output queue for dialect bytes (session/update lines).
auto_allow_permissions: boolAuto-answer session/request_permission with allow-once.
advertise_fs: boolWhen true, advertise client fs read/write capabilities.
raw_dump_path: Option<PathBuf>Optional path to append raw NDJSON lines (test diagnostics only).
Implementations§
Source§impl CodexAgentConfig
impl CodexAgentConfig
Sourcepub fn for_project(cwd: impl Into<PathBuf>) -> Self
pub fn for_project(cwd: impl Into<PathBuf>) -> Self
Config for a project directory.
Sourcepub fn with_raw_dump(self, path: impl Into<PathBuf>) -> Self
pub fn with_raw_dump(self, path: impl Into<PathBuf>) -> Self
Attach a raw NDJSON dump path.
Sourcepub fn with_codex_path_env_hint(self) -> Self
pub fn with_codex_path_env_hint(self) -> Self
Point at a specific Codex binary via CODEX_PATH for the adapter.
The ACP adapter reads CODEX_PATH from the process environment; this
only records intent for callers (env is set by the host before spawn).
Sourcepub fn with_global_codex_acp(self) -> Self
pub fn with_global_codex_acp(self) -> Self
Prefer a globally installed codex-acp binary when present.
Sourcepub fn with_auto_allow_permissions(self) -> Self
pub fn with_auto_allow_permissions(self) -> Self
Force unattended permission auto-allow on the ACP client side.
Only for trusted test sandboxes / unattended qualification.
Trait Implementations§
Source§impl Clone for CodexAgentConfig
impl Clone for CodexAgentConfig
Source§fn clone(&self) -> CodexAgentConfig
fn clone(&self) -> CodexAgentConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more