Skip to content

Feature Request: Configurable context reduction profiles (heavy, normal, soft, light) #488

@ejaramillompg

Description

@ejaramillompg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions