fix: update system prompt metadata label to "System prompt last recompiled" (#9477)

fix: update system prompt metadata label from "Memory blocks were last modified" to "System prompt last recompiled"

When git-based memory is enabled, there are no memory blocks, so the label
"Memory blocks were last modified" is inaccurate. Changed to
"System prompt last recompiled" which accurately reflects the timestamp meaning.

Fixes #9476



🐾 Generated with [Letta Code](https://letta.com)

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
github-actions[bot]
2026-02-12 18:27:35 -08:00
committed by Caren Thomas
parent f55ff3a822
commit 0b08164cc2
2 changed files with 5 additions and 5 deletions

View File

@@ -32,7 +32,7 @@ class PromptGenerator:
is available through its tools.
Args:
memory_edit_timestamp: When memory blocks were last modified
memory_edit_timestamp: When the system prompt was last recompiled
timezone: The timezone to use for formatting timestamps (e.g., 'America/Los_Angeles')
previous_message_count: Number of messages in recall memory (conversation history)
archival_memory_size: Number of items in archival memory (long-term storage)
@@ -44,7 +44,7 @@ class PromptGenerator:
Example Output:
<memory_metadata>
- The current time is: 2024-01-15 10:30 AM PST
- Memory blocks were last modified: 2024-01-15 09:00 AM PST
- System prompt last recompiled: 2024-01-15 09:00 AM PST
- 42 previous messages between you and the user are stored in recall memory (use tools to access them)
- 156 total memories you created are stored in archival memory (use tools to access them)
- Available archival memory tags: project_x, meeting_notes, research, ideas
@@ -57,7 +57,7 @@ class PromptGenerator:
metadata_lines = [
"<memory_metadata>",
f"- The current system date is: {get_local_time_fast(timezone)}",
f"- Memory blocks were last modified: {timestamp_str}",
f"- System prompt last recompiled: {timestamp_str}",
f"- {previous_message_count} previous messages between you and the user are stored in recall memory (use tools to access them)",
]

View File

@@ -682,7 +682,7 @@ async def test_anthropic_system_prompt_stability(async_client: AsyncLetta):
logger.info(diff_output[:2000]) # Truncate if too long
logger.info("=" * 80)
if "Memory blocks were last modified" in diff_output:
if "System prompt last recompiled" in diff_output:
logger.error("⚠️ TIMESTAMP IS CHANGING IN ACTUAL REQUESTS!")
logger.error(" → This is the root cause of cache misses")
@@ -1054,7 +1054,7 @@ async def test_gemini_request_prefix_stability(async_client: AsyncLetta):
lineterm="",
)
diff_output = "\n".join(diff)
if "Memory blocks were last modified" in diff_output or "timestamp" in diff_output.lower():
if "System prompt last recompiled" in diff_output or "timestamp" in diff_output.lower():
logger.error("⚠️ TIMESTAMP IN SYSTEM INSTRUCTION IS CHANGING!")
logger.error(" → This breaks Gemini implicit caching (prefix must match)")
else: