Skip to content

Context compaction loses CLAUDE.md guidelines #19736

Closed as duplicate
Closed as duplicate

Description

@orlinkata

Description

After conversation compaction (when context runs out and gets summarized), Claude loses project-specific instructions from CLAUDE.md.

Observed Behavior

After compaction, Claude forgot:

  1. Co-Authored-By should NOT be added to commits (project rule in CLAUDE.md)
  2. Output for Azure DevOps must be in Markdown format

The compaction summary captured the task progress but lost the behavioral rules from CLAUDE.md.

Expected Behavior

CLAUDE.md guidelines should be preserved across compaction, either by:

  • Including key CLAUDE.md rules in the compaction summary
  • Re-reading CLAUDE.md after compaction
  • Flagging critical rules separately from conversation history

Environment

  • Claude Code CLI
  • Windows 11
  • Git Bash terminal

Activity

  1. github-actions commented on Jan 21, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. [BUG] Claude forgets everything in CLAUDE.md after compaction #6354
    2. [BUG] CLAUDE.md instructions completely ignored after context compaction #19471
    3. [🤖 Sonnet 4.5] CLAUDE.md explicit "no auto-commit" rule violated when session resumed from context summary #12068

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. github-actions commented on Jan 30, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  3. locked as resolved and limited conversation to collaborators on Jan 30, 2026
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:corebugSomething isn't workinghas reproHas detailed reproduction stepsmemoryplatform:windowsIssue specifically occurs on Windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions