You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
keep Current time: anchored to the user-local timezone
move UTC onto a separate Reference UTC: line
avoid putting two competing calendar dates on the same primary time line
Why
The previous format could present two competing calendar dates on the same line, for example:
Current time: Tuesday, March 10th, 2026 — 5:49 PM (America/Los_Angeles) / 2026-03-11 00:49 UTC
In evening hours for US timezones, models can latch onto the UTC date and treat it as "today", even though the user-facing local date is still March 10.
This PR keeps UTC available for log reconciliation, but demotes it to a clearly secondary line so the local-time anchor remains unambiguous.
New format
Current time: Tuesday, March 10th, 2026 — 5:49 PM (America/Los_Angeles) Reference UTC: 2026-03-11 00:49 UTC
This PR changes the timeLine string produced by resolveCronStyleNow from a single combined line (Current time: ... (tz) / YYYY-MM-DD HH:MM UTC) to two separate lines (Current time: ...\nReference UTC: ...). The motivation — avoiding model confusion when local and UTC dates straddle midnight — is sound.
The change itself in src/agents/current-time.ts is minimal and correct. The cron isolated-agent test was updated accordingly. However, three other test files that assert on the old single-line format were not updated and will fail:
Each of these needs to be split into two separate toContain checks matching the new format.
Confidence Score: 2/5
Not safe to merge — three existing tests assert on the old combined timeLine format and will fail.
The production logic change is correct and intentional, but the PR is incomplete: memory-flush.test.ts, session-reset-prompt.test.ts, and post-compaction-context.test.ts all contain toContain(...) assertions matching the old "... / YYYY-MM-DD HH:MM UTC" format that no longer exists in the output. These tests will fail in CI without being updated.
src/auto-reply/reply/memory-flush.test.ts, src/auto-reply/reply/session-reset-prompt.test.ts, and src/auto-reply/reply/post-compaction-context.test.ts all need their timeLine format assertions updated.
Comments Outside Diff (3)
src/auto-reply/reply/memory-flush.test.ts, line 28-29 (link)
Test will fail with new timeLine format
resolveMemoryFlushPromptForRun calls resolveCronStyleNow directly and appends its timeLine to the prompt. After this PR, timeLine is now two lines separated by \n, so the old combined string "... (America/New_York) / 2026-02-16 15:00 UTC" no longer exists in the output. This toContain assertion will fail.
The test needs to be split to match the new two-line format:
src/auto-reply/reply/session-reset-prompt.test.ts, line 19-21 (link)
Test will fail with new timeLine format
buildBareSessionResetPrompt ultimately calls appendCronStyleCurrentTimeLine, which now produces a two-line timeLine. The old combined string "... (America/New_York) / 2026-03-03 14:00 UTC" will no longer be present in the prompt output. This assertion will fail.
The test needs to be updated to match the new format:
src/auto-reply/reply/post-compaction-context.test.ts, line 214-216 (link)
Test will fail with new timeLine format
readPostCompactionContext calls resolveCronStyleNow and appends the resulting timeLine to the output. After this PR, timeLine is two lines, so the single-string assertion "... (America/New_York) / 2026-03-03 14:00 UTC" will no longer match.
The test should be updated to check both lines separately:
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
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.
Summary
Current time:anchored to the user-local timezoneReference UTC:lineWhy
The previous format could present two competing calendar dates on the same line, for example:
Current time: Tuesday, March 10th, 2026 — 5:49 PM (America/Los_Angeles) / 2026-03-11 00:49 UTCIn evening hours for US timezones, models can latch onto the UTC date and treat it as "today", even though the user-facing local date is still March 10.
This PR keeps UTC available for log reconciliation, but demotes it to a clearly secondary line so the local-time anchor remains unambiguous.
New format
Current time: Tuesday, March 10th, 2026 — 5:49 PM (America/Los_Angeles)Reference UTC: 2026-03-11 00:49 UTC