-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
Include current date and day of week in system prompt #11188
Copy link
Copy link
Closed as not planned
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
The system prompt currently only includes the timezone in the "Current Date & Time" section:
## Current Date & Time
Time zone: America/New_York
This makes it difficult for the model to know what day of the week it is without calling session_status or calculating from message timestamps.
Proposal
Include the full formatted datetime with day of week:
## Current Date & Time
Saturday, February 7, 2026 at 9:30 AM
Time zone: America/New_York
Implementation
Simple change to buildTimeSection in agents/system-prompt.js:
function buildTimeSection(params) {
if (!params.userTimezone)
return [];
const now = new Date();
const formatter = new Intl.DateTimeFormat('en-US', {
timeZone: params.userTimezone,
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric',
hour: 'numeric',
minute: '2-digit',
hour12: true
});
const currentTime = formatter.format(now);
return ["## Current Date & Time", currentTime, `Time zone: ${params.userTimezone}`, ""];
}Tradeoffs
- Pro: Model always knows the current day/time without tool calls
- Con: Slightly reduces prompt cache hit rate since time changes
Could make this opt-in via config if cache stability is a concern:
{
"agents": {
"defaults": {
"includeCurrentTime": true
}
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Fields
Give feedbackNo fields configured for issues without a type.