codex: move unified exec sandbox launch to exec-server

This commit is contained in:
starr-openai
2026-04-03 16:32:52 -07:00
parent 4eabc3dcb1
commit cc915eb13e
18 changed files with 286 additions and 21 deletions

View File

@@ -35,13 +35,17 @@ impl ExecBackend for RemoteProcess {
async fn start(&self, params: ExecParams) -> Result<StartedExecProcess, ExecServerError> {
let process_id = params.process_id.clone();
let session = self.client.register_session(&process_id).await?;
if let Err(err) = self.client.exec(params).await {
session.unregister().await;
return Err(err);
}
let response = match self.client.exec(params).await {
Ok(response) => response,
Err(err) => {
session.unregister().await;
return Err(err);
}
};
Ok(StartedExecProcess {
process: Arc::new(RemoteExecProcess { session }),
sandbox_type: response.sandbox_type,
})
}
}