Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(sandbox): set login_shell on docker requests

Steven Enamakel9b2ae761c852
diff --git a/crates/openhuman-core/src/agent/platform_shell.rs b/crates/openhuman-core/src/agent/platform_shell.rs
index 51a288a40e..f71533b6d5 100644
--- a/crates/openhuman-core/src/agent/platform_shell.rs
+++ b/crates/openhuman-core/src/agent/platform_shell.rs
@@ -24,6 +24,8 @@
//! and rejects `set -o pipefail`, so this is gated on bash actually
//! being present; otherwise we fall back to plain sh.
+use std::path::Path;
+
/// Which shell family [`build_tokio_command`] / [`build_std_command`] spawn.
///
/// A value rather than a bare `cfg!(windows)` so what is *told* to the model
diff --git a/crates/openhuman-core/src/sandbox/docker.rs b/crates/openhuman-core/src/sandbox/docker.rs
index 5ecfaa1b65..fcbf5d7ab8 100644
--- a/crates/openhuman-core/src/sandbox/docker.rs
+++ b/crates/openhuman-core/src/sandbox/docker.rs
@@ -158,6 +158,7 @@ fn build_docker_request(
workspace,
image: overrides.and_then(|config| config.image.clone()),
command: request.command.clone(),
+ login_shell: false,
network: overrides.and_then(|config| config.network.clone()),
memory_limit_mb: overrides.and_then(|config| config.memory_limit_mb),
cpus: overrides.and_then(|config| config.cpu_limit),
diff --git a/crates/openhuman-core/src/sandbox/docker_exec_tests.rs b/crates/openhuman-core/src/sandbox/docker_exec_tests.rs
index f3598d2155..f631eec3cb 100644
--- a/crates/openhuman-core/src/sandbox/docker_exec_tests.rs
+++ b/crates/openhuman-core/src/sandbox/docker_exec_tests.rs
@@ -79,6 +79,7 @@ fn module_request_preserves_policy_and_only_forwards_allowed_environment() {
workspace: workspace.to_string_lossy().into_owned(),
image: Some("debian:12".to_owned()),
command: "make test".to_owned(),
+ login_shell: false,
network: Some("bridge".to_owned()),
memory_limit_mb: Some(2048),
cpus: Some(2.5),