Skip to content

[codex] fix: disable Gemini PreToolUse hook install#2519

Draft
heyramzi wants to merge 1 commit into
stablyai:mainfrom
heyramzi:codex/disable-gemini-pretooluse-hook
Draft

[codex] fix: disable Gemini PreToolUse hook install#2519
heyramzi wants to merge 1 commit into
stablyai:mainfrom
heyramzi:codex/disable-gemini-pretooluse-hook

Conversation

@heyramzi
Copy link
Copy Markdown
Contributor

Summary

  • stop installing the Gemini PreToolUse managed hook from Orca
  • sweep stale managed Gemini hook entries from removed event buckets during reinstall
  • add a regression test that proves reinstall removes an existing PreToolUse hook from ~/.gemini/settings.json

Root Cause

Orca was auto-installing a managed Gemini PreToolUse hook into ~/.gemini/settings.json. In some Gemini CLI environments that hook payload is rejected during tool dispatch, which turns a dashboard status integration into a tool-execution blocker. Reinstall also left stale PreToolUse entries behind because the Gemini installer only updated currently subscribed events and never cleaned removed ones.

Impact

  • Gemini sessions keep the dashboard-safe lifecycle hooks (BeforeAgent, AfterAgent, AfterTool)
  • Orca no longer injects the problematic PreToolUse hook for Gemini
  • existing stale managed PreToolUse entries are removed on reinstall instead of persisting forever

Validation

  • pnpm test src/main/gemini/hook-service.test.ts
  • pnpm typecheck:node

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