[PR #468] Use absolute git-ai paths in Claude/Gemini hooks #489

Closed
opened 2026-03-02 04:13:46 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/468

State: closed
Merged: No


Agent hook commands for non-Cursor integrations were using git-ai from PATH, which fails when the binary isn’t available in the agent environment. This updates Claude Code and Gemini hook generation to follow the cursor model of using absolute git-ai paths.

  • Hook command generation
    • Claude Code and Gemini hooks now build checkpoint commands with HookInstallerParams.binary_path, ensuring absolute-path execution.
  • Hook test fixtures
    • Consolidated absolute-path expectations via shared test constants to match new command format.

Example:

let before_tool_cmd = format!("{} {}", params.binary_path.display(), GEMINI_BEFORE_TOOL_CMD);

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/468 **State:** closed **Merged:** No --- Agent hook commands for non-Cursor integrations were using `git-ai` from PATH, which fails when the binary isn’t available in the agent environment. This updates Claude Code and Gemini hook generation to follow the cursor model of using absolute git-ai paths. - **Hook command generation** - Claude Code and Gemini hooks now build checkpoint commands with `HookInstallerParams.binary_path`, ensuring absolute-path execution. - **Hook test fixtures** - Consolidated absolute-path expectations via shared test constants to match new command format. Example: ```rust let before_tool_cmd = format!("{} {}", params.binary_path.display(), GEMINI_BEFORE_TOOL_CMD); ``` <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.
kerem 2026-03-02 04:13:46 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#489
No description provided.