Skip to content

fix(coding-agent): use local date in system prompt#4643

Open
paralin wants to merge 2 commits into
can1357:mainfrom
paralin:upstream-pr/local-date-prompt
Open

fix(coding-agent): use local date in system prompt#4643
paralin wants to merge 2 commits into
can1357:mainfrom
paralin:upstream-pr/local-date-prompt

Conversation

@paralin

@paralin paralin commented Jul 5, 2026

Copy link
Copy Markdown

Builds system prompt date text from the local timezone instead of UTC so date-sensitive agent guidance matches the operator's local day.

Signed-off-by: Christian Stewart <christian@aperture.us>
@github-actions github-actions Bot added the vouched Passed the vouch gate label Jul 5, 2026
@roboomp roboomp added agent Agent runtime planning and orchestration fix prompting Prompt templates and prompt assembly review:p0 triaged labels Jul 5, 2026

@roboomp roboomp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review:p0 was applied during triage for the small, coherent production fix, but detailed review found a blocking test determinism issue: both new timezone tests mutate process.env.TZ after Bun startup, so they fail or exercise the wrong timezone on UTC CI.

Also missing packages/coding-agent/CHANGELOG.md ## [Unreleased] coverage for the user-visible prompt behavior change.

Verification: bun test packages/coding-agent/test/system-prompt-model.test.ts packages/coding-agent/test/agent-session-tool-rebuild-skip.test.ts currently aborts before test execution because packages/coding-agent/src/export/html/tool-views.generated.js is absent in this worktree; separately verified in Bun that changing process.env.TZ at runtime leaves Date#getMonth/getDate on the process-start timezone.

Thanks for the focused fix.

Comment thread packages/coding-agent/test/system-prompt-model.test.ts Outdated
Comment thread packages/coding-agent/test/agent-session-tool-rebuild-skip.test.ts Outdated
Comment thread packages/coding-agent/src/utils/local-date.ts
Signed-off-by: Christian Stewart <christian@aperture.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Agent runtime planning and orchestration fix prompting Prompt templates and prompt assembly review:p0 triaged vouched Passed the vouch gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants