claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[FEATURE] Context configuration

Open aewing opened this issue 1 month ago • 4 comments

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

I want to be able to customize the guidance and model used for compaction operations (and would prefer the option to do them myself programmatically via plugin) as they are not necessary with my tooling, hooks do not have the desired impact, and I am getting tired of manually compacting.

Proposed Solution

  1. onRequestCompaction hook/plugin integration where I can choose to cancel/prevent compaction and stop generation, override the model/provider and/or guidance statement used during compaction, or return the result of a custom compaction solution.
  2. compaction.model, compaction.guidance, compaction.targetLength, compaction.maxLength, compaction.truncationMethod (or equivalent) options to allow me to delegate the compaction to a specific model with custom instructions and requirements, a chosen heuristic for fallback.

Alternative Solutions

Manual compaction guidance, slow compaction, wasted context space.

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

Example scenario:

  1. I am working with tooling that knows which files I changed and can produce heuristics to very quickly and easily provide higher quality context in a fraction of the time
  2. Automatic compaction occurs
  3. My plugin intercepts, provides the heuristic solution
  4. Context smol, Claude happy
  5. AGI achieved internally

Additional Context

<3

aewing avatar Dec 19 '25 03:12 aewing

This would continue to build on the work done in https://github.com/anthropics/claude-code/issues/5643 and would allow users and the community to iterate on solutions to address the similar but less specific proposals from https://github.com/anthropics/claude-code/issues/8656 etc...

aewing avatar Dec 19 '25 03:12 aewing

This is similar to my request #14585

selkordy avatar Dec 19 '25 04:12 selkordy

This is similar to my request #14585

Similar in that it would enable it, yes (the feature you described is among what I have built for which I need this, ironically).

aewing avatar Dec 19 '25 04:12 aewing

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Jan 18 '26 10:01 github-actions[bot]

This is a feature request and is still relevant.

aewing avatar Jan 19 '26 09:01 aewing