feat(agent-core-v2): announce date changes via a system reminder - #2564
Merged
Conversation
|
commit: |
7Sageer
force-pushed
the
feat-date-change-reminder
branch
from
August 3, 2026 10:40
69201d9 to
e653261
Compare
7Sageer
force-pushed
the
feat-date-change-reminder
branch
from
August 3, 2026 12:20
e653261 to
c8a7e43
Compare
…nder # Conflicts: # packages/agent-core-v2/docs/state-manifest.d.ts # packages/agent-core-v2/docs/wire-manifest.d.ts # packages/agent-core-v2/src/agent/profile/profile.ts # packages/agent-core-v2/src/agent/profile/profileOps.ts # packages/agent-core-v2/src/agent/profile/profileService.ts # packages/agent-core-v2/test/agent/profile/binding.test.ts # packages/agent-core-v2/test/agent/profile/profileOps.test.ts # packages/agent-core-v2/test/app/config/config.test.ts
…nder # Conflicts: # packages/agent-core-v2/test/agent/swarm/swarm.test.ts
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.
Related Issue
No public issue — the date part of #2316 split into its own PR; the problem is explained below.
Problem
The v2 system prompt is rendered at profile bind and after compaction. In a long-lived session the rendered date therefore goes stale after midnight, and the model keeps trusting the old date.
What changed
Split out of #2316 (skill-root watching, the
skill_listreminder, plugin session-start reminders, and the cwd-change prompt refresh remain there; #2316 will be rebased once this lands).hostClockos boundary (current instant + local IANA time zone) so time-sensitive domains read the clock through DI and tests stub it at the host boundary.EnvironmentDisclosureSnapshot(cwd + disclosed local date) alongside the text: every registered profile exposes a structuredrenderSystemPrompt— registration normalizes the accepted input (AgentProfileInput: the structured renderer, the legacy text-onlysystemPrompt, or both) by deriving the missing entry, so a profile's text and its disclosure always come from the same render — and the builtin and plan profiles provide it directly while SYSTEM.md /${base_prompt}file-based profiles forward the base prompt's disclosure, so reminders never parse rendered text.profile.bind/config.updatepersist the disclosure snapshot with a monotonicrenderGeneration, so a restored agent keeps the exact baseline its prompt was rendered from.lastInjection) with itslastDisclosureand may return{ content, disclosure }; the disclosure is recorded on the injected message origin and travels with undo/clear.date_changereminder provider (Agent scope). Its baseline prefers the disclosure on the newest survivingdate_changereminder, then the persisted render-time snapshot, then an Agent-state seed for prompts that never disclose a date; each later local calendar date is announced once. The provider stays quiet while the persisted snapshot's cwd no longer matches the session cwd.Verification:
agent-core-v2: 290 test files / 4539 tests passedklientinvalid-input matrix: 19 / 19 tests passedlint:importspassed;dep-graph:lintshows no new errorsChecklist
gen-changesetsskill, or this PR needs no changeset. No changeset: experimentalagent-core-v2behavior only.gen-docsskill, or this PR needs no doc update. No doc update: experimental-engine behavior with no user-facing surface change.