Commit Graph

1 Commits

Author SHA1 Message Date
Teknium 38929dae9f
Port from MoonshotAI/kimi-code#2564: announce date changes via a per-turn system note
The system prompt bakes in "Conversation started: <date>" and stays
byte-stable for the life of a conversation (prompt-cache invariant), so
a session running past midnight leaves the model with a stale idea of
today's date.

maybe_date_change_note() tracks the last announced date on the agent
and, on a genuine rollover, emits a one-line note delivered through the
existing gateway-notes / api_content sidecar channel — the same
byte-stable per-turn user-message path used for auto-reset notes — so
the system prompt and cache prefix are never touched. First call seeds
quietly (fresh/restored agents announce only real rollovers), matching
the source behavior.
2026-08-06 19:27:16 -07:00