Feature Request: Configurable context reduction profiles (heavy, normal, soft, light)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 81.1k
- Forks
- 5.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 35
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue requests a new --profile flag or configuration setting with heavy, normal, soft, and light modes, but names no source files, tests, or entry points. Start by locating the current context-compaction and token-saving configuration and CLI parsing; done means the four profiles are selectable for rtk run and normal preserves current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100