Skip to content

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

Description

@travisbader

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:context-memoryContext window, memory, compaction, checkpoints, and instruction loadingarea:modelsModel selection, availability, switching, rate limits, and model-specific behavior

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions