diff --git a/codex-rs/app-server/tests/suite/v2/external_agent_config.rs b/codex-rs/app-server/tests/suite/v2/external_agent_config.rs
index 98d9e2d7db..eeff9816f4 100644
--- a/codex-rs/app-server/tests/suite/v2/external_agent_config.rs
+++ b/codex-rs/app-server/tests/suite/v2/external_agent_config.rs
@@ -338,7 +338,10 @@ async fn external_agent_config_migration_source_drives_detect_and_import() -> Re
let codex_home = TempDir::new()?;
let source_home = secondary_external_agent_home(codex_home.path());
std::fs::create_dir_all(&source_home)?;
- std::fs::write(source_home.join("sandbox.json"), r#"{"type":"read_only"}"#)?;
+ std::fs::write(
+ source_home.join("cli-config.json"),
+ r#"{"env":{"SOURCE":"secondary"}}"#,
+ )?;
let home_dir = codex_home.path().display().to_string();
let mut mcp = TestAppServer::builder()
.with_codex_home(codex_home.path())
@@ -387,7 +390,7 @@ async fn external_agent_config_migration_source_drives_detect_and_import() -> Re
assert_eq!(completed.item_type_results[0].failures, Vec::new());
assert!(
std::fs::read_to_string(codex_home.path().join("config.toml"))?
- .contains("sandbox_mode = \"read-only\"")
+ .contains("SOURCE = \"secondary\"")
);
Ok(())
diff --git a/codex-rs/external-agent-migration/src/migration_source.rs b/codex-rs/external-agent-migration/src/migration_source.rs
index 8897f8b7e7..7980ef436d 100644
--- a/codex-rs/external-agent-migration/src/migration_source.rs
+++ b/codex-rs/external-agent-migration/src/migration_source.rs
@@ -98,12 +98,11 @@ impl ExternalAgentSource {
pub(super) fn effective_settings(
self,
- source_config_dir: &Path,
source_settings: &Path,
) -> io::Result