Skip to content

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

fix(artifacts): align detached storage namespace

Steven Enamakelc22df11bfcb2
diff --git a/crates/openhuman-core/src/agent/session_host/artifact_wiring.rs b/crates/openhuman-core/src/agent/session_host/artifact_wiring.rs
index fc014d14f8..c5bc27e2f3 100644
--- a/crates/openhuman-core/src/agent/session_host/artifact_wiring.rs
+++ b/crates/openhuman-core/src/agent/session_host/artifact_wiring.rs
@@ -53,7 +53,11 @@ const ARTIFACT_RETENTION: std::time::Duration = std::time::Duration::from_secs(2
/// trusted root, and `is_workspace_internal_path` already exempts it from the
/// internal-state boundary.
fn artifact_root(workspace_dir: &Path) -> PathBuf {
- tool_result_artifacts_dir(workspace_dir)
+ // `ToolResultArtifactStore::detached` adds its own `tool-results` child
+ // namespace so pruning stays within the store-owned directory. Pass the
+ // workspace's `artifacts` directory here; the resulting store root is the
+ // policy-granted `<workspace>/artifacts/tool-results` directory.
+ workspace_dir.join("artifacts")
}
/// Build the store the turn path hands to `TurnContextMiddleware`, sweeping