Skip to content

fix: remove stale default prompt timestamp#741

Draft
ktwu01 wants to merge 1 commit into
MoonshotAI:mainfrom
ktwu01:codex/remove-stale-kimi-now
Draft

fix: remove stale default prompt timestamp#741
ktwu01 wants to merge 1 commit into
MoonshotAI:mainfrom
ktwu01:codex/remove-stale-kimi-now

Conversation

@ktwu01

@ktwu01 ktwu01 commented Jun 14, 2026

Copy link
Copy Markdown

Related Issue

Fixes #446

Problem

The default system prompt rendered KIMI_NOW into a concrete timestamp when the profile was applied. That rendered prompt is persisted in session records and replayed on resume, so resumed sessions could present an old session-creation timestamp as current context.

What changed

  • Removed the rendered timestamp from the bundled default system prompt.
  • Kept a direct instruction to use Bash when a task depends on the current date or time.
  • Added a default-profile test assertion that the rendered prompt no longer includes the supplied now value.
  • Added a changeset for @moonshot-ai/agent-core and the CLI bundle.

Validation

  • pnpm --filter @moonshot-ai/agent-core exec vitest run test/profile/default-agent-profiles.test.ts test/prompt-placeholders.test.ts
  • pnpm --filter @moonshot-ai/agent-core typecheck
  • pnpm --filter @moonshot-ai/kimi-code typecheck
  • pnpm exec oxlint --type-aware packages/agent-core/test/profile/default-agent-profiles.test.ts
  • Read-only staged diff audit for internal identifiers and secrets: clean

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jun 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: eff005c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@moonshot-ai/agent-core Patch
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

System prompt KIMI_NOW is stale on session resume — cached timestamp never refreshes

1 participant