Repository navigation
fix: inject CURRENT_DATETIME into all spawn templates (#960) - #961
Merged
Merged
Conversation
Agents spawned by the coordinator get a fresh LLM session with no
date context. The platform injects <current_datetime> into the
coordinator's session, but this was never forwarded to sub-agents.
Adds CURRENT_DATE: {current_datetime} to:
- Lightweight spawn template
- Full spawn template
- Scribe spawn template
- Explore agent inline prompt
Closes #960
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Squad coordinator spawn prompt instructions to include a CURRENT_DATE field so spawned sub-agents can reference “today” from the prompt context instead of inferring it.
Changes:
- Added
CURRENT_DATE: {current_datetime}to the Lightweight spawn template. - Added
CURRENT_DATE: {current_datetime}to the general “Template for any agent”. - Added
CURRENT_DATE: {current_datetime}to the Scribe spawn template and updated the explore-agent one-liner to include it.
Comment on lines
330
to
334
| prompt: | | ||
| You are {Name}, the {Role} on this project. | ||
| TEAM ROOT: {team_root} | ||
| CURRENT_DATE: {current_datetime} | ||
| WORKTREE_PATH: {worktree_path} |
| prompt: | | ||
| You are {Name}, the {Role} on this project. | ||
| TEAM ROOT: {team_root} | ||
| CURRENT_DATE: {current_datetime} |
Comment on lines
351
to
353
|
|
||
| For read-only queries, use the explore agent: `agent_type: "explore"` with `"You are {Name}, the {Role}. {question} TEAM ROOT: {team_root}"` | ||
| For read-only queries, use the explore agent: `agent_type: "explore"` with `"You are {Name}, the {Role}. CURRENT_DATE: {current_datetime}. {question} TEAM ROOT: {team_root}"` | ||
|
|
| {paste contents of .squad/agents/{name}/charter.md here} | ||
|
|
||
| TEAM ROOT: {team_root} | ||
| CURRENT_DATE: {current_datetime} |
| prompt: | | ||
| You are the Scribe. Read .squad/agents/scribe/charter.md. | ||
| TEAM ROOT: {team_root} | ||
| CURRENT_DATE: {current_datetime} |
Addresses review feedback from copilot-pull-request-reviewer: 1. Renamed CURRENT_DATE to CURRENT_DATETIME (value is full ISO timestamp) 2. Fixed explore inline trailing punctuation 3. Synced canonical .squad-templates/ and all 3 .template copies 4. Verified byte-for-byte parity across all 5 files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…e guard
Q found 3 gaps in the CURRENT_DATETIME fix:
1. Added explicit 'pass current datetime' instruction to coordinator's
'On every session start' block (line 107), parallel to team_root
2. Updated scribe-charter.md to use CURRENT_DATETIME instead of
'today's date' / '{today}' for decision consolidation headings
3. Added DATES warning to full spawn template: agents must use
CURRENT_DATETIME, never infer or guess dates
All 9 affected files synced via sync-templates.mjs.
Zero leftover CURRENT_DATE references (verified by grep).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Injects CURRENT_DATETIME into every spawn template so sub-agents know the real date/time.
Why
Closes #960 — agents spawned by the coordinator get a fresh LLM session with no date context. The platform injects <current_datetime>\ into the coordinator session, but this was never forwarded to sub-agents. Result: agents hallucinate dates.
Changes
Files (9 total)
Prompt-only change — zero runtime code impact.