feat(system-prompt): add formatted date with day of week#1915
Closed
tsadrakula wants to merge 1 commit intoopenclaw:mainfrom
Closed
feat(system-prompt): add formatted date with day of week#1915tsadrakula wants to merge 1 commit intoopenclaw:mainfrom
tsadrakula wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Fixes openclaw#1897 The system prompt now includes the full formatted date (e.g., "Sunday, January 25th, 2026 — 12:40 PM") above the timezone, so agents no longer have to guess what day it is. 🤖 AI-assisted: Generated with Claude Opus 4.5 📋 Testing: Lightly tested (lint passes, manual review) ✅ I understand what this code does
conroywhitney
suggested changes
Jan 29, 2026
Contributor
|
Heads up — #3658 proposes a smarter approach that preserves the caching benefit from 66eec29: Instead of re-adding the timestamp to the system prompt (which undoes the cache optimization), the gateway would inject timestamps into incoming messages for TUI/web clients — the same pattern that Discord/Telegram/Signal channel plugins already use. This keeps the system prompt stable/cacheable while giving agents timestamp context from every message. Seems like the better path forward vs. reverting the optimization. See also: the idea of adding a |
Author
|
Closing in favor of #3677 |
Open
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1897
The system prompt now includes the full formatted date (e.g., "Sunday, January 25th, 2026 — 12:40 PM") above the timezone, so agents no longer have to guess what day it is.
Changes
buildTimeSection()insrc/agents/system-prompt.tsto accept and displayuserTimeuserTimevalue was already being computed byformatUserTime()— it just wasn't being passed throughBefore
After
AI Disclosure
Testing
npm run lint✅ passes