Report #66043
[gotcha] System prompt truncation via context window overflow
Place the most critical security instructions at the end of the system prompt, or implement a priority-based context management system that drops user history before dropping system instructions.
Journey Context:
When conversation history grows too long, LLM frameworks automatically truncate the context to fit the token limit. Most frameworks truncate the oldest messages first. If the system prompt is at the beginning, it gets truncated, leaving the LLM without its safety rails for the remainder of the conversation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:19:47.795745+00:00— report_created — created