Start with one question: how does the agent know the current date and time?

The problem: the model has no clock
Once training is done, the model has no live clock. “Commits from the last week,” “today’s schedule,” “was this file changed yesterday afternoon?” — every one of those judgments needs to know what “now” is. Without the time, it defaults to living in the year its training data ended. So if you tell it — how do you tell it?The most direct move: inject the time into the system prompt
The most obvious answer: add one line to the system prompt (SP) — the current time, down to the second. The reason is solid. One line, a few dozen tokens — next to the full system prompt and thousands of tokens of tool definitions, it looks negligible. Working directory, platform, and shell are already in the environment block; adding adate line feels natural.
A lot of harnesses take this path on the first try. We almost did — or used to think this way.
How it breaks: time changes, the whole prefix misses
The catch: time changes every turn, sometimes every second. The system prompt sits at the front of the request. Put time there, and every turn rewrites the start of the prefix. Tool definitions and history behind it, even if not a single byte moved, all miss — caches match on prefix; one byte changes at the front, and everything after is invalidated. A public side note: someone noticed that Claude Code had, for a stretch, been stuffing a per-request field into the system prompt, and a third-party provider’s cache hit rate fell close to zero. The main thread isn’t that someone else crashed — it’s that the intuitive path we would take ourselves has the same structure: one volatile field, at the front of the prefix. Adate line that looks cheap, multiplied by turns and requests, and what’s expensive is the whole prefix it breaks.
So why does the prefix matter so much?

- Content at the very front that changes every time is the most expensive. It keeps everything after it from hitting the cache. Time down to the second, if stuffed into the system prompt, invalidates the whole prefix every turn — system prompt, tool definitions, history, all recomputed with it.
- Content written into history and then left alone has limited impact. What you write on turn 5 is already part of the prefix by turn 6. As long as it isn’t rewritten, later turns keep hitting. The cost is mainly the first write, plus context growing turn by turn — exactly what 03 is about.
- Content attached only to the end of this request, never entering history, is never cached. It doesn’t break anyone else’s cache, but every send is a full-price input.
- Put stable content first; put changing content later. Current time doesn’t go in the system prompt; it rides along with each user message.
- Don’t rewrite what’s already in history. If you need to adjust, only change future turns.
- Precision that’s good enough is enough. Time down to the second is almost useless to the model, and it guarantees every copy differs from the last.
A quick look: what’s in one request

How MCode does it now

# Environment block in the system prompt only holds things that stay put for a session. Working directory, whether it’s a git repo, platform, shell, OS, model, locale, region, data directory — these barely change inside one session, so they sit up front and stay in the cacheable prefix. There is no current time here. In the public code this is the environment-prompt-composer family of assembly logic.
Current time goes into the <agent-context> at the start of each turn’s user message. Built by buildSlimAgentContextBlock. From turn 2 on it looks roughly like this (illustrative; field values are made up):
- Precision that’s good enough. #459 changes
datefrom second precision to minute precision (formatReminderDate). Timezone and offset stay; seconds change every turn and barely help the model. After placement is right, cut “must change every turn” precision that isn’t needed. - Don’t rewrite what’s already in history. To adjust, only change future turns. Bytes already written into
<agent-context>stay put, so the prefix you’ve built up can stand.
Looking back

- 01: don’t manage context by piling on subagents
- 02: load tool definitions on demand; don’t stuff them all into every turn
- 03: compress long history when you should; put what matters into memory
- 04: don’t make the model sit and wait — cut the “pause tax” — protecting cache lifetime
- This note: don’t let one time field sink the prefix — protecting cache hits
A short self-check for people building agents
These changes are all in the public MiniMax Code repo. Come read the code, file issues, throw bricks.