Skip to content

fix: skip the codex git-repo trust check so GPT reviews run from any CWD - #4

Open
Joi wants to merge 1 commit into
danshapiro:mainfrom
Joi:fix/codex-skip-git-repo-check
Open

fix: skip the codex git-repo trust check so GPT reviews run from any CWD#4
Joi wants to merge 1 commit into
danshapiro:mainfrom
Joi:fix/codex-skip-git-repo-check

Conversation

@Joi

@Joi Joi commented Aug 2, 2026

Copy link
Copy Markdown

Symptom

fresheyes.sh --gpt fails in seconds (exit 1, two log lines) when launched from a directory that is not inside a git repository:

Reading additional input from stdin...
Not inside a trusted directory and --skip-git-repo-check was not specified.

This is codex exec's trust check on its working directory. The --claude provider 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

  • Reviews run under --sandbox read-only; the trust check exists to guard writes into untracked directories, which cannot happen here.
  • The review scope names its own target repo (typically via git -C /path/to/repo ...), so the caller's CWD is irrelevant to what gets reviewed.
  • Agent harnesses frequently launch reviews from workspace directories that are not git repos.

Change

  • Pass --skip-git-repo-check on both the manual and automatic codex exec invocations.
  • Assert the flag in both argv checks in tests/fresheyes-gpt-provider-test.sh.

tests/fresheyes-gpt-provider-test.sh, tests/fresheyes-verdict-test.sh, and tests/fresheyes-prompt-contract-test.sh pass on macOS. (fresheyes-claude-provider-test.sh, fresheyes-progress-test.sh, and fresheyes-detach-test.sh fail identically on pristine main on macOS — setsid session semantics and BSD wc padding — unrelated to this change.)

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant