Repository navigation
Conversation
`rtk hook` and `rtk rewrite` are the hook. The agent that invokes them
parses their stdout and stderr as a protocol channel, so any extra line
there is corruption, not a diagnostic.
`maybe_warn()` was allowed to fire for them, which meant a developer with
Claude Code installed but without the rtk hook got
[rtk] /!\ No hook installed - run `rtk init -g` for automatic token savings
emitted mid-protocol once a day. Gain was already excluded for the same
reason; Hook and Rewrite were missed.
This is not theoretical: on such a machine ten tests in
`copilot_selfheal_test.rs` fail today, every one of them on the
`stderr must stay silent (protocol safety)` assertion. CI never sees it
because a fresh runner has no `~/.claude` at all, so `status()` reports
Ok and the warning never fires.
Co-Authored-By: Claude Opus 5 <[email protected]>
|
This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet. |
|
#4550 (merged 2026-10-13) made |
Problem
rtk hookandrtk rewriteare the hook. The agent that invokes them parses their stdout and stderr as a protocol channel, so an extra line there is corruption, not a diagnostic.maybe_warn()was allowed to fire for both. On a machine that has Claude Code installed but not the rtk hook, that putsinto the protocol stream once a day.
Gainwas already excluded for exactly this reason;HookandRewritewere missed.This is not theoretical
On such a machine, ten tests in
tests/copilot_selfheal_test.rsfail today — every one on the same assertion:CI never sees it because a fresh runner has no
~/.claudeat all, sostatus()returns Ok and the warning never fires. The tests are correct; the nag was leaking into a channel it must never touch.Fix
Add
Commands::HookandCommands::Rewriteto the same exclusion listCommands::Gainalready sits in.Testing
No new test —
copilot_selfheal_test.rsalready pins this contract with 12 assertions on stderr silence; they were simply unreachable in CI. Before/after on an affected machine:Full suite,
cargo fmt --check, andcargo clippy --all-targetsclean onx86_64-pc-windows-gnu.🤖 Generated with Claude Code