Fix sandbox extraction follow-ups

- trim leftover codex-core sandbox shims and retarget the remaining type plumbing
- keep sandbox-related dependencies scoped to the crates and targets that actually use them

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Ahmed Ibrahim
2026-03-20 17:12:46 +00:00
co-authored by Codex
parent a3d0427e75
commit eb847ec5d6
16 changed files with 34 additions and 43 deletions
+15
View File
@@ -15,6 +15,7 @@ use codex_protocol::ThreadId;
use codex_protocol::protocol::CodexErrorInfo;
use codex_protocol::protocol::ErrorEvent;
use codex_protocol::protocol::RateLimitSnapshot;
use codex_sandbox::SandboxTransformError;
use reqwest::StatusCode;
use serde_json;
use std::io;
@@ -234,6 +235,20 @@ impl From<codex_sandbox::error::CodexErr> for CodexErr {
}
}
impl From<SandboxTransformError> for CodexErr {
fn from(err: SandboxTransformError) -> Self {
match err {
SandboxTransformError::MissingLinuxSandboxExecutable => {
CodexErr::LandlockSandboxExecutableNotProvided
}
#[cfg(not(target_os = "macos"))]
SandboxTransformError::SeatbeltUnavailable => CodexErr::UnsupportedOperation(
"seatbelt sandbox is only available on macOS".to_string(),
),
}
}
}
impl CodexErr {
pub fn is_retryable(&self) -> bool {
match self {