Stop migrating Cursor sandbox settings (#39325)

## What changed

- Ignore `.cursor/sandbox.json` during external agent config migration.
- Continue importing supported settings from `.cursor/cli-config.json`.

## Testing

- Update app-server migration coverage to verify that environment variables from `cli-config.json` are imported.

GitOrigin-RevId: 6094f1cb6f698392d58056f826da21c1f1389a1b
This commit is contained in:
charlesgong-openai authored and copyberry committed 2026-08-19 01:06:12 +00:00
1 parent b537d5a097
commit 67ed4e717a
5 files changed
+10 -156

No files matched your search

@@ -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(())