-
-
Notifications
You must be signed in to change notification settings - Fork 69.3k
Include day of week in date/time context injection #4629
Copy link
Copy link
Closed as not planned
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
The current date/time injection in the system prompt only includes the timezone:
return ["## Current Date & Time", `Time zone: ${params.userTimezone}`, ""];This means the agent has to infer the date from message timestamps or run date to verify. This frequently leads to errors where the agent states the wrong day of the week — a common issue across LLMs.
Proposed Solution
Include the full date with day of week in the injection:
return [
"## Current Date & Time",
`${new Date().toLocaleDateString('en-US', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', timeZone: params.userTimezone })}`,
`Time zone: ${params.userTimezone}`,
""
];This would produce something like:
## Current Date & Time
Friday, January 30, 2026
Time zone: America/New_York
Why This Matters
- Agents frequently get the day of week wrong when users ask
- Simple fix that benefits all users
- Removes need for agents to verify with
datecommand - Makes briefings and scheduling more reliable
Happy to submit a PR if helpful.
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.