@@ -387,6 +387,11 @@ describe("buildAgentSystemPrompt", () => {
387387 const prompt = buildAgentSystemPrompt ( testCase . params ) ;
388388 expect ( prompt , testCase . name ) . toContain ( "## Current Date & Time" ) ;
389389 expect ( prompt , testCase . name ) . toContain ( "Time zone: America/Chicago" ) ;
390+ if ( testCase . name === "timezone-only" ) {
391+ expect ( prompt , testCase . name ) . not . toContain ( "Day of week:" ) ;
392+ } else {
393+ expect ( prompt , testCase . name ) . toContain ( "Day of week: Monday" ) ;
394+ }
390395 }
391396 } ) ;
392397
@@ -400,8 +405,8 @@ describe("buildAgentSystemPrompt", () => {
400405 expect ( prompt ) . toContain ( "current date" ) ;
401406 } ) ;
402407
403- // The system prompt intentionally does NOT include the current date/time.
404- // Only the timezone is included, to keep the prompt stable for caching .
408+ // The system prompt intentionally does NOT include the full current date/time.
409+ // Timezone and weekday are included; full date/time is omitted for cache stability .
405410 // See: https://github.com/moltbot/moltbot/commit/66eec295b894bce8333886cfbca3b960c57c4946
406411 // Agents should use session_status or message timestamps to determine the date/time.
407412 // Related: https://github.com/moltbot/moltbot/issues/1897
@@ -420,6 +425,7 @@ describe("buildAgentSystemPrompt", () => {
420425 // https://github.com/moltbot/moltbot/issues/3658 for the preferred approach:
421426 // gateway-level timestamp injection into messages, not the system prompt.
422427 expect ( prompt ) . toContain ( "Time zone: America/Chicago" ) ;
428+ expect ( prompt ) . toContain ( "Day of week: Monday" ) ;
423429 expect ( prompt ) . not . toContain ( "Monday, January 5th, 2026" ) ;
424430 expect ( prompt ) . not . toContain ( "3:26 PM" ) ;
425431 expect ( prompt ) . not . toContain ( "15:26" ) ;
0 commit comments