Skip to content

Tune compact-in-place prompting to avoid aggressive full replacements #236

Open

Description

@josharian

Author: redbeard0531
Channel: #shelley
Link: https://discord.com/channels/1405685085923049482/1450334528210993295/1559914998875299851


Issue

The compact-in-place feature appears to be interpreting the compaction hint too aggressively. Models (specifically tested with glm-flash) treat the hint as a strong requirement and attempt to compact immediately, often replacing most or all of the conversation rather than being surgical about what gets compacted.

Observed Behavior

  • Models treat the "time to compact" hint as a very strong request requirement
  • Compaction attempts happen immediately rather than waiting for natural breaks
  • Replacements are wholesale rather than targeted ("replace everything or nearly everything")

Suspected Root Causes

  • Model being used (glm-flash)
  • Phrasing of the compaction hint in the prompt
  • Intent/interpretation of the prompt wording

Suggested Improvements

  • Encourage the model to wrap up current operations before compacting
  • Provide periodic reminders with stronger/clearer wording
  • Potentially adjust the guidance to emphasize surgical/targeted compaction over aggressive full replacements

Context

The current compaction guidance is:

Look for dead ends, out-of-date tool outputs (superseded file reads, old
build and test logs), side quests and finished subprojects. Collapse each into
a short note that keeps what still matters: decisions, findings, paths,
commands, ids. Trim tool outputs you no longer need. Big tool inputs and
outputs are most of the context, so focus there. Compacting only a little is
fine; when unsure, leave it.

Note: Reporter mentioned they had taken time off and hadn't tested recent changes as of 2026-10-14, so this may have been addressed in the interim.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions