Repository navigation
Description
Editors note: The below issue text is completely generated by my Squad team lead, upon my request, when I encountered this issue when testing Squad on a local project. I have read through the issue, and it appears reasonable. But my knowledge of the details referenced are limited, so please apologize for any errors.
Summary
Spawned agents consistently write incorrect dates in documents, headings, and metadata fields. The root cause appears to be that the Squad coordinator does not pass the current date to agents in spawn prompts — leaving LLMs to infer the date from their training data, which is always wrong.
Observed behavior
Across a project where every file was created on 2026-04-11, agents wrote dates including:
July 2025January 20252025-07-172025-07-192025-07-24April 2026(correct month/year, but not the full ISO date)
The errors appeared in:
src/architecture/*.md— design docs, assessments, test reports.squad/decisions.md— the canonical decision ledger.squad/agents/*/history.md— agent learning logs.squad/state.md— squad state file- Research and analysis output files
Only a small fraction of entries had the correct date, and those appeared to be cases where the agent was explicitly given the current date as part of context (e.g. from a user message or system prompt injection).
Inconsistency
Beyond correctness, the format is inconsistent across files:
- Some files use ISO 8601:
2025-07-17 - Others use freeform:
July 2025,April 11, 2026
This inconsistency suggests different agents/sessions resolved the date in different ways, further confirming the date is being guessed rather than sourced from a reliable injection point.
Root cause hypothesis
The Squad coordinator spawn template (in squad.agent.md) includes contextual identifiers like TEAM ROOT and WORKTREE_PATH but does not include a CURRENT_DATE field. Agents therefore rely on their LLM's internal sense of "what time is it now" — which is unreliable for models with training cutoffs in the past.
The coordinator does have access to the correct current date: in Copilot CLI environments it appears in the system prompt as <current_datetime>. This value is available to the coordinator but is not forwarded to spawned agents.
This affects all three spawn templates in squad.agent.md: the standard/full template, the lightweight template, and the Scribe spawn template. The Scribe case is particularly serious: the Scribe charter template (.squad/templates/scribe-charter.md) already contains an explicit Date Format Mandate requiring Scribe to write today's date (YYYY-MM-DD) into every decision heading it merges into decisions.md. The intent to use the correct date is already there — but because Scribe is also never given the current date in its spawn prompt, it still hallucinates. This means the canonical decision ledger is the most directly impacted file.
Suggested fix
1. Inject CURRENT_DATE into all three spawn templates in squad.agent.md
The standard/full template, lightweight template, and Scribe spawn template all need the same addition:
TEAM ROOT: {team_root}
CURRENT_DATE: {YYYY-MM-DD} ← inject here, derived from <current_datetime>
WORKTREE_PATH: {worktree_path}
The coordinator should derive the value from <current_datetime> (available in Copilot CLI system prompt) and format it as YYYY-MM-DD. On surfaces where <current_datetime> is not injected, the coordinator should run date (or equivalent) to get the current date.
2. Add a date usage instruction to each spawn template
Immediately after the CURRENT_DATE line, add:
When writing dates in any document or log, always use CURRENT_DATE ({YYYY-MM-DD})
in ISO 8601 format. Never infer or guess the date.
3. Update the Scribe charter template
.squad/templates/scribe-charter.md already contains the right intent ("add today's date") but has no mechanism to know what today is. The Date Format Mandate section should be updated to reference the injected CURRENT_DATE value rather than asking Scribe to infer it:
- - If an inbox file is missing a date, add today's date (`YYYY-MM-DD`).
+ - If an inbox file is missing a date, use the CURRENT_DATE value provided in
+ your spawn prompt (`YYYY-MM-DD`). Never infer or guess the date.The same applies to the consolidated-entry heading line:
- b. Use today's date and a new heading: `### {today}: {consolidated topic} (consolidated)`
+ b. Use CURRENT_DATE and a new heading: `### {CURRENT_DATE}: {consolidated topic} (consolidated)`Impact
- Misleading audit trails — decision logs and history files carry wrong timestamps
- False historical context — agents reading old files with wrong dates may incorrectly conclude when decisions were made
- Reduced trust in documentation accuracy
Environment
- Squad version: v0.9.1 (as reported by coordinator)
- Platform: GitHub Copilot CLI (Windows)
- Models affected: All tested (Claude Opus 4.6, Claude Sonnet 4.5, Claude Haiku 4.5)
- Reproducibility: Consistent across all agents and sessions in this project
Workaround
Manually correct all dates after agent runs, or explicitly include the current date in user messages (e.g. "today is 2026-04-11"), which some agents do pick up correctly.
Activity
fix: inject CURRENT_DATE into all spawn templates (#960)
fix: inject CURRENT_DATETIME into all spawn templates (github#960)
fix: inject CURRENT_DATETIME into all spawn templates (#960)