Skip to content

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

test(agent-harness): pass vision fixture to cancel e2e subagent

Steven Enamakelbe30f6384696
diff --git a/tests/agent_harness_e2e.rs b/tests/agent_harness_e2e.rs
index 1c8206b291..56d1c2dc2a 100644
--- a/tests/agent_harness_e2e.rs
+++ b/tests/agent_harness_e2e.rs
@@ -5447,15 +5447,31 @@ async fn cancelling_a_running_background_subagent_settles_it_inner() {
// The second canary never arrives, so the worker's model call is held for
// `CANARY_BARRIER_WAIT`: long enough to cancel it while it is running.
arm_canary_barrier(&["CANCEL_E2E_CANARY", "CANCEL_E2E_NEVER"]);
+ let stack = boot_stack().await;
+ bind_thread_action_dir(
+ &stack,
+ "thread-cancel",
+ &stack._tmp.path().join("OpenHuman/projects"),
+ )
+ .await;
+ let image_path = stack._tmp.path().join("OpenHuman/projects/cancel-vision.png");
+ std::fs::copy(
+ Path::new(env!("CARGO_MANIFEST_DIR")).join("../../tests/fixtures/images/handoff-hero.png"),
+ &image_path,
+ )
+ .expect("copy vision fixture");
reset_script(vec![
tool_calls_completion(&[(
"spawn_subagent",
- json!({ "agent_id": "vision_agent", "prompt": "Find CANCEL_E2E_CANARY" }),
+ json!({
+ "agent_id": "vision_agent",
+ "prompt": "Find CANCEL_E2E_CANARY",
+ "image_paths": [image_path],
+ }),
)]),
text_completion("Spawned a worker; its result will arrive later."),
text_completion("worker would have finished here"),
]);
- let stack = boot_stack().await;
let mut events = spawn_sse_collector(format!(
"{}/events?client_id=harness-cancel",
stack.rpc_base