Skip to content

fix: add --skip-git-repo-check to review tool handler#190

Open
ErnestHysa wants to merge 1 commit into
tuannvm:mainfrom
ErnestHysa:fix/review-tool-skip-git-repo-check
Open

fix: add --skip-git-repo-check to review tool handler#190
ErnestHysa wants to merge 1 commit into
tuannvm:mainfrom
ErnestHysa:fix/review-tool-skip-git-repo-check

Conversation

@ErnestHysa
Copy link
Copy Markdown

@ErnestHysa ErnestHysa commented May 30, 2026

Bug Fix

The review tool handler does not pass --skip-git-repo-check to the Codex CLI, while the codex (exec) tool handler does. This causes review to fail with the trust directory error when invoked via MCP from a parent orchestrator.

Fix

Add --skip-git-repo-check to the review command args in ReviewToolHandler.execute(), matching the behavior of CodexToolHandler.execute().

Testing

  • Build passes
  • All 76 tests pass

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced review tool command configuration for improved execution capabilities.

Review Change Stack

The ReviewToolHandler.execute() method was missing the --skip-git-repo-check flag
that CodexToolHandler.execute() includes. This caused the review tool to fail with:

    Not inside a trusted directory and --skip-git-repo-check was not specified.

when invoked via MCP from a parent orchestrator (e.g., Claude Code) even when the
directory is trusted in ~/.codex/config.toml.

This fix adds --skip-git-repo-check to the review command args, matching the
behavior of the codex (exec) tool handler.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f1e58c69-485e-472f-b790-b81b50d28e38

📥 Commits

Reviewing files that changed from the base of the PR and between a57acb6 and 35edeb8.

📒 Files selected for processing (1)
  • src/tools/handlers.ts

Walkthrough

The ReviewToolHandler's Codex command construction now includes the --skip-git-repo-check flag in its command-line arguments, enabling the handler to skip git repository validation during code review execution.

Changes

ReviewToolHandler CLI Flag

Layer / File(s) Summary
Add --skip-git-repo-check flag to ReviewToolHandler
src/tools/handlers.ts
The --skip-git-repo-check flag is added to the Codex CLI arguments passed to codex review in ReviewToolHandler.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related issues

Possibly related PRs

  • tuannvm/codex-mcp-server#100: Both PRs modify src/tools/handlers.ts to change how the codex review command arguments are constructed, specifically around the --skip-git-repo-check flag in ReviewToolHandler.

Poem

🐰 A flag so small, but oh so fine,
Skip-git-checks, your code runs fine!
One little line, a swift review,
ReviewToolHandler, fixed and true! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically identifies the main change: adding the --skip-git-repo-check flag to the review tool handler to fix a bug.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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