copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Auto-compact on idle, aligned to the model's prompt cache TTL

Open travisbader opened this issue 2 months ago • 3 comments

Describe the feature or problem you'd like to solve

Prompt cache TTL is ~5 min. After an idle gap the next turn re-reads the full context uncached, at a cost and latency that scale with context size. Compaction only triggers on token thresholds today (#1688, #2333), so the only workaround is running /compact manually before going idle.

Proposed solution

A time-based compaction trigger, with the idle threshold tied to the active model's cache TTL.

Example prompts or workflows

No response

Additional context

No response

travisbader avatar Sep 04 '26 14:09 travisbader

This is such a great idea

masonpetrosky avatar Sep 24 '26 03:09 masonpetrosky

The equivalent feature on Claude Code is idleCompact. This is a major piece of missing functionality on Copilot CLI for effectively using Anthropic models imo.

hzarate-clgx avatar Oct 14 '26 21:10 hzarate-clgx

So good that Claude went and added it! 🤔 does Antrhopic include copilot issue threads in their autonomous raw user feedback streams?

travisbader avatar Oct 30 '26 21:10 travisbader