Skip to content

False "No hook installed" for Copilot and for project-scope Codex and Droid installs #4756

Open

Description

@KuSh

After #4343, rtk gain and the daily reminder no longer print No hook installed — run rtk init -g when another agent's rtk hook is configured. Three installs are not covered by that check yet, so they still get the warning when ~/.claude exists without a Claude hook:

Install Files rtk writes Warning on v1.0.1 on develop with #4343
rtk init -g --copilot ~/.copilot/hooks/rtk-rewrite.json yes yes yes
rtk init --copilot .github/hooks/rtk-rewrite.json yes yes yes
rtk init --codex (project) .codex/hooks.json yes yes yes
rtk init --agent droid (project) .factory/hooks.json yes yes yes

The global Codex and Droid installs, and the project-scope Trae, Antigravity, Pi and OMP installs, are silenced by #4343.

The check lives in AGENT_PROBES (src/hooks/hook_check.rs), with one is_configured() per agent under src/hooks/init/. Copilot has no probe. The Codex and Droid probes read only the global directory (resolve_codex_dir(), resolve_droid_dir()), while their installers also write project-scope hooks in the working directory.

A fix passes when, for each row above, the files the install writes silence the warning in rtk gain and rtk ls ., and the warning comes back after the matching --uninstall. #3642 has Copilot detection written against the earlier single-file init.rs layout.

Repro, with ~/.claude present and no Claude hook:

rtk init --codex
rtk gain        # [warn] No hook installed — run `rtk init -g` for automatic token savings

Activity

  1. rtk-wshm-sync-bot commented on Oct 23, 2026

    @rtk-wshm-sync-bot

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟡 Priority medium
    🎯 Confidence 93%

    Summary

    Missing/incomplete hook probes (Copilot has none; Codex/Droid only check global dir) cause false 'No hook installed' warnings for several project-scope and Copilot installs

    📁 Relevant files
    • src/hooks/hook_check.rs
    • src/hooks/init/mod.rs
    • src/hooks/init/codex.rs
    • src/hooks/init/droid.rs

    Suggested Actions

    1. Add an is_configured() probe for Copilot under src/hooks/init/ and register it in AGENT_PROBES
    2. Extend resolve_codex_dir()/resolve_droid_dir() checks to also look at project-scope .codex/.factory dirs
    3. Verify fix against all 4 table rows plus the --uninstall warning-returns case
    4. Cross-check against fix(hooks): false 'No hook installed' warning when GitHub Copilot hook is the active integration #3642's Copilot detection (written for the old single-file init.rs) for reusable logic

    Triaged automatically by wshm · This is an automated analysis, not a human review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions