{"record":{"id":"eafef3249edec6f8","repo":"aaif-goose/goose","slug":"test-replay-failed-for-missing-recorde","errorCode":null,"errorMessage":"Test replay failed for '{}' ({}) - missing recorded interaction: {}. File deleted - re-run test to record fresh data.","messagePattern":"Test replay failed for '(.+?)' \\((.+?)\\) - missing recorded interaction: (.+?)\\. File deleted - re-run test to record fresh data\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/goose-cli/src/scenario_tests/scenario_runner.rs","lineNumber":281,"sourceCode":"    )\n    .await;\n\n    let mut error = None;\n    for message in &messages {\n        if let Err(e) = cli_session\n            .process_message(message.clone(), CancellationToken::default(), false)\n            .await\n        {\n            error = Some(e.to_string());\n            break;\n        }\n    }\n    let updated_messages = cli_session.message_history();\n\n    if let Some(ref err_msg) = error {\n        if err_msg.contains(\"No recorded response found\") {\n            let _ = std::fs::remove_file(&file_path);\n            return Err(anyhow::anyhow!(\n                \"Test replay failed for '{}' ({}) - missing recorded interaction: {}. File deleted - re-run test to record fresh data.\",\n                test_name, factory_name, err_msg\n            ));\n        }\n    }\n\n    let result = ScenarioResult {\n        messages: updated_messages,\n        error,\n    };\n\n    validator(&result)?;\n\n    drop(cli_session);\n\n    if let Some(provider) = provider_for_saving {\n        if result.error.is_none() {\n            Arc::try_unwrap(provider)","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/crates/goose-cli/src/scenario_tests/scenario_runner.rs#L263-L299","documentation":"Replay mode was active and the recorded provider reported 'No recorded response found' while answering the scenario — the current run made a request (a prompt or tool-call round trip) that has no matching entry in the recording. The runner deletes the file so the next run records fresh data. It means the code path drifted from what was captured: changed prompts, different tool-call counts, or model nondeterminism producing an extra exchange.","triggerScenarios":"Editing a recipe/prompt after the recording was made; a model update altering how many back-and-forth exchanges occur; nondeterministic agent behavior adding an unrecorded tool call during replay.","commonSituations":"Recordings made on an older recipe version; contributors changing test prompts without re-recording; providers whose request streams vary run to run.","solutions":["Re-run the test locally with credentials to re-record against the current code path, then commit the updated file.","Keep scenario inputs deterministic (fixed prompts, no timestamps/randomness) so recordings stay stable.","If it recurs every run for one provider, make that scenario's message generator deterministic or add the provider to the skip list."],"exampleFix":"# before\n$ cargo test scenario_y\nError: Test replay failed for 'scenario_y' (anthropic) - missing recorded interaction: No recorded response found for prompt 5. File deleted - ...\n\n# after\n$ ANTHROPIC_API_KEY=... cargo test scenario_y   # fresh recording\n$ git commit -am \"re-record scenario_y\" && git push","handlingStrategy":"retry","validationCode":"# keep scenario inputs deterministic so request counts match recordings\nexport GOOSE_TEST_SEED=fixed  # any project-specific determinism knobs","typeGuard":null,"tryCatchPattern":"match run_scenario_test(&name).await {\n    Err(e) if e.to_string().contains(\"missing recorded interaction\") => {\n        record_fresh(&name).await?; // runner deleted the file; re-record and commit\n    }\n    r => r,\n}","preventionTips":["Re-record immediately after changing any prompt or recipe used by a scenario.","Keep scenario message generators deterministic (no random IDs/timestamps).","Review .recorded diffs in PRs to catch accidental interaction drift."],"tags":["testing","replay","determinism","recording"],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}