codex: simplify remote sandbox launch payload

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-04-08 14:28:44 -07:00
co-authored by Codex
parent c8ede67d06
commit 09f332e2a3
8 changed files with 44 additions and 74 deletions
@@ -1,6 +1,4 @@
use clap::Parser;
use codex_arg0::Arg0DispatchPaths;
use codex_arg0::arg0_dispatch_or_else;
#[derive(Debug, Parser)]
struct ExecServerArgs {
@@ -13,11 +11,11 @@ struct ExecServerArgs {
listen: String,
}
fn main() -> anyhow::Result<()> {
arg0_dispatch_or_else(|arg0_paths: Arg0DispatchPaths| async move {
let args = ExecServerArgs::parse();
codex_exec_server::configure_arg0_paths(arg0_paths);
codex_exec_server::run_main_with_listen_url(&args.listen).await?;
Ok(())
})
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let args = ExecServerArgs::parse();
codex_exec_server::run_main_with_listen_url(&args.listen)
.await
.map_err(|err| anyhow::Error::msg(err.to_string()))?;
Ok(())
}
-6
View File
@@ -13,8 +13,6 @@ mod remote_process;
mod rpc;
mod server;
use codex_arg0::Arg0DispatchPaths;
pub use client::ExecServerClient;
pub use client::ExecServerError;
pub use client_api::ExecServerClientConnectOptions;
@@ -68,7 +66,3 @@ pub use server::DEFAULT_LISTEN_URL;
pub use server::ExecServerListenUrlParseError;
pub use server::run_main;
pub use server::run_main_with_listen_url;
pub fn configure_arg0_paths(arg0_paths: Arg0DispatchPaths) {
local_process::configure_codex_linux_sandbox_exe(arg0_paths.codex_linux_sandbox_exe);
}
+1 -1
View File
@@ -38,7 +38,7 @@ impl ExecBackend for RemoteProcess {
let sandbox_type = params
.sandbox
.as_ref()
.map_or(SandboxType::None, |sandbox| sandbox.sandbox_type());
.map_or(SandboxType::None, |sandbox| sandbox.sandbox);
let session = self.client.register_session(&process_id).await?;
match self.client.exec(params).await {
Ok(_) => {}