@@ -21,6 +21,7 @@ type CodexRunOptions = {
2121 cwd ?: string ;
2222 includeWorkspaceEnv ?: boolean ;
2323 disableTools ?: boolean ;
24+ skipGitRepoCheck ?: boolean ;
2425} ;
2526
2627type CodexRunResult = {
@@ -157,6 +158,7 @@ export class CodexProvider extends Provider {
157158 cwd ?: string ;
158159 eventAudit ?: boolean ;
159160 includeWorkspaceEnv ?: boolean ;
161+ skipGitRepoCheck ?: boolean ;
160162 } = { }
161163 ) : Promise < string > {
162164 const binary = await this . resolveBinary ( ) ;
@@ -171,6 +173,7 @@ export class CodexProvider extends Provider {
171173 cwd : options . cwd ,
172174 includeWorkspaceEnv : options . includeWorkspaceEnv ,
173175 disableTools : true ,
176+ skipGitRepoCheck : options . skipGitRepoCheck ,
174177 }
175178 ) ;
176179 const content = this . sanitizeReviewContent ( ( lastMessage || stdout ) . trim ( ) ) ;
@@ -199,6 +202,7 @@ export class CodexProvider extends Provider {
199202 outputSchemaFile ?: string ;
200203 eventAudit ?: boolean ;
201204 disableTools ?: boolean ;
205+ skipGitRepoCheck ?: boolean ;
202206 } ) : string [ ] {
203207 // The top-level `codex` command starts the interactive TUI and fails in CI.
204208 const args = [
@@ -237,6 +241,10 @@ export class CodexProvider extends Provider {
237241 ) ;
238242 }
239243
244+ if ( options . skipGitRepoCheck ) {
245+ args . push ( '--skip-git-repo-check' ) ;
246+ }
247+
240248 if ( options . outputSchemaFile ) {
241249 args . push ( '--output-schema' , options . outputSchemaFile ) ;
242250 }
0 commit comments