Skip to content

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

fix(turn_context): correct artifact store comment for sub-agent path

Steven Enamakel83044548a564
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs
index 88aa17df9a..ce451c8653 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs
@@ -535,8 +535,8 @@ async fn cold_resumed_thread_can_send_again() {
assert_eq!(host.turn("second message").await.unwrap(), "second reply");
}
-/// The PRODUCTION turn path must wire an artifact store, rooted where the READ
-/// path will look for it (#6408).
+/// The PRODUCTION turn path must wire an artifact store, rooted outside the
+/// project the agent works in (#6408).
///
/// Two assertions, and both were dead code before this PR. The existing artifact
/// tests construct `TurnContextMiddleware` with `artifact_store: Some(..)`
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs
index 5a50e21651..4ad86c82f6 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs
@@ -331,16 +331,15 @@ impl TurnContextMiddleware {
// Deliberately `None` on the channel / sub-agent path (#6408).
//
// This constructor has no session context, so it has no
- // `action_dir` to root the store at. Handing it any other directory
- // would write artifacts the model cannot read back:
- // `artifact_read_target` only recognises a `file_read` under the
- // action workspace's `artifacts/tool-results/…`, so an artifact
- // written elsewhere yields a pointer that resolves to nothing —
- // strictly worse than the inline truncation it replaced, which at
- // least returns the head. Sub-agent turns therefore keep today's
- // truncation until a real `action_dir` is threaded through here.
- // Tracked as #6483 — delegated turns are where oversized results are
- // most likely, so this gap is not cosmetic.
+ // `workspace_dir` to put the store under, and any directory it
+ // guessed could be the user's project: oversized outputs would
+ // become stray files there. The store is detached now (absolute
+ // pointers under `<workspace_dir>/artifacts/tool-results`), so the
+ // read side no longer constrains where it lives; what is missing
+ // is only that path. Sub-agent turns keep inline truncation until
+ // `workspace_dir` is threaded through here. Tracked as #6483 —
+ // delegated turns are where oversized results are most likely, so
+ // this gap is not cosmetic.
artifact_store: None,
tokenjuice_compaction_enabled: false,
tokenjuice_compression: AgentTokenjuiceCompression::Off,