0a9d84dd07
When context compression triggers, the SUMMARY_PREFIX instructs the model to treat the summary as 'background reference, NOT as active instructions'. This causes the agent to ignore its persistent memory (MEMORY.md, USER.md) after compaction + session resume, because memory is part of the system prompt that gets the same demotion. Changes: - SUMMARY_PREFIX: Added explicit note that persistent memory is ALWAYS authoritative and must never be deprioritized by compaction notes. - System prompt compression note: Added reminder that memory remains fully authoritative regardless of compaction. - build_memory_context_block: Changed 'informational background data' to 'authoritative reference data' to align with memory's actual role. - _INTERNAL_NOTE_RE: Updated regex to match both old and new wording (backward compatible with existing sessions). Fixes NousResearch/hermes-agent#17251