Appended system prompt lost during conversation compaction

Resolved 💬 1 comment Opened Dec 17, 2025 by pavelch Closed Dec 17, 2025

Problem

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.

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

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.

Impact

  • Custom behavior/mode instructions are silently dropped
  • Agent operating under wrong instructions post-compaction
  • No way to verify or recall what was appended

Suggested Fix

Include appended system prompt in compaction summary, or persist it separately as session metadata.

---

Real-world example: Fynanc1fy backend engineer was running with appended prompt "Fynanc1fy Backend Engineer - Conversation Mode" which specifies Brief Mode responses. After conversation compaction, agent lost access to this prompt and operated in verbose explanation mode for entire resumed session.

View original on GitHub ↗

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