Skip to content

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

fix(config): clear OPENHUMAN_WORKSPACE on guard drop instead of restoring stale value

Steven Enamakel01690c8356f2
diff --git a/crates/openhuman-core/src/config/test_env.rs b/crates/openhuman-core/src/config/test_env.rs
index 2a7b5470ce..b055061e04 100644
--- a/crates/openhuman-core/src/config/test_env.rs
+++ b/crates/openhuman-core/src/config/test_env.rs
@@ -123,6 +123,13 @@ impl Drop for EnvVarGuard {
fn drop(&mut self) {
for (key, old) in self.saved.drain(..).rev() {
match old {
+ // `OPENHUMAN_WORKSPACE` has no meaningful ambient value under
+ // test: a prior value can only be another test's deliberate
+ // leak (e.g. the detached-task composio bus tests keep their
+ // workspace pointed at a leaked dir). Restoring it would
+ // carry that stale path into unrelated tests, so clear it,
+ // as the per-file guards this replaced did.
+ Some(_) if key == WORKSPACE => std::env::remove_var(key),
Some(value) => std::env::set_var(key, value),
None => std::env::remove_var(key),
}