-
-
Notifications
You must be signed in to change notification settings - Fork 69k
Agents don't know the current date on /new, /reset, or post-compaction — YYYY-MM-DD in AGENTS.md is literal, not substituted #32363
Copy link
Copy link
Closed
Description
Problem
The default AGENTS.md template instructs agents to read memory/YYYY-MM-DD.md (today + yesterday) at session startup. However, YYYY-MM-DD is literal text — there is no runtime substitution in the bootstrap/session-startup flow.
The system prompt provides the user's timezone but never the current date. As a result, agents guess the date based on their training cutoff (e.g., Claude Sonnet 4.6 guesses ~July 2025 when the actual date is March 2026).
Where substitution DOES work
memoryFlushprompt —YYYY-MM-DDis replaced with the actual date viareplaceAll("YYYY-MM-DD", dateStamp)(confirmed in source)- Heartbeat — the date is injected in the heartbeat time section
Where it does NOT work
/new—BARE_SESSION_RESET_PROMPTre-reads Session Startup from AGENTS.md, agent sees literalYYYY-MM-DD/reset— same path- Post-compaction —
post-compaction-context.tsextracts Session Startup, same literal text - First session — initial bootstrap, same literal text
Observed behavior
- Agents with many daily notes (e.g., main agent) can work around this by listing
memory/directory and inferring the date from filenames - Agents with few or no daily notes guess wrong consistently
- Tested across multiple agents on the same instance — all agents without daily note history fail to determine the correct date
Expected behavior
The current date should be available to agents at session startup, either by:
- Injecting the date into the system prompt (like timezone already is), or
- Performing runtime
YYYY-MM-DDsubstitution in AGENTS.md at bootstrap, or - Exposing a
session_status/datetool that agents can call
Environment
- OpenClaw 2026.3.1
- Model: Anthropic Claude Sonnet 4.6
- VPS (Ubuntu), single-agent and multi-agent setup
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.