Skip to content

chore: sync release/2026-10-25 (2.3.2) back to main - #4387

Merged
liruifengv merged 4 commits into
MoonshotAI:mainfrom
kimi-agent-bot:chore/sync-release-2026-10-25-back-to-main
Oct 26, 2026
Merged

liruifengv merged 4 commits into
MoonshotAI:mainfrom
kimi-agent-bot:chore/sync-release-2026-10-25-back-to-main

Conversation

@kimi-agent-bot

@kimi-agent-bot kimi-agent-bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Related Issue

N/A — post-release branch maintenance

Problem

The 2.3.2 patch release shipped from release/2026-10-25; main needs the version bump, CHANGELOG, and release-only fixes back so the next cycle's changesets baseline does not drift from the published release.

What changed

Cherry-picked the three release-branch commits not on main, oldest first:

Skipped as redundant: e79422a (test isolation cherry-pick of #4363, already on main as 087db85) and 00e7007 (changeset wording clarification — the file is deleted by the version commit anyway; the clarified text lands in CHANGELOG.md).

Conflict resolution notes:

  • The 2 changeset files arrive with the fix commits and are deleted again by the version commit — net zero, they must not be re-consumed on main.
  • enter-plan-mode.md edit from fix(agent-core-v2): launch subagents only on explicit request #4386 kept deleted: main's feat(agent-core-v2): leave Plan mode to the user and review every plan #4247 removed the EnterPlanMode tool entirely, so the nudge removal has no target.
  • Inline snapshots / token-count assertions in fullCompaction.test.ts, loop.test.ts, tool.test.ts conflicted with main's diverged expectations; kept main's side, then regenerated from the merged code (vitest run -u) in a follow-up commit. Affected suites: 351 tests pass.
  • Plugin manager test failures seen locally are environmental (no zip binary / direct GitHub access on the release machine), unrelated to this PR.
  • apps/kimi-code/package.json: only the version field comes from the release branch (2.3.2); main's own changes untouched.
  • Do not merge until the release broadcast is done — back-sync merges last in the release checklist, same day.

Prompt-impact inventory

This back-sync carries the prompt behavior already reviewed and released in #4384 and #4386; it does not introduce another prompt rewrite beyond those commits and the conflict resolutions above.

Surface and recipient population Removed or changed nudge; who relied on it Current constraint and escape hatch
app/agentProfileCatalog/system.md: shared system prompt, behaviorally relevant to main or custom profiles that expose Agent across TUI, print, desktop/web, VS Code, ACP, and SDK sessions The old default let the model choose proactive delegation from task size, depth, or research needs. Users who relied on automatic parallelism or keeping intermediate files out of the main context are affected. The new rule permits Agent only when the user, AGENTS.md, or a skill asks, or when the user enabled a multi-agent mode such as swarm/tower. Task size and thoroughness are not authorization. Built-in coder/explore subagents do not expose Agent, so their own role prompts are unaffected.
agent/tools/agent/agent.md: every main/custom agent offered the Agent tool Removed Delegating also keeps the bulk of intermediate file contents out of your own context…, which encouraged delegation for context savings. The new explicit-authorization paragraph is the constraint. Users can still request delegation directly or encode it in AGENTS.md/a skill; resuming already-authorized work needs no new request.
agent/tools/agent/agent.md: same recipients Removed When NOT to use Agent… it pays off only when the task is substantial enough…; this discouraged trivial delegation but also implied that a sufficiently large task authorized it. Authorization no longer depends on task size. Explicitly requested small tasks remain allowed; unrequested large/research tasks are handled by the main agent.
session/agentLifecycle/profile/profiles.ts (explore.whenToUse) and custom agent description/whenToUse text Removed the explore nudges more than 3 search queries and Prefer launching multiple explore agents concurrently…. Users who relied on automatic explore fan-out, or on custom text such as use proactively, are affected. Type descriptions now only help choose an agent after launching is authorized; they do not themselves authorize launching. The system/Agent rules above supply the constraint.
features/swarm/tools/agent-swarm/agent-swarm.md: main agents offered AgentSwarm Previously the model could call it while swarm mode was off and thereby start a swarm. The prompt now says only the user can enable swarm mode. AgentSwarmTool.resolveExecution/execution and AgentSwarmService.enter('tool') enforce rejection before subagents start. User-enabled /swarm, desktop/web controls, and SDK manual/task entry remain available; print/ACP have no swarm-enable entry and custom subagents cannot nest a swarm, as explicitly accepted for the hotfix.
features/swarm/agent/exit-reminder.md: sessions leaving a manual or one-task swarm Removed the permission to call AgentSwarm again merely because the next request could benefit from parallel subagents; post-swarm users who relied on that automatic continuation are affected. The added sentence also prevents switching to ordinary Agent delegation without a new explicit request. The reminder now requires the user to turn swarm mode back on and requires explicit authorization for Agent; the execution-layer rejection is the backstop.
features/plan/tools/enter-plan-mode/enter-plan-mode.md on the release branch #4386 removed the instruction to investigate first with Agent(subagent_type="explore"), affecting plan-mode users who relied on automatic exploration. There is no recipient left on main: #4247 already removed EnterPlanMode and its prompt. The back-sync therefore correctly keeps the file deleted; plan-mode exploration follows main's existing tools and explicit-authorization rule.

User-enabled swarm/tower mode still counts as authorization for Agent, and tower's resume flow is unchanged. For old wires, engine replay and transcript folding ignore unmatched swarm_mode.enter records with trigger: 'tool', while user-triggered enter/exit behavior remains intact.

Review follow-up

  • [Bug] vis reports legacy tool-triggered swarm sessions as active #4395 tracks the independent vis-only projection mismatch for those legacy tool-triggered records. The vis projector and its test are unchanged by this back-sync and were not part of the released hotfix, so that fix is deliberately left to a separate PR instead of adding new behavior here.

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. (N/A — release back-sync; existing suites regenerated and passing)
  • Ran gen-changesets skill, or this PR needs no changeset. (No changeset — consumed ones must not return)
  • Ran gen-docs skill, or this PR needs no doc update. (Docs changelog rides in the separate sync PR)

kimi-agent-bot and others added 4 commits October 25, 2026 16:01
* fix(agent-core-v2): leave swarm mode to the user

AgentSwarm now runs only while swarm mode is on, and only the user can
turn swarm mode on, so the model can no longer start a swarm by itself.

- Reject AgentSwarm at resolve time while swarm mode is off and check
  again right before it runs; no subagents start and swarm mode stays off.
- Stop AgentSwarm from entering swarm mode, reject the tool trigger, and
  ignore tool-triggered entries that older versions recorded on replay.
- Skip the one-AgentSwarm-per-response veto while swarm mode is off so
  the other tools in that response still run.
- Say in the AgentSwarm description and the swarm exit reminder that only
  the user can turn swarm mode on.
- Update the tools and slash-command reference docs.

* fix(transcript): ignore model-started swarm entries when folding history

Swarm mode entries with the tool trigger come only from older versions,
where the model started a swarm by itself. The engine already ignores
them on replay, so a session that stopped mid-swarm resumes with swarm
mode off. Folding history still marked swarm mode on from that entry,
and no later status update turned it off, so the web UI kept showing
swarm mode as on.

Keep the swarm.enter marker in history, but leave meta.modes untouched
for tool-triggered entries.
# Conflicts:
#	packages/agent-core-v2/test/agent/fullCompaction/fullCompaction.test.ts
#	packages/agent-core-v2/test/agent/loop/loop.test.ts
#	packages/agent-core-v2/test/tool/tool.test.ts
…otAI#4386)

The main agent launched subagents on its own: the explore type told it to
delegate any exploration needing more than three searches and to run several
explore agents at once, the Agent description sold delegation, and the
EnterPlanMode description sent plan mode to an explore subagent first.

- Agent description: launch a subagent only when the user asks for one, or
  AGENTS.md, a skill, or a multi-agent mode the user turned on calls for it;
  agent type descriptions only pick a type once launching is authorized.
- System prompt: state the same rule for Agent.
- Drop the delegation nudges from the Agent and explore descriptions and from
  the EnterPlanMode description.
- Swarm exit reminder: once swarm mode ends, handle the next request without
  subagents unless it asks for them.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Oct 25, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9e05d23

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T09:03:27.865060Z 9e05d23 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Oct 25, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@9e05d23
npx https://pkg.pr.new/@moonshot-ai/kimi-code@9e05d23

commit: 9e05d23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9e05d23218

ℹ️ 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".

creatiVision added a commit to creatiVision/kimi-code that referenced this pull request Oct 25, 2026
@liruifengv
liruifengv merged commit 1011d8b into MoonshotAI:main Oct 26, 2026
18 checks passed
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.

3 participants