Skip to content

rtk-rewrite.sh: No such file or directory #1962

Closed as duplicate
Closed as duplicate

Description

@cikichen

 PreToolUse:Bash hook error ⎿  Failed with non-blocking status code: /bin/sh:
/Users/name/.claude/hooks/rtk-rewrite.sh: No such file
or directory

✘  ~  rtk init -g

RTK hook registered (global).

Command: rtk hook claude
RTK.md: /Users/name/.claude/RTK.md (10 lines)
CLAUDE.md: @RTK.md reference added

settings.json: hook already present
Restart Claude Code. Test with: git status

~  rtk gain
RTK Token Savings (Global Scope)
════════════════════════════════════════════════════════════

Total commands: 1936
Input tokens: 10.1M
Output tokens: 1.3M
Tokens saved: 8.8M (86.8%)
Total exec time: 218m33s (avg 6.8s)
Efficiency meter: █████████████████████░░░ 86.8%

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

Activity

  1. pszymkowiak commented on May 27, 2026

    @pszymkowiak
    Collaborator

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟠 Priority high
    🎯 Confidence 87%

    Summary

    rtk init -g registers the hook entry in settings.json but does not create the rtk-rewrite.sh script file, causing PreToolUse hook failures and a contradictory 'No hook installed' warning


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

  2. KuSh commented on Sep 5, 2026

    @KuSh
    Collaborator

    Closing as a duplicate of #3693, which tracks the same problem with the more complete discussion. Please follow up there; if your case differs in a way that issue does not cover, comment here and it can be reopened.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions