Skip to content

[BUG] Context condensing triggers on settings Save during active task #4430

@hannesrudolph

Description

@hannesrudolph

Type

Bug

Problem

Saving settings during an active task immediately triggers context compression, even when the configured threshold is 100%.

Context

This affects users running long, read-heavy tasks. When the settings view is opened and Save is clicked during an active task, a context compression event occurs right away and the context shrinks, despite the context bar being well below the threshold. Environment example: GPT‑4.1 via OpenRouter with “Multi-file read (experimental)” enabled.

Reproduction

  1. Set your model to GPT‑4.1 with OpenRouter provider
  2. Enable “Multi-file read (experimental)” in settings
  3. Set context compression threshold to 100%
  4. Start a new task in a workspace with a good amount of code
  5. Enter the prompt: read 10 files at a time 8 times in a row
  6. While the task is running and the context bar is increasing, open the settings view
  7. Toggle any setting back and forth to activate the Save button (without actually changing any setting)
  8. Click Save
  9. Observe that context compression triggers immediately, regardless of actual context usage

Expected result

Context compression should only trigger when the configured threshold is reached (100% in this case). Saving settings during an active task should not cause compression by itself.

Actual result

Context compression triggers immediately upon saving settings during an active task, even when context usage is well below the threshold.

Metadata

Metadata

Assignees

Labels

Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions