Description
Gemini CLI added hooks support in v0.26.0 (announced January 27, 2026). dotagents should symlink ~/.agents/hooks/ to ~/.gemini/hooks/.
Current Behavior
In src/core/mappings.ts, hooks only target Claude and Factory:
{
name: 'hooks',
source: path.join(canonical, 'hooks'),
targets: [
clients.has('claude') ? path.join(roots.claudeRoot, 'hooks') : null,
clients.has('factory') ? path.join(roots.factoryRoot, 'hooks') : null,
// Gemini NOT included
].filter(Boolean) as string[],
kind: 'dir',
},
Requested Change
{
name: 'hooks',
source: path.join(canonical, 'hooks'),
targets: [
clients.has('claude') ? path.join(roots.claudeRoot, 'hooks') : null,
clients.has('factory') ? path.join(roots.factoryRoot, 'hooks') : null,
+ clients.has('gemini') ? path.join(roots.geminiRoot, 'hooks') : null,
].filter(Boolean) as string[],
kind: 'dir',
},
Gemini CLI Hooks Reference
Workaround
ln -s "../.agents/hooks" ~/.gemini/hooks
Description
Gemini CLI added hooks support in v0.26.0 (announced January 27, 2026). dotagents should symlink
~/.agents/hooks/to~/.gemini/hooks/.Current Behavior
In
src/core/mappings.ts, hooks only target Claude and Factory:Requested Change
{ name: 'hooks', source: path.join(canonical, 'hooks'), targets: [ clients.has('claude') ? path.join(roots.claudeRoot, 'hooks') : null, clients.has('factory') ? path.join(roots.factoryRoot, 'hooks') : null, + clients.has('gemini') ? path.join(roots.geminiRoot, 'hooks') : null, ].filter(Boolean) as string[], kind: 'dir', },Gemini CLI Hooks Reference
BeforeTool,AfterTool,BeforeAgent,AfterAgent,NotificationWorkaround