Skip to content

fix: compute Ask AI's "today's date" per request 📅 - #921

Open
jehron wants to merge 1 commit into
mainfrom
claude/lucid-ramanujan-rc7wz8
Open

jehron wants to merge 1 commit into
mainfrom
claude/lucid-ramanujan-rc7wz8

Conversation

@jehron

@jehron jehron commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Description ✏️

Closes #905

Ask AI's "today's date" was baked into the module-level MEMBER_PROFILE_SYSTEM_PROMPT, so it was evaluated once at module load and went stale on long-running servers.

  • Moves the date into the per-request user prompt via a new buildMemberProfileUserPrompt helper (packages/core/src/modules/slack/slack.prompts.ts), so it's computed on every request.
  • Keeps the cached system prompt (cache: true) identical across requests.
  • Adds unit tests that mock the clock to verify the date updates between calls.

Type of Change 🐞

  • Feature - A non-breaking change which adds functionality.
  • Fix - A non-breaking change which fixes an issue.
  • Refactor - A change that neither fixes a bug nor adds a feature.
  • Documentation - A change only to in-code or markdown documentation.
  • Tests - A change that adds missing unit/integration tests.
  • Chore - A change that is likely none of the above.

Checklist ✅

  • I have done a self-review of my code.
  • I have manually tested my code (if applicable).
  • I have added/updated any relevant documentation (if applicable).

Generated by Claude Code

The date was baked into a module-level system prompt, so it was only
evaluated once at module load and went stale on long-running servers.
Move it into the per-request user prompt (which also keeps the cached
system prompt identical across requests) and add tests.

Closes #905

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SeNNnD6fi8kuFAKUUbkn9Q

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ask ai uses a stale "today's date" in its prompt

2 participants