[BUG] Appended system prompt lost during conversation compaction

Resolved 💬 3 comments Opened Dec 17, 2025 by pavelch Closed Dec 21, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Title: Appended system prompt lost during conversation compaction

Description:

When a conversation reaches context limits and is compacted, the --append-system-prompt content is not preserved in the session summary. Upon resumption, the appended prompt is missing from the agent's context.

What Should Happen?

Expected Behavior:

Appended system prompts should survive compaction and be available in resumed sessions.

Actual Behavior:

Appended system prompts are lost. Agent has no visibility into custom instructions that were provided at session start.

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce:

  1. Start session with: claude --append-system-prompt "<custom_prompt>" --continue
  2. Run long conversation until automatic compaction triggered
  3. Session resumes with compacted context
  4. Agent cannot recall or access the appended system prompt

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.71

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗