-
Notifications
You must be signed in to change notification settings - Fork 329
Description
Description:
Currently, rtk applies a one-size-fits-all approach to context compaction and token saving. While this works great for standard queries, it becomes a major friction point during deep debugging sessions. In debugging scenarios, the tool is often too heavy-handed and removes surrounding context (like variable states, imports, or adjacent logic) that the LLM desperately needs to identify root causes.
Describe the solution you'd like
I would love to see "gates" or "profiles" introduced that allow users to control the aggressiveness of the token-saving algorithm via a CLI flag or config file.
Ideally, we could have 4 levels that represent the tradeoff between cost-saving and context-retention:
--profile heavy: Maximum token savings. Aggressive compaction. Best for general questions or isolated file reads.
--profile normal: The current default rtk behavior.
--profile soft: Moderate token savings. Retains more surrounding code and historical context.
--profile light: Minimal token savings. Prioritizes near-total context retention specifically for complex, multi-file debugging sessions.
Describe alternatives you've considered
Currently, the only alternative is to completely disable rtk or manually manage the context window when hitting complex bugs, which defeats the purpose of the tool.
Example Use Case:
When a developer enters a tough debugging loop, they could temporarily switch their environment or pass a flag:
rtk run --profile light
Once the bug is fixed, they return to --profile normal for standard feature development