Compare commits

...

3 Commits

Author SHA1 Message Date
jif-oai
7f877548ef Merge branch 'main' into codex/validate-remote-exec-cwd 2026-04-13 15:46:41 +01:00
jif-oai
4ed82dfdf3 Merge branch 'main' into codex/validate-remote-exec-cwd 2026-04-13 10:56:55 +01:00
jif-oai
310be316ff Validate remote exec-server cwd during startup
Fail fast when a remote exec-server cannot see the configured thread cwd. This catches the most dangerous split-brain state before user instructions, skills, or tool processes are resolved from the wrong filesystem.

Co-authored-by: Codex <noreply@openai.com>
2026-04-09 12:15:58 +01:00

View File

@@ -548,6 +548,15 @@ impl Codex {
.current()
.await
.map_err(|err| CodexErr::Fatal(format!("failed to create environment: {err}")))?;
if let Some(environment) = environment.as_ref()
&& environment.is_remote()
&& let Err(err) = environment.get_filesystem().get_metadata(&config.cwd).await
{
return Err(CodexErr::Fatal(format!(
"remote exec-server cannot access cwd `{}`: {err}",
config.cwd.display()
)));
}
let user_instructions = get_user_instructions(&config, environment.as_deref()).await;
let exec_policy = if crate::guardian::is_guardian_reviewer_source(&session_source) {