From 63162bb23236c5247ab6cd5a5a36566afd1c6fae Mon Sep 17 00:00:00 2001 From: Chanhuy2707 Date: Sun, 11 Oct 2026 01:14:33 +0700 Subject: [PATCH] Pass --skip-git-repo-check to codex exec Clodex runs codex exec in the target workspace. Codex refuses to run when the directory is not a trusted git repo, so build and audit runs failed with "Not inside a trusted directory and --skip-git-repo-check was not specified". Add the flag to both codex exec calls (codex_exec_command and codex_review_command). Co-Authored-By: Claude Haiku 5.5 --- clodex/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clodex/commands.py b/clodex/commands.py index 9fee70b..35c91ee 100644 --- a/clodex/commands.py +++ b/clodex/commands.py @@ -99,7 +99,7 @@ def codex_exec_command(config: ClodexConfig, repo_root: Path, approval_profile: else: # `codex exec` is non-interactive and has no --ask-for-approval flag. argv.extend(["-c", 'approval_policy="never"']) - argv.extend(["--sandbox", str(codex["sandbox"]), "-C", str(repo_root), "-"]) + argv.extend(["--sandbox", str(codex["sandbox"]), "-C", str(repo_root), "--skip-git-repo-check", "-"]) return AgentCommand(name="codex-build", argv=argv) @@ -127,7 +127,7 @@ def codex_review_command(config: ClodexConfig, repo_root: Path) -> AgentCommand: # parsed, and the reply is validated against the schema either way. if capabilities.supports(config.repo_root, "codex", "--output-schema") is not False: argv.extend(["--output-schema", str(schema_path("audit_verdict"))]) - argv.append("-") + argv.extend(["--skip-git-repo-check", "-"]) return AgentCommand( name="codex-audit", argv=argv,