feat: guard git enrichment (#26175)

Skip turn git metadata enrichment when a turn has remote or multiple
executors, so we do not report the orchestrator checkout as executor
workspace metadata.

Test: `just test -p codex-core` (blocked by existing
`Session::conversation_id` compile error in `close_agent.rs`).
This commit is contained in:
jif authored and GitHub committed 2026-06-03 18:36:10 +02:00
1 parent 99c9be1d30
commit 8030c36970
3 files changed
+69 -2

No files matched your search

+7 -1
View File
@@ -814,7 +814,13 @@ impl Session {
turn_context.final_output_json_schema = final_schema;
}
let turn_context = Arc::new(turn_context);
turn_context.turn_metadata_state.spawn_git_enrichment_task();
if turn_context
.environments
.single_local_environment_cwd()
.is_some()
{
turn_context.turn_metadata_state.spawn_git_enrichment_task();
}
turn_context
}