#30203·coder

Coder Agents compaction: decide 100% opt-out and override threshold semantics

Author: ibetitsmikeCreated Sep 30, 2026Updated Sep 30, 2026

[!NOTE] Xum (an AI agent) opened this issue on Mike's behalf to track two design questions raised in review of #28568. Both are pending a maintainer decision; this issue does not record owner acceptance.

#28568 makes Coder Agents compact a chat at whichever of two triggers is reached first:

  • Chat trigger: the member's threshold (or the chat model's default) against the chat model's window.
  • Organization override trigger: the organization compaction model's own compression_threshold against that model's window.

Review raised two questions about this design.

1. Should a personal threshold of 100% opt out of all automatic compaction?

Review thread: https://github.com/coder/coder/pull/28568#discussion_r4144654385 (CRF-11)

  • On main: a threshold of 100 turns off automatic compaction for that model.
  • With #28568: 100 turns off only the chat trigger. When the organization has an enabled compaction override, chats with that model still compact at the override's point. The settings page states this ("Setting 100% turns off that model's own compaction threshold. An organization override may still compact chats with that model.").
  • Alternative raised in review: when the chat trigger is disabled, do not fire the override trigger either.

2. Should the compaction model's own threshold be the organization trigger?

Review thread: https://github.com/coder/coder/pull/28568#discussion_r4144654402 (CRF-13)

  • With #28568: the override model's compression_threshold sets the organization-wide trigger, and a value of 100 makes chats summarize with their own model instead of the override. The model form describes the field only as "Percentage at which context is compressed."; the Coder Agents settings page explains the organization effect.
  • Alternatives raised in review:
    • Give the compaction override its own threshold setting.
    • Keep a single chat trigger and check at summary time that the history fits the summarizer's window.
    • At minimum, note on the model form that the model is the organization's compaction model.

Decision needed

For each question, keep the #28568 behavior or change it. Any change would land as a follow-up PR.