`rtk rewrite` runs the daily hook reminder and telemetry ping on the hook path, so shell hooks spend the reminder into /dev/null

Open Beginner friendly
#4,615 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@viniciusdsandrade is already working on this.

Since Oct 17, 2026.

  • #4619 by @viniciusdsandrade — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust, shell
Domain
cli

Research direction

Start in run_cli, where the rtk hook <agent> path already skips hooks::hook_check::maybe_warn() and core::telemetry::maybe_ping() (commit 5d8102abf), and extend the same skip to the rewrite subcommand. The shell hooks in hooks/claude/rtk-rewrite.sh and hooks/cursor/rtk-rewrite.sh call it with 2>/dev/null. Done when the reproduction in the issue shows the reminder printed by the next rtk git status and .hook_warn_last left unwritten by rtk rewrite.

Written by the indexing model from the issue text.

Description

area:cli bug good first issue priority:medium

run_cli skips hooks::hook_check::maybe_warn() for rtk hook <agent> (develop 5d8102abf), and #4308 also skips core::telemetry::maybe_ping() there. rtk rewrite is the other hook entry point: hooks/claude/rtk-rewrite.sh, hooks/cursor/rtk-rewrite.sh, the Hermes plugin and the Pi extension all call it before every command. It still runs both checks.

The shell hooks call it as rtk rewrite "$CMD" 2>/dev/null. So when the reminder is due, it is printed into /dev/null and the once-a-day marker is spent. The rewritten command that runs right after stays silent for 23 hours, the same mechanism as #4036.

Reproduced on develop 16a20a2ea. The home is isolated and has a .claude directory with no hook registered. stdin is /dev/null, LC_ALL=C:

$ rtk rewrite "git status" 2>/dev/null      # what the shell hook runs
rtk git status                               # .hook_warn_last now written
$ rtk git status                             # what the agent runs next
                                             # no "[rtk] /!\ No hook installed" line

Without the rewrite first, rtk git status in the same kind of home prints the reminder.

Expected: rtk rewrite skips both checks, like rtk hook <agent>, and the reminder goes to the next command a person reads.

Related: #4297 (same for rtk hook), #4036 (meta commands spending the reminder), #4512 (the reminder is a false positive on non-Claude harnesses, which reach rtk through rtk rewrite).

Dominant language
Rust
Stars
85k
Forks
5.4k
Avg merge
6d 22h
Merged PRs (30d)
64

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rtk-ai/rtk

All issues in rtk-ai/rtk

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.