Appended system prompt lost during conversation compaction
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
- Start session with:
claude --append-system-prompt "<custom_prompt>" --continue - Run long conversation until automatic compaction triggered
- Session resumes with compacted context
- 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.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗