Repository navigation
chore(agent-core-v2): slim prompts and reminders - #4521
Conversation
🦋 Changeset detectedLatest commit: cee5a7e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fbccf610ff
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| agents_section: | ||
| agentsMd.length > 0 || options.readOnly !== true | ||
| ? renderPrompt(PROJECT_INFORMATION_SECTION, { |
There was a problem hiding this comment.
Preserve scoped AGENTS.md discovery for read-only profiles
When Explore or Plan starts at a cwd with no applicable AGENTS.md but investigates a subtree that has one, this condition removes the entire Project information section, including the instruction to discover more-specific files. Initial loading only walks cwd ancestors (agent/profile/context.ts:195-205), while the later discovery reminder says to read them only “before making changes” (agentsMdReminderService.ts:350-355), which does not direct these read-only profiles to apply them while analyzing or planning. Such subagents can therefore silently return findings or plans that violate the target subtree's rules; retain the discovery instruction even when the initially rendered content is empty.
AGENTS.md reference: AGENTS.md:L119-L121
Useful? React with 👍 / 👎.
| "@moonshot-ai/kimi-code": patch | ||
| --- | ||
|
|
||
| Shorten built-in tool and subagent prompts. |
There was a problem hiding this comment.
Name the removed behaviors in both changesets
For users of Edit and Goal mode, this generic release note—and the equivalent line in .changeset/slim-goal-plan-reminders.md—does not disclose the actual losses: Edit no longer requires a fresh Read, and stable Goal turns no longer repeat the full completion/blocked audit. These are user-visible prompt behaviors without restoration switches, so the changesets need to name what users lose rather than describing the change only as shortening prompts.
AGENTS.md reference: AGENTS.md:L115-L117
Useful? React with 👍 / 👎.
| When the requested time is approximate, avoid minute 0 and 30 so fires from many users do not land at once: "around 9" → `57 8 * * *`, "hourly" → `7 * * * *`. | ||
|
|
||
| ## One-shot tasks (recurring: false) | ||
| Tasks fire only while this session is alive and idle, and never carry over to a new session. Missed fires collapse into one delivery with `coalescedCount` > 1: act on the latest state once. The final fire carries `stale="true"`, so call CronCreate again with the same `cron` and `prompt` if the schedule is still wanted. |
There was a problem hiding this comment.
Limit final-fire guidance to recurring cron tasks
For a one-shot reminder (recurring=false), processDue skips coalescing and isStaleAt always returns false, so its only fire has coalescedCount="1" and stale="false" before the task is deleted. This new sentence presents both coalescing and stale="true" as properties of every task, which gives Cron users and the model an incorrect lifecycle contract for one-shots; qualify these behaviors as recurring-task behavior and state separately that one-shots fire once and auto-delete without becoming stale.
AGENTS.md reference: AGENTS.md:L119-L121
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Sets `@moonshot-ai/kimi-code` to 2.4.1 and carries the upstream changelog entries for the release: the Read output cap (MoonshotAI#4553), the shortened tool and subagent prompts (MoonshotAI#4521), and the shortened goal and plan-mode reminders (MoonshotAI#4521). This fork follows upstream versions and does not publish on its own; these entries record what upstream shipped, and the fork's own patch stream keeps its changesets until a release consumes them.
Requirement or Bug
将 #4466、#4476、#4483、#4518 合并为一个发布 PR,精简工具、system prompt 与 Goal / Plan 提醒,降低长会话的 prompt 开销。
Bug Reproduction Steps
N/A
Root Cause
N/A
Code Changes
不 rebase 原 stacked 分支;从
release/2026-10-29新建分支,以 squash merge 收拢四个 PR 的最终内容。不包含无关的 #4457;release 已有 #4456 的等价提交。Behavior Changes and Affected Users
受影响人群:TUI、print、desktop / web、VS Code、ACP、SDK 中接收内置提示词的会话;Goal / Plan 的 full / sparse 变化只影响使用对应模式的会话,Tower 动态提醒不在范围内。
以下行为变化与逐句承接关系沿用已审查的 #4466、#4476、#4483、#4518;本 PR 没有新增超出这四个 PR 的产品行为。
bashAutoBackgroundOnTimeout与后台能力判定不变;执行行为不变buildMediaNote、参数 schema 与运行时错误保留具体指引formatTaskRecord与实际返回承接;等待与通知机制不变ExitPlanModeschema 与普通权限规则仍保留参数结构、配置键、环境变量、kap-server API、工具执行状态机与 cron 调度未修改。Goal 的
origin.disclosure新增用于恢复 full / sparse 选择的状态;旧会话没有 disclosure 时按需要 full 处理。测试与覆盖:
foreground subagent times outbase 30 秒超时,本 PR 未改该路径agent-core-v2typecheckpnpm lintCLEANgit diff --check通过Checklist
/approve).gen-changesetsskill, retaining the two confirmed changesets from the stacked PRs.gen-docsskill, or this PR needs no doc update.