Skip to content

feat: replace transcript entirely during compaction#7

Merged
bhaktatejas922 merged 1 commit intomainfrom
feat/replace-transcript-for-compaction
Apr 13, 2026
Merged

feat: replace transcript entirely during compaction#7
bhaktatejas922 merged 1 commit intomainfrom
feat/replace-transcript-for-compaction

Conversation

@DhruvBhatia0
Copy link
Copy Markdown
Collaborator

Summary

  • Instead of appending an override message to the transcript, replaces the entire transcript with only the override user/assistant pair during PreCompact
  • The compaction model now sees nothing but the "output this exact text" instruction, making suppression more reliable
  • Original transcript is backed up in state and restored during SessionStart so Claude Code retains full conversation history

Test plan

  • Install local plugin version, trigger compaction (manual or automatic), verify Morph summary is injected correctly
  • Verify conversation history is preserved after compaction completes

🤖 Generated with Claude Code

Instead of appending an override message to the transcript (which still
lets the compaction model see all original messages), replace the entire
transcript with only the override user/assistant pair. The original
transcript is backed up in state and restored during SessionStart so
Claude Code retains full conversation history.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bhaktatejas922 bhaktatejas922 merged commit 94c6399 into main Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants