fix: skip the codex git-repo trust check so GPT reviews run from any CWD - #4
Open
Joi wants to merge 1 commit into
Open
fix: skip the codex git-repo trust check so GPT reviews run from any CWD#4Joi wants to merge 1 commit into
Joi wants to merge 1 commit into
Conversation
codex exec aborts with "Not inside a trusted directory and --skip-git-repo-check was not specified." when the caller's working directory is not inside a git repository. Fresh Eyes reviews run under --sandbox read-only and the scope text names its own target repo (often via git -C), so the launch directory should not gate the review — and the Claude provider has no equivalent restriction. Pass --skip-git-repo-check on both the manual and automatic codex exec invocations, and assert the flag in the GPT provider argv tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symptom
fresheyes.sh --gptfails in seconds (exit 1, two log lines) when launched from a directory that is not inside a git repository:This is codex exec's trust check on its working directory. The
--claudeprovider has no equivalent restriction, so the same scope reviewed fine with Claude — which makes the GPT failure look like a provider outage rather than a launch-directory issue.Why skipping the check is right here
--sandbox read-only; the trust check exists to guard writes into untracked directories, which cannot happen here.git -C /path/to/repo ...), so the caller's CWD is irrelevant to what gets reviewed.Change
--skip-git-repo-checkon both the manual and automaticcodex execinvocations.tests/fresheyes-gpt-provider-test.sh.tests/fresheyes-gpt-provider-test.sh,tests/fresheyes-verdict-test.sh, andtests/fresheyes-prompt-contract-test.shpass on macOS. (fresheyes-claude-provider-test.sh,fresheyes-progress-test.sh, andfresheyes-detach-test.shfail identically on pristinemainon macOS — setsid session semantics and BSDwcpadding — unrelated to this change.)🤖 Generated with Claude Code