Skip to content

Include current date and day of week in system prompt #11188

@camille-gloom

Description

@camille-gloom

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
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions