Feature: Append a compact RTK/recovery hint after hook-rewritten commands

Open
#3,919 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
cli

Research direction

Start by tracing the central hook/output path where commands are rewritten and existing never_worse or recovery-hint behavior is handled. Confirm the hint appears only for rewritten commands, provides a raw-output fallback, and does not appear or claim reduction when the original command is run without RTK.

Written by the indexing model from the issue text.

Description

area:cli enhancement good first issue priority:low

Problem

RTK hooks rewrite commands silently. When output is reduced, the agent may not realize that RTK was involved and may assume the original command itself returned incomplete output.

Proposal

When a hook actually rewrites a command through RTK, append one short line at the end of the output indicating:

  • RTK reduced the shell output
  • how to rerun the original command without RTK

Example:

[rtk: output reduced — rerun without RTK: <original/bypass command>]

The hint should only be added for hook-rewritten commands and should stay as small as possible to preserve token savings.

This could be implemented centrally in the hook/output path so individual filters do not need custom logic.

Acceptance criteria

  • Hint is only shown when the hook rewrites a command
  • Agent gets a clear way to recover the raw output
  • Raw fallback does not claim output was reduced
  • Existing never_worse / recovery-hint behavior is preserved
Dominant language
Rust
Stars
81.1k
Forks
5.1k
Avg merge
4d 11h
Merged PRs (30d)
40

Contributor guide

Open the contributing guide

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.