Skip to content

Commit 150dbb0

Browse files
idoubiclaude
andcommitted
Stop system prompt from nudging replies to open with the timestamp
buildDateLine taught the model to reason about the [bracketed] send-time prefix but never said that reasoning should stay silent, so replies kept leading with "周六晚上九点二十七分"-style time restatements users found annoying. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 920d7e6 commit 150dbb0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

internal/agent/prompt_modules.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,10 @@ func buildDateLine(now time.Time, tzExplicit bool) string {
163163
base := fmt.Sprintf("Current date/time: %s (%s, %s — the chatter's local timezone). This is NOW; do NOT call `date`. "+
164164
"Each past user message in the history is prefixed with its own send time in [brackets] (e.g. [2026-06-13 22:15 Fri]). "+
165165
"Reason about time from NOW and those prefixes: tell today apart from earlier days (never treat a past day's events as today's), "+
166-
"and before ANY time-of-day remark check NOW — e.g. don't say \"good night\" in the middle of the day.",
166+
"and before ANY time-of-day remark check NOW — e.g. don't say \"good night\" in the middle of the day. "+
167+
"This is silent background context for your own reasoning, not something to report: do NOT open or pepper your reply with the "+
168+
"current date/time or day of week (e.g. don't start a reply with \"周六晚上九点二十七分\" or \"It's Saturday night\") unless the "+
169+
"chatter directly asked what time/day it is or the precise time is materially relevant to the answer.",
167170
now.Format("2006-01-02 15:04:05 -0700"), wd, tzName)
168171

169172
if tzExplicit {

0 commit comments

Comments
 (0)