Custom instructions are lost across context compaction with no signal to the user

Status Open
Maintainer reply None cached
Activity 1 comment · opened Sep 23, 2026

Summary

When a long conversation is summarised for context management, project instruction files and memory files are not re-loaded. The model continues from a lossy summary and silently stops honouring rules that exist only in those files.

What happens

On at least two occasions a session resumed from a compaction summary and the model never re-ran its session-start instruction load. It then violated rules present in the instruction files but absent from the summary - read the whole thread, zero autonomy, no unauthorised writes - while believing it was operating normally.

In one case the answer to the user's question was already written in the memory directory. The model re-derived it incorrectly and contradicted the recorded conclusion, then produced two further unrelated false statements in the same session, both refutable in seconds from version-control history.

Why this matters

Compaction is invisible to the user. From the outside the assistant simply becomes less compliant partway through a long session, with no event to point at. Any workflow that depends on persistent instructions degrades silently, and long sessions are exactly where these workflows live.

Expected

Treat a compaction boundary as a session boundary for instruction loading: re-read project instruction and memory files rather than inheriting them through a summary. Surface the compaction event to the user.

Environment

  • Claude Code CLI, Opus-class model, paid subscription
  • Long sessions (6-8h) reviewing pull requests on an open-source cloud-service emulator
  • Custom instructions supplied in both a project instruction file and a persistent memory directory, loaded automatically at session start
  • Incidents are taken from transcripts recorded as they happened across three consecutive sessions, within a 90-day pattern

---

Co-authored with Claude Code.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗