Repository navigation
test(agents): the pinned Claude Code tells the model when the date changes between turns - #889
Merged
earakely-scale merged 1 commit intoNov 23, 2026
Conversation
…anges between turns A resumed Claude Code session keeps its first turn's "Today's date is" line, and the CLI adds "The date has changed. Today's date is now ..." on its next model call once the date differs, between turns or during one. That is how the model learns an env clock's jump. An integration test downloads the CLI the Dockerfile pins, from its checksummed release manifest, and runs two turns with the bridge's own argv in time zones 26 hours apart, so a CLI that stopped telling the model fails CI. The README says how a resumed session learns the date. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
deleted the
edgararakelyan/fd-6474-claude-code-date-reminder-guard
branch
November 23, 2026 17:15
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.
Why
FD-6474 reported that on an env clock that jumps between turns, Claude Code's "Today's date is" line keeps the session's first date, so the model sees two dates. A repro on the published image says that isn't so. The 11-20 test that found it scanned only the system prompt and the first user message, and missed where the CLI announces the change.
Repro: the published
agentenv-claude-codeimage, Claude Code 2.1.322, with its clock page set by hand. I ran realclaude -pturns with the bridge's flags (--session-id, then--resume) against a stand-in endpoint that saved every request.--system-promptset: the tool-result request carries "The date has changed. Today's date is now 2200-01-01."On every request, the CLI compares today's date with the last date in the conversation, and adds the reminder when they differ.
What
tst/integration/agent/claude_code_date_test.pydownloads the Claude Code build the Dockerfile pins, from its checksummed release manifest, as the image installs it. It runs two turns with the bridge's own argv (_command) against the fake Anthropic endpoint, in time zones 26 hours apart (UTC+14, then UTC-12), so the date changes with no clock faked. It checks that the resumed turn keeps the first turn and its date line, and that it tells the model "The date has changed. Today's date is now <the second zone's date>." Bumping the CLI runs this test against the new version, so a version that stopped telling the model fails CI.Tests
🤖 Generated with Claude Code


Confidence Score: 5/5
This PR appears safe to merge.Summary
Adds a regression test for date changes in resumed Claude Code sessions.
No actionable issues found. Tests were not run during this review.
Reviews (1) · Last reviewed commit: "test(agents): the pinned Claude Code tel..." · Reviewed by Greptile