diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_driver/main_loop_tests.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_driver/main_loop_tests.rs index ac1183d0c..0bd6ac827 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_driver/main_loop_tests.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_driver/main_loop_tests.rs @@ -317,24 +317,26 @@ fn autonomous_manifest_waiting_context_persists_without_finishing_parent_run() { let root = temporary.path().join("project"); init_local_game_project_at(&root, "manifest-waiting-project", TASK) .expect("init manifest waiting project"); - start_game_creator_supervisor_background_task_for_session_at( + let session_id = resolve_agent_conversation_session_id_at( &root, + GAME_CREATOR_PROJECT_SUPERVISOR_AGENT_ID, None, + true, + ) + .expect("resolve autonomous parent session"); + let task_record = append_unique_game_creator_agent_runtime_pending_task( + &root, + GAME_CREATOR_PROJECT_SUPERVISOR_AGENT_ID, + &session_id, TASK, RUN_ID, AGENT_RUNTIME_SUPERVISOR_CLI_SOURCE, - AGENT_RUNTIME_RUN_PROFILE_AUTONOMOUS_GAME_BUILD, + Some(AGENT_RUNTIME_RUN_PROFILE_AUTONOMOUS_GAME_BUILD), + None, ) .expect("queue autonomous parent task"); update_manifest_task_status_at(&root, "design-director", GameCreationAppTaskStatus::Running) .expect("start first manifest task"); - let task_record = read_latest_game_creator_agent_runtime_task_by_run_id( - &root, - GAME_CREATOR_PROJECT_SUPERVISOR_AGENT_ID, - RUN_ID, - ) - .expect("read autonomous parent task") - .expect("autonomous parent task exists"); let mut runtime = agent_runtime_state_from_task_record(&task_record); let mut observations = Vec::new(); let continuation = AgentRuntimeContinuationContext::default();