kimi-plugin-cc 2.5.8 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +19 -0
  4. package/README.md +29 -13
  5. package/agents/kimi-swarm-write.md +6 -4
  6. package/agents/kimi-swarm.md +5 -4
  7. package/commands/swarm.md +5 -3
  8. package/dist/cli-client.js +224 -31
  9. package/dist/commands/recover-swarm.js +4 -0
  10. package/dist/commands/setup.js +5 -1
  11. package/dist/commands/swarm.js +131 -43
  12. package/dist/hooks/approval-hook.js +3 -0
  13. package/dist/hooks/approval-policy.js +34 -12
  14. package/dist/hooks/config-safety.js +5 -4
  15. package/dist/kimi-engine.js +5 -3
  16. package/dist/kimi-timeouts.js +4 -4
  17. package/dist/mcp/operations.js +1 -1
  18. package/dist/process-tree.js +150 -43
  19. package/dist/swarm-activation.js +14 -9
  20. package/dist/swarm-policy.js +72 -0
  21. package/dist/swarm-recovery.js +41 -10
  22. package/dist/swarm-tool-policy.js +146 -0
  23. package/dist/version.js +1 -1
  24. package/docs/migration.md +13 -5
  25. package/docs/registry-releases.md +6 -0
  26. package/docs/safety.md +41 -16
  27. package/docs/swarm-recovery.md +4 -2
  28. package/docs/upstream-2.6.0-certification.md +13 -0
  29. package/docs/upstream-2.6.2-certification.md +132 -0
  30. package/package.json +3 -2
  31. package/plugins/kimi-codex/.codex-plugin/plugin.json +1 -1
  32. package/plugins/kimi-codex/dist/cli-client.js +224 -31
  33. package/plugins/kimi-codex/dist/commands/recover-swarm.js +4 -0
  34. package/plugins/kimi-codex/dist/commands/setup.js +5 -1
  35. package/plugins/kimi-codex/dist/commands/swarm.js +131 -43
  36. package/plugins/kimi-codex/dist/hooks/approval-hook.js +3 -0
  37. package/plugins/kimi-codex/dist/hooks/approval-policy.js +34 -12
  38. package/plugins/kimi-codex/dist/hooks/config-safety.js +5 -4
  39. package/plugins/kimi-codex/dist/kimi-engine.js +5 -3
  40. package/plugins/kimi-codex/dist/kimi-timeouts.js +4 -4
  41. package/plugins/kimi-codex/dist/mcp/operations.js +1 -1
  42. package/plugins/kimi-codex/dist/process-tree.js +150 -43
  43. package/plugins/kimi-codex/dist/swarm-activation.js +14 -9
  44. package/plugins/kimi-codex/dist/swarm-policy.js +72 -0
  45. package/plugins/kimi-codex/dist/swarm-recovery.js +41 -10
  46. package/plugins/kimi-codex/dist/swarm-tool-policy.js +146 -0
  47. package/plugins/kimi-codex/dist/version.js +1 -1
  48. package/plugins/kimi-codex/skills/kimi-swarm/SKILL.md +2 -0
  49. package/plugins/kimi-codex/skills/kimi-swarm-write/SKILL.md +2 -0
  50. package/plugins/kimi-dsh/dist/cli-client.js +224 -31
  51. package/plugins/kimi-dsh/dist/commands/recover-swarm.js +4 -0
  52. package/plugins/kimi-dsh/dist/commands/setup.js +5 -1
  53. package/plugins/kimi-dsh/dist/commands/swarm.js +131 -43
  54. package/plugins/kimi-dsh/dist/hooks/approval-hook.js +3 -0
  55. package/plugins/kimi-dsh/dist/hooks/approval-policy.js +34 -12
  56. package/plugins/kimi-dsh/dist/hooks/config-safety.js +5 -4
  57. package/plugins/kimi-dsh/dist/kimi-engine.js +5 -3
  58. package/plugins/kimi-dsh/dist/kimi-timeouts.js +4 -4
  59. package/plugins/kimi-dsh/dist/mcp/operations.js +1 -1
  60. package/plugins/kimi-dsh/dist/process-tree.js +150 -43
  61. package/plugins/kimi-dsh/dist/swarm-activation.js +14 -9
  62. package/plugins/kimi-dsh/dist/swarm-policy.js +72 -0
  63. package/plugins/kimi-dsh/dist/swarm-recovery.js +41 -10
  64. package/plugins/kimi-dsh/dist/swarm-tool-policy.js +146 -0
  65. package/plugins/kimi-dsh/dist/version.js +1 -1
  66. package/plugins/kimi-dsh/package.json +1 -1
@@ -5,7 +5,7 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "Kimi for Claude Code: code questions, reviews, fixes, parallel tasks, and MCP tasks through the local Kimi Code CLI.",
8
- "version": "2.5.8"
8
+ "version": "2.6.2"
9
9
  },
10
10
  "plugins": [
11
11
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kimi",
3
3
  "description": "Kimi for Claude Code: code questions, independent reviews, bounded fixes, autonomous goals, parallel tasks, and MCP tasks through the local Kimi Code CLI, with PreToolUse safety hooks.",
4
- "version": "2.5.8",
4
+ "version": "2.6.2",
5
5
  "homepage": "https://github.com/linxule/kimi-plugin-cc",
6
6
  "repository": "https://github.com/linxule/kimi-plugin-cc",
7
7
  "license": "Apache-2.0",
package/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  > **Post-1.0 release history (v1.0.1 -> present) lives in [ROADMAP-TO-GA.md § Post-GA audit log](./ROADMAP-TO-GA.md#post-ga-audit-log)** and the "Version" / "Upstream compat" lines of [AGENTS.md](./AGENTS.md). Docs-only kimi-code compat checkups that don't bump the plugin version (e.g. the 0.14.2 / 0.14.3 patches) are recorded there, not here. Notable releases are summarized below; the GA entry and full pre-GA detail follow.
4
4
 
5
+ ## 2.6.2 — 2026-11-14 (publication pending)
6
+
7
+ - Add a bounded swarm construction for exact stock CLI 2.6.2: managed-hook wave admission counts new and resumed entries, rejects forks, and uses a plugin-owned width. Force the native child timeout beyond the finite job budget so a timed-out retry cannot overlap a later wave.
8
+ - Disable native Bash backgrounding in owned parallel sessions and deny explicit background Bash. Settle identity-verified owned processes after normal exit as well as cancellation before capturing artifacts or patches. Concurrency bounds Kimi child-agent turns; allowed repository commands can still start multiple OS processes.
9
+ - Run concurrency 1 as one direct worker without native swarm activation or delegation. Preserve read-only policy, temporary-worktree writes, unapplied patches, operation provenance and cancellation.
10
+ - Keep exact 2.6.0 non-swarm-only and retain the documented recovery limitation on older full-operation rows. This change does not patch the upstream runtime or update installed hosts.
11
+ - Certify all eight operations on exact CLI 2.6.2. Final stock-binary controls pass **23 tests / 138 assertions**; live production passes **30 tests / 386 assertions**, with only the two inapplicable narrowed-refusal tests skipped. The full gate passes **1,767 tests / 76 expected opt-in or platform skips / 23,008 assertions in 591.60s**. Kernel-visible Linux validation passes **130 tests / 1 macOS-specific skip / 832 assertions**. Source audit, 340-file package validation, isolated consumer security and both independent reviews pass on corrected runtime `b69a416`. Release CI and publication remain pending; exact commits, first-CI failure chronology and final hashes are in the [2.6.2 record](docs/upstream-2.6.2-certification.md).
12
+
13
+ ## 2.5.9 — 2026-11-14
14
+
15
+ - Certify exact kimi-code 2.6.2 for review, challenge, ask, rescue, review_gate and pursue only, alongside the existing narrowed 2.6.0 row. Both swarm operations refuse before model spawn with `v2-swarm-not-certified`, including at the persisted-plan boundary; exact 2.6.1 and 2.6.3 remain excluded. See the [2.6.2 non-swarm evidence](docs/upstream-2.6.2-certification.md).
16
+ - Review the 2.6.2 mutable-replay, loop-journal, turn-projection and feedback changes. Restore still folds only the same wire journals, and the no-plan, local-execution, direct-subscription and managed-hook constructions remain enforced. Fresh print explicitly selects `--environment local`.
17
+ - Preserve `NATIVE_V2_CERTIFIED_VERSIONS` as the all-operation export through 2.5.3; `NATIVE_V2_ANY_OPERATION_VERSIONS` is the separate scoped union. Automatic full-swarm pin selection does not move to either narrowed 2.6.x release.
18
+ - Pass the exact 2.6.2 source scan (19 tests / 216 assertions), 2.5.3 regression (153 assertions), full-scope candidate matrix (24 tests / 201 assertions in 327.41 seconds), and narrowed production matrix (**23 tests / 171 assertions in 219.98 seconds**). Only the three explicitly excluded swarm execution lanes skip in production; both real command paths refuse before creating a model session. Separate live controls prove the armed 1,304-byte plan-file bypass, same-call removed-tool rejection, and local/trust/resume environment refusals.
19
+ - Reproduce the upstream rate-limit recovery cap defect on untouched 2.6.2 source: cap 1 admits an extra attempt during recovery and cap 4 reaches five active attempts. The local correction at `52e21c7bf` (base `8d939f7d`) passes 56 focused upstream swarm tests. The unpatched base differs from 2.6.2 only in its `TokenUsage` import and otherwise has the same scheduler logic; the correction intentionally changes that logic. Upstream issue #4926 still awaits maintainer approval and a released fix. Full-swarm certification remains blocked; publication does not update installed hosts or operator pins.
20
+ - Pass the definitive isolated full repository gate with **1,503 tests, 36 expected skips and 20,086 assertions in 433.07 seconds**, including generated-surface and drift checks with frozen dependencies. Validate 334 package files across all three distributions, patched DSH host/profile with seven providers/tools and Web boot, and isolated npm consumer security. Codex and Claude both returned **NO FINDINGS / APPROVE** after documentation, provenance and coverage corrections. The narrowed production matrix passed again on exact release commit `1625858bf8851a26eee5f19ae6eb5bfe7666e97b` with **23 tests and 171 assertions in 225.87 seconds**, with both swarm refusals proven before model spawn.
21
+ - Publish the immutable [v2.5.9 tag and GitHub release](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.5.9) at `6f9eaa6e145d62e7f35e5ff38d317bd7e3a673c5` after final CI run 43585425445. OIDC publication run 43585933931 passed. The 334-file registry tarball matches the CI artifact, with SHA-1 `2158551b73d3408af14e2061c29e40dc60622947` and SHA-256 `d5c43b95c708468393f357c353c180488ae83edb56cae93e840d08ee2b3dc520`. Signed SLSA provenance is log index `3876002731`; publish attestation is `3876057720`. Fresh registry installation has zero production advisories and no invalid or missing signatures, and setup/check passes with the scoped warning. The DSH Discover timestamp records npm publication at `2026-11-14T10:43:34.167Z`.
22
+
5
23
  ## 2.5.8 — 2026-11-13
6
24
 
7
25
  - Certify exact kimi-code 2.6.0 for review, challenge, ask, rescue, review_gate and pursue only. Both swarm operations refuse before model spawn with `v2-swarm-not-certified`, including at the persisted-plan boundary; neither falls back to legacy-v1. Setup reports the narrowed scope. Exact 2.6.1 and full swarm certification remain uncertified. See the [2.6.0 non-swarm evidence](docs/upstream-2.6.0-certification.md).
@@ -9,6 +27,7 @@
9
27
  - Integrate the reviewed 2.6.0 executor, direct-subscription, local-environment, goal-journal and canonical execution-root changes. Preserve the no-plan construction and recovery safeguards. Candidate swarm activation and recovery remain outside production scope on 2.6.0.
10
28
  - Pass the exact 2.6.0 source scan (19 tests / 225 assertions), 2.5.3 regression (153 assertions), full-scope candidate matrix (24 tests / 201 assertions / no skips), and narrowed production matrix (**23 tests / 170 assertions in 241.67 seconds**). The only three production skips are explicitly excluded swarm execution lanes; both real swarm command paths prove pre-spawn refusal with no model session, retained worktree, or user-tree change.
11
29
  - Pass the definitive isolated full repository gate with **1,472 tests, 36 expected skips and 19,530 assertions in 402.26 seconds**, including generated-surface and drift checks with frozen dependencies. A five-second setup fixture timeout was raised to 30 seconds after its unchanged behavior passed in isolation; every assertion was preserved. Validate 333 package files across all three distributions, patched DSH host/profile with seven providers/tools and Web boot, and isolated npm consumer security. Independent reviews and publication receipts are recorded in the certification record.
30
+ - Publish release commit `887958d7de39cf388ebc3faaffd31cabe76c5a99` after CI run 43452771909, then tag and release [v2.5.8](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.5.8). OIDC publication run 43453807099 passed. The 333-file registry tarball is byte-identical to the CI artifact, with SHA-1 `65145489591e6873556f85a06506d0d276880441` and SHA-256 `6fc5f44aacafa92671f5aea8e2343e6323116f81d4456dee47181481050af5f4`. Signed SLSA provenance is log index `3857088726`; publish attestation is `3857133123`. Fresh registry installation has zero production advisories and no invalid or missing signatures, and setup/check passes with the scoped warning. The DSH Discover timestamp records npm publication at `2026-11-13T15:41:45.145Z`.
12
31
  - Preserve the upstream follow-up for the rate-limit recovery cap defect rather than waiving it. Full swarm certification still ends at 2.5.3 with its inherited limitation disclosed; restoration requires an exact upstream release containing the scheduler correction and fresh full-scope evidence. Publication does not update installed hosts or operator pins.
13
32
 
14
33
  ## 2.5.7 — 2026-11-11
package/README.md CHANGED
@@ -40,7 +40,7 @@ You need:
40
40
  - macOS or Linux
41
41
  - Claude Code, Codex, or DSH with plugin support
42
42
  - Node.js 22.5 or newer (24.9 or newer for DSH)
43
- - Kimi Code CLI 2.6.0 for review, challenge, ask, rescue, review gate, or pursue. Both swarm modes refuse on 2.6.0; full eight-operation certification ends at 2.5.3, with the [documented rate-limit limitation](./docs/safety.md). Other exact certified versions remain supported per the [runtime matrix](./docs/native-v2-certification-provenance.md).
43
+ - Kimi Code CLI 2.6.2 with plugin 2.6.2 for bounded swarm and the six other operations. See the [certification record](./docs/upstream-2.6.2-certification.md) and [runtime matrix](./docs/native-v2-certification-provenance.md) for exact scope. Older supported versions retain their documented limits.
44
44
 
45
45
  Windows is not currently supported. Contributors can help with the [no-model Windows diagnostics checks](./docs/windows-validation.md). Check your versions in a terminal:
46
46
 
@@ -194,7 +194,7 @@ Use these commands to follow a task:
194
194
  | Read the result | `/kimi:result` | `$kimi-result` |
195
195
  | Cancel work | `/kimi:cancel` | `$kimi-cancel` |
196
196
 
197
- Without a job ID, cancel stops the latest running task for this repository. If several tasks are running, check which one you want to stop first. Use cancel rather than interrupting the app so write-swarm can save its patch. For interrupted runs created by the unreleased recovery implementation, see [preview-first swarm recovery](./docs/swarm-recovery.md); it never applies a patch or deletes abandoned work.
197
+ Without a job ID, cancel stops the latest running task for this repository. If several tasks are running, check which one you want to stop first. Use cancel rather than interrupting the app so write-swarm can save its patch. For interrupted swarm runs with a recovery record, see [preview-first swarm recovery](./docs/swarm-recovery.md); it never applies a patch or deletes abandoned work.
198
198
 
199
199
  Canceling a task does not undo changes it has already made.
200
200
 
@@ -238,7 +238,7 @@ Remove the app's hook before removing its plugin. In Claude Code, run `/kimi:set
238
238
 
239
239
  If a hook check fails, follow its diagnosis. Run setup for the affected app when instructed. Do not bypass the check.
240
240
 
241
- If you see `KIMI_CAPABILITY_NOT_CERTIFIED`, update the plugin or select a CLI certified for the requested operation. On 2.6.0, use the six non-swarm operations; swarm requires a CLI version certified for that operation, not merely a release listed for another operation. Running setup again does not certify a new CLI or expand its operation scope.
241
+ If you see `KIMI_CAPABILITY_NOT_CERTIFIED`, update the active host plugin or select a CLI certified for the requested operation. Plugin 2.5.9 supports only the six non-swarm operations on CLI 2.6.2; the bounded swarm implementation requires plugin 2.6.2. CLI 2.6.0 remains non-swarm-only. Running setup again does not add missing runtime policy or certify a new CLI.
242
242
 
243
243
  If you see `CLI_V2_PLAN_MODE_CONFIGURED`, set `default_plan_mode` to `false` or remove it from your Kimi `config.toml` file. Sessions run by this plugin cannot use plan mode.
244
244
 
@@ -248,7 +248,11 @@ All refusal codes and their remedies are listed in the [refusal-code catalog](./
248
248
 
249
249
  The tool rules for ask, review, challenge, and read-only swarm deny file writes and shell commands. Rescue and pursue can write files in your workspace. Swarm with `--write` works in a temporary Git worktree. It starts from your latest commit, so it does not include uncommitted changes. It returns a patch without applying it to your project.
250
250
 
251
- For swarm on CLI 2.3.2, 2.3.3, 2.4.0 and 2.4.1, the plugin briefly starts an authenticated loopback `kimi web` process to activate a session and another to deactivate swarm mode afterward; one ordinary `kimi -p -r` process still performs the task. Activation counts against the time limit, the access token stays in memory and out of logs, and cleanup failure prevents success. Older certified versions use `kimi -p` directly.
251
+ On exact CLI 2.6.2, `--max-concurrency 1` runs one worker directly; larger values use waves of at most that many children. Read mode defaults to 4, write mode to 1. `--cap` remains an advisory total count. Parallel runs use brief authenticated loopback processes to activate and deactivate the session; the direct-worker path needs neither. Activation counts against the finite job budget, tokens stay out of logs, and unverified cleanup prevents success. Older certified versions retain their documented activation and recovery limits.
252
+
253
+ A slow child holds its wave until completion or the finite job deadline. Fresh waves need at least two entries, so odd target counts may need regrouping. Kimi workers cannot explicitly background Bash, and parallel sessions disable automatic backgrounding. Normal exit and cancellation settle verified owned processes before results or patches are captured. Concurrency counts Kimi child-agent turns; allowed tests can start multiple OS processes, and an individual Bash timeout does not guarantee their settlement between waves.
254
+
255
+ Parallel Bash commands time out after 60 seconds by default, with a maximum of 300 seconds. Use concurrency 1 for longer tests; its native automatic backgrounding remains available, with sequential agent turns and settlement before the result is returned.
252
256
 
253
257
  The plugin does not commit changes. Review changes before you keep or apply them.
254
258
 
@@ -284,7 +288,7 @@ Contributors need Bun to run `bun run check`. The detailed engineering documents
284
288
  - macOS 或 Linux
285
289
  - 支持插件的 Claude Code、Codex 或 DSH
286
290
  - Node.js 22.5 或更高版本(DSH 需要 24.9 或更高版本)
287
- - Kimi Code CLI 2.6.0(仅限 review、challenge、ask、rescue、review gate 和 pursue;两种 swarm 模式均会拒绝运行。完整八项操作认证止于 2.5.3,并有已披露的速率限制恢复缺陷。其他精确认证版本见[运行时矩阵](./docs/native-v2-certification-provenance.md))
291
+ - Kimi Code CLI 2.6.2,配合插件 2.6.2 使用有并发上限的 swarm 及其他六项操作。精确范围见[认证记录](./docs/upstream-2.6.2-certification.md)和[运行时矩阵](./docs/native-v2-certification-provenance.md);旧版继续保留其已披露的限制。
288
292
 
289
293
  目前不支持 Windows。在终端检查版本:
290
294
 
@@ -455,7 +459,7 @@ codex plugin add kimi@kimi-marketplace
455
459
 
456
460
  如果钩子检查失败,请按诊断信息处理。提示需要重新配置时,在对应应用中运行 setup。不要绕过检查。
457
461
 
458
- 如果出现 `KIMI_CAPABILITY_NOT_CERTIFIED`,请更新插件,或改用针对所需操作已认证的 CLI 版本。2.6.0 仅支持六项非 swarm 操作;swarm 需要选择针对该操作认证的版本,而不是仅凭其他操作已认证的版本。再次运行 setup 不能认证新的 CLI,也不能扩大其操作范围。
462
+ 如果出现 `KIMI_CAPABILITY_NOT_CERTIFIED`,请更新当前宿主的插件,或选择针对所需操作已认证的 CLI 版本。插件 2.5.9 在 CLI 2.6.2 上仅支持六项非 swarm 操作;有并发上限的 swarm 需要插件 2.6.2。CLI 2.6.0 仍仅支持非 swarm 操作。再次运行 setup 不能补上旧版缺少的运行时策略,也不能认证新的 CLI。
459
463
 
460
464
  如果出现 `CLI_V2_PLAN_MODE_CONFIGURED`,请将 Kimi 的 `config.toml` 文件中的 `default_plan_mode` 设为 `false`,或删除该项。本插件运行的会话不能使用计划模式。
461
465
 
@@ -465,7 +469,11 @@ codex plugin add kimi@kimi-marketplace
465
469
 
466
470
  Ask、review、challenge 和只读 swarm 的工具规则禁止写入文件和执行 shell 命令。Rescue 和 pursue 可以修改工作区内的文件。带 `--write` 的 swarm 在临时 Git 工作树中操作。它从最新提交开始,不包含尚未提交的修改。任务结束后返回补丁,不会自动应用到项目。
467
471
 
468
- 在 CLI 2.3.2、2.3.3、2.4.0 和 2.4.1 上运行 swarm 时,插件会短暂启动需要认证的本地回环 `kimi web` 进程来激活会话,并在结束后再次启动以停用 swarm 模式;任务本身仍由一个普通的 `kimi -p -r` 进程执行。激活计入任务时限,访问令牌只保存在内存且不会写入日志;无法确认清理完成时,任务不会报告成功。较早的已认证版本仍直接通过 `kimi -p` 运行。
472
+ 在精确版本 CLI 2.6.2 上,`--max-concurrency 1` 直接运行一个工作代理;更大的值将任务分成多批,每批子代理数不超过该值。只读模式默认 4,写入模式默认 1。`--cap` 仍只是总数建议。并行任务通过短暂的认证本地回环进程激活和停用会话;单代理路径无需这些进程。激活计入任务时限,令牌不写入日志,无法确认清理完成时不会报告成功。旧版继续保留其已披露的激活和恢复限制。
473
+
474
+ 较慢的子代理会让当前批次等待,直到完成或整个任务达到时限。全新批次至少需要两个条目,因此奇数个目标可能需要重新分组。Kimi 工作代理不能显式将 Bash 放到后台,并行会话也禁用自动后台运行。正常退出和取消都必须确认所管理进程已停止,才会捕获结果或补丁。并发上限计算的是 Kimi 子代理轮次;获准的测试仍可启动多个系统进程,单次 Bash 超时也不保证这些进程在下一批开始前停止。
475
+
476
+ 并行 Bash 命令默认在 60 秒后超时,最长为 300 秒。更长的测试请使用并发数 1;该路径仍可由原生机制自动转入后台,代理轮次保持串行,并在返回结果前确认进程停止。
469
477
 
470
478
  插件不会提交修改。保留或应用修改前,请先审查。
471
479
 
@@ -503,7 +511,7 @@ Il vous faut :
503
511
  - macOS ou Linux
504
512
  - une version de Claude Code, Codex ou DSH prenant en charge les plugins
505
513
  - Node.js 22.5 ou une version ultérieure (24.9 ou ultérieure pour DSH)
506
- - Kimi Code CLI 2.6.0 (uniquement pour review, challenge, ask, rescue, review gate et pursue ; les deux modes swarm sont refusés. La certification complète des huit opérations s'arrête à 2.5.3, avec la limite connue de récupération après limitation de débit. Les autres versions exactes certifiées figurent dans la [matrice runtime](./docs/native-v2-certification-provenance.md))
514
+ - Kimi Code CLI 2.6.2 avec le plugin 2.6.2 pour swarm à concurrence limitée et les six autres opérations. Consultez le [dossier de certification](./docs/upstream-2.6.2-certification.md) et la [matrice runtime](./docs/native-v2-certification-provenance.md) pour le périmètre exact ; les anciennes versions conservent leurs limites documentées.
507
515
 
508
516
  Windows n'est pas pris en charge actuellement. Vérifiez les versions dans un terminal :
509
517
 
@@ -672,7 +680,7 @@ Supprimez le hook de l'application avant d'en retirer le plugin. Dans Claude Cod
672
680
 
673
681
  Si la vérification du hook échoue, suivez le diagnostic. Relancez setup dans l'application concernée lorsque les instructions le demandent. Ne contournez pas la vérification.
674
682
 
675
- Si vous voyez `KIMI_CAPABILITY_NOT_CERTIFIED`, mettez à jour le plugin ou utilisez une version du CLI certifiée pour l'opération demandée. La version 2.6.0 est limitée aux six opérations non swarm ; swarm exige une version certifiée pour cette opération, pas seulement pour une autre. Relancer setup ne valide pas une nouvelle version du CLI et n'élargit pas son champ d'opérations.
683
+ Si vous voyez `KIMI_CAPABILITY_NOT_CERTIFIED`, mettez à jour le plugin de cet hôte ou choisissez un CLI certifié pour cette opération. Le plugin 2.5.9 ne prend en charge que les six opérations non swarm sur le CLI 2.6.2 ; swarm à concurrence limitée exige le plugin 2.6.2. Le CLI 2.6.0 reste limité aux opérations non swarm. Relancer setup n’ajoute pas la politique absente d’un ancien runtime et ne certifie pas un nouveau CLI.
676
684
 
677
685
  Si vous voyez `CLI_V2_PLAN_MODE_CONFIGURED`, réglez `default_plan_mode` sur `false` ou supprimez cette option du fichier `config.toml` de Kimi. Les sessions lancées par ce plugin ne peuvent pas utiliser le mode plan.
678
686
 
@@ -682,7 +690,11 @@ Tous les codes de refus et leurs remèdes sont répertoriés dans le [catalogue
682
690
 
683
691
  Les règles des modes ask, review, challenge et swarm en lecture seule interdisent les écritures et les commandes shell. Rescue et pursue peuvent modifier les fichiers de votre espace de travail. Swarm avec `--write` travaille dans un worktree Git temporaire. Il part du dernier commit et n'inclut donc pas les modifications non commitées. Il renvoie un patch sans l'appliquer à votre projet.
684
692
 
685
- Avec le CLI 2.3.2, 2.3.3, 2.4.0 et 2.4.1, les tâches swarm lancent brièvement un processus `kimi web` authentifié sur l'interface de boucle locale pour activer la session, puis un second pour désactiver le mode swarm ; un seul processus `kimi -p -r` ordinaire exécute toujours la tâche. L'activation est comptée dans la limite de temps, le jeton reste en mémoire et hors des journaux, et l'échec du nettoyage empêche de déclarer la réussite. Les versions certifiées antérieures utilisent directement `kimi -p`.
693
+ Sur le CLI exact 2.6.2, `--max-concurrency 1` lance directement un seul agent ; une valeur supérieure répartit le travail en vagues de cette taille au maximum. Les valeurs par défaut sont 4 en lecture et 1 en écriture. `--cap` reste un conseil sur le nombre total. Les vagues parallèles utilisent de brefs processus locaux authentifiés pour activer puis désactiver la session ; le chemin à un seul agent n’en a pas besoin. L’activation compte dans la durée du job, les jetons restent hors des journaux et un nettoyage non confirmé empêche de déclarer la réussite. Les anciennes versions gardent leurs limites documentées.
694
+
695
+ Un enfant lent retient sa vague jusqu’à sa fin ou à la limite de durée du job. Une vague de nouveaux enfants exige au moins deux entrées ; un nombre impair de cibles peut donc nécessiter un regroupement. Les agents Kimi ne peuvent pas lancer Bash explicitement en arrière-plan, et les sessions parallèles désactivent aussi le détachement automatique. La sortie normale et l’annulation attendent l’arrêt des processus gérés avant de capturer résultats ou patchs. La limite compte les tours des agents enfants Kimi ; un test autorisé peut lancer plusieurs processus système, dont l’arrêt entre deux vagues n’est pas garanti par le délai d’un appel Bash.
696
+
697
+ Les commandes Bash parallèles expirent après 60 secondes par défaut, avec un maximum de 300 secondes. Choisissez une concurrence de 1 pour les tests plus longs : le passage automatique en arrière-plan reste disponible, avec des tours séquentiels et un arrêt vérifié avant le retour du résultat.
686
698
 
687
699
  Le plugin ne crée aucun commit. Examinez les modifications avant de les conserver ou de les appliquer.
688
700
 
@@ -718,7 +730,7 @@ Les contributeurs ont besoin de Bun pour exécuter `bun run check`. La documenta
718
730
  - macOS または Linux
719
731
  - プラグインに対応した Claude Code、Codex、または DSH
720
732
  - Node.js 22.5 以降(DSH では 24.9 以降)
721
- - Kimi Code CLI 2.6.0(対象は review、challenge、ask、rescue、review gate、pursue のみ。両 swarm モードは拒否されます。8 操作すべての認証は 2.5.3 までで、継承されたレート制限復帰時の問題も開示しています。その他の正確な認証バージョンは[ランタイムマトリックス](./docs/native-v2-certification-provenance.md)を参照)
733
+ - Kimi Code CLI 2.6.2 とプラグイン 2.6.2。並列数を制限した swarm とほかの 6 操作に対応します。正確な範囲は[認証記録](./docs/upstream-2.6.2-certification.md)と[ランタイムマトリックス](./docs/native-v2-certification-provenance.md)を参照してください。旧バージョンの制限は引き続き適用されます。
722
734
 
723
735
  現在、Windows には対応していません。ターミナルでバージョンを確認します。
724
736
 
@@ -889,7 +901,7 @@ codex plugin add kimi@kimi-marketplace
889
901
 
890
902
  フックの確認に失敗した場合は、診断結果に従って対処してください。Setup の実行を指示された場合は、該当するアプリで実行します。確認を回避しないでください。
891
903
 
892
- `KIMI_CAPABILITY_NOT_CERTIFIED` が表示されたら、プラグインを更新するか、実行したい操作が認証された CLI バージョンを選んでください。2.6.0 では 6 つの非 swarm 操作のみ利用できます。swarm には、ほかの操作ではなく、その操作が認証されたバージョンが必要です。Setup を再実行しても、新しい CLI の互換性が検証済みになったり、対応操作が広がったりすることはありません。
904
+ `KIMI_CAPABILITY_NOT_CERTIFIED` が表示されたら、そのホストのプラグインを更新するか、対象操作が認証された CLI を選んでください。プラグイン 2.5.9 では CLI 2.6.2 の非 swarm 6 操作のみ対応し、並列数を制限した swarm にはプラグイン 2.6.2 が必要です。CLI 2.6.0 は引き続き非 swarm 操作のみ対応します。Setup の再実行だけでは古いランタイムに新しいポリシーは追加されず、新しい CLI も認証されません。
893
905
 
894
906
  `CLI_V2_PLAN_MODE_CONFIGURED` が表示されたら、Kimi の `config.toml` で `default_plan_mode` を `false` にするか、その項目を削除してください。このプラグインが実行するセッションではプランモードを使えません。
895
907
 
@@ -899,7 +911,11 @@ codex plugin add kimi@kimi-marketplace
899
911
 
900
912
  Ask、review、challenge、読み取り専用 swarm のツールルールでは、ファイルへの書き込みとシェルコマンドを禁止しています。Rescue と pursue はワークスペース内のファイルを変更できます。`--write` を指定した swarm は、一時的な Git ワークツリーで作業します。最新のコミットから開始するため、未コミットの変更は含まれません。パッチを返すだけで、プロジェクトには自動適用しません。
901
913
 
902
- CLI 2.3.2 / 2.3.3 / 2.4.0 / 2.4.1 の swarm では、セッションを有効化するため、そして終了後に swarm モードを無効化するため、認証付きのローカルループバック `kimi web` プロセスをそれぞれ短時間だけ起動します。タスク自体は従来どおり 1 つの `kimi -p -r` プロセスが実行します。有効化も制限時間に含まれ、トークンはメモリー内にのみ保持されてログには出ません。後処理を確認できない場合、タスクは成功と報告されません。以前の認証済みバージョンでは、引き続き `kimi -p` を直接使います。
914
+ 正確な CLI 2.6.2 では、`--max-concurrency 1` は 1 つのワーカーを直接実行します。2 以上では、その数以下の子エージェントを 1 組として順に実行します。既定値は読み取りが 4、書き込みが 1 です。`--cap` は総数の目安のままです。並列実行では、認証付きのローカルプロセスでセッションを有効化・無効化します。単一ワーカーでは不要です。有効化もジョブの制限時間に含まれ、トークンはログに出ず、後処理を確認できなければ成功とは報告しません。旧バージョンの制限は引き続き適用されます。
915
+
916
+ 遅い子エージェントがある組は、完了またはジョブ全体の期限まで待機します。新規の組には最低 2 項目が必要なので、対象が奇数なら組み直す場合があります。Kimi ワーカーによる明示的な Bash のバックグラウンド実行は禁止され、並列セッションでは自動切り離しも無効です。通常終了とキャンセルのどちらも、管理対象プロセスの停止を確認してから結果やパッチを取得します。並列数は Kimi 子エージェントのターン数です。許可されたテストは複数の OS プロセスを起動でき、個々の Bash のタイムアウトは次の組の開始までにそれらが停止する保証にはなりません。
917
+
918
+ 並列の Bash コマンドは既定で 60 秒、最大で 300 秒でタイムアウトします。長いテストには並列数 1 を使ってください。この経路では自動バックグラウンド化を利用でき、エージェントのターンは順次進み、結果を返す前に管理対象プロセスの停止を確認します。
903
919
 
904
920
  プラグインは変更をコミットしません。変更を残す、または適用する前に内容を確認してください。
905
921
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: kimi-swarm-write
3
- description: Use this agent ONLY when the user has explicitly asked Kimi to make EDITS across MANY disjoint targets IN PARALLEL (a write fan-out) — e.g. "apply this same change to every handler, in parallel" or "fan out these independent edits across these N files." Requires BOTH signals: many independent WRITE targets AND explicit fan-out intent. WRITE-CAPABLE but PATCH-ONLY: edits happen in an ephemeral throwaway git worktree off HEAD and come back as a reviewable .patch — the plugin NEVER applies or commits, the user owns the merge, and the real working tree is never touched. Bounded by a MANDATORY hard --budget and a normal-launch --max-concurrency; reviewed 2.5.3/2.6.0 sources can exceed the requested cap during rate-limit recovery. Do NOT auto-promote a single edit (use kimi-rescue), a read-only review fan-out (use kimi-swarm), or an autonomous multi-turn goal loop (use kimi-pursue). Requires kimi-code >= 0.18.0, a git repo with a committed HEAD, and the /kimi:setup PreToolUse hook; refuses without the hook.
3
+ description: "Use this agent ONLY when the user has explicitly asked Kimi to make EDITS across MANY disjoint targets IN PARALLEL (a write fan-out) — e.g. \"apply this same change to every handler, in parallel\" or \"fan out these independent edits across these N files.\" Requires BOTH signals: many independent WRITE targets AND explicit fan-out intent. WRITE-CAPABLE but PATCH-ONLY: edits happen in an ephemeral throwaway git worktree off HEAD and come back as a reviewable .patch — the plugin NEVER applies or commits, the user owns the merge, and the real working tree is never touched. Bounded by a MANDATORY hard --budget and version-specific --max-concurrency: exact CLI 2.6.2 uses one direct worker at 1 or hard bounded waves at 2 or more; older certified versions retain their normal-launch recovery limitation. Do NOT auto-promote a single edit (use kimi-rescue), a read-only review fan-out (use kimi-swarm), or an autonomous multi-turn goal loop (use kimi-pursue). Requires kimi-code >= 0.18.0, a git repo with a committed HEAD, and the /kimi:setup PreToolUse hook; refuses without the hook."
4
4
  model: sonnet
5
5
  tools: Bash
6
6
  color: red
@@ -47,15 +47,17 @@ When invoked:
47
47
  - confirm BOTH signals are present before dispatching: (1) MANY disjoint WRITE targets and (2) an explicit request to fan the edits out in parallel. If the user wants a single edit, use `kimi-rescue`; a read-only fan-out, `kimi-swarm`; an autonomous multi-turn loop, `kimi-pursue`. When in doubt, prefer `kimi-rescue` — do not shard one task into a swarm
48
48
  - preserve the user's objective and the disjoint target list with minimal reframing; partition into NON-overlapping targets (the subagents edit in one shared worktree, so overlapping targets can clobber each other)
49
49
  - call the shared companion runtime with one Bash invocation after any model-discovery step: `${CLAUDE_PLUGIN_ROOT}/scripts/companion.sh task swarm --write <args>` (the `--write` flag is REQUIRED — this agent is the write path)
50
- - the companion accepts a **strict allowlist** of flags: `--thinking <off|low|medium|high>` (requested per run), `--budget <duration>` (HARD wall-clock ceiling; e.g. `30m`, `1h`, `90s`; bare number = minutes; default 30m, max 24h), `--cap <N>` (SOFT total-subagent-count hint injected into the coordinator prompt — advisory, the hook is stateless and can't count subagents), `--max-concurrency <N>` (caps normal launches on kimi-code 0.18.0+; **defaults to 1 for `--write`** — normal-launch writes serialize because disjoint-target partitioning is prompt-only; reviewed 2.5.3/2.6.0 sources can exceed the requested cap during rate-limit recovery), and `-m`/`--model <name>`. Everything else is trailing objective text. Reasoning behavior follows the selected model and Kimi configuration unless `--thinking <effort>` requests one for this run (honoured by Kimi's own providers on models that can turn thinking off; other providers ignore it silently; the plugin cannot verify it). `--no-thinking` is rejected; use `--thinking off`
50
+ - the companion accepts a **strict allowlist** of flags: `--thinking <off|low|medium|high>` (requested per run), `--budget <duration>` (HARD wall-clock ceiling; e.g. `30m`, `1h`, `90s`; bare number = minutes; default 30m, max 24h), `--cap <N>` (SOFT total-subagent-count hint injected into the coordinator prompt — advisory, the hook does not maintain a lifetime-total count), `--max-concurrency <N>` (**defaults to 1**; exact CLI 2.6.2 uses one direct worker at 1 and bounded waves at 2 or more; older certified versions retain normal-launch limits and the recovery overrun), and `-m`/`--model <name>`. Everything else is trailing objective text. Reasoning behavior follows the selected model and Kimi configuration unless `--thinking <effort>` requests one for this run (honoured by Kimi's own providers on models that can turn thinking off; other providers ignore it silently; the plugin cannot verify it). `--no-thinking` is rejected; use `--thinking off`
51
51
  - do not invent flags. The runtime hard-fails with `INVALID_ARGS` on unknown flag-shaped tokens — pass `--` before flag-shaped objective text to forward it as objective text rather than a flag
52
52
  - **this is write-capable, but the blast radius is bounded by construction — and PATCH-ONLY is the load-bearing safety property.** Every edit happens in an ephemeral worktree off HEAD; the `coder` subagents fire the index-0 PreToolUse hook on every tool call (the `swarm-write` label routes write/edit/shell through the rescue allowlist, scoped to a forge-proof trusted worktree root — not the payload cwd), so writes are confined to that worktree and out-of-worktree writes + git mutation are denied. The result is a `.patch` the user reviews and applies themselves — **the plugin never applies or commits, and the user's real tree is never touched.** Always pass an explicit `--budget` sized to the task (keep it at or below 30m unless the user named a larger window) and an explicit `--max-concurrency` (leave at 1 unless the user asks to parallelize writes and the targets are provably disjoint). Never try to remove these bounds
53
53
  - swarm-write **bases the worktree on HEAD: uncommitted changes are NOT included.** If the user has a dirty tree the runtime warns; surface that and suggest committing or stashing first if the swarm needs those changes
54
- - swarm-write is foreground-only **at the runtime level** — `--background`, `--wait`, `--fresh`, and `--resume` are rejected with `INVALID_ARGS`. How you make the Bash call is a separate question: **default to `run_in_background: true`.** A fan-out routinely outlives a foreground shell timeout (Claude Code caps foreground Bash at 10 minutes; `--budget` defaults to 30m), and detaching costs nothing here because the run is patch-only and worktree-confined — it cannot reach the user's tree whether or not anyone is watching. Keep `--budget` and `--max-concurrency` finite; never make a detached run open-ended
54
+ - Exact CLI 2.6.2 counts simultaneous Kimi child-agent turns, excluding the coordinator and OS subprocesses started by allowed tests. Fresh-only waves require at least two entries; group odd target counts into disjoint entries or resume an own-session child for remaining work. A stuck child holds its wave until completion or finite whole-job stop. Kimi workers cannot explicitly background Bash, and native automatic backgrounding is disabled for parallel sessions. Normal exit and cancellation settle verified owned processes before patch capture; individual Bash timeout does not prove descendant quiescence between waves.
55
+ - Parallel native Bash uses a 60-second default and 300-second maximum foreground timeout, killing commands on expiry. Choose `--max-concurrency 1` for longer tests: automatic timeout-to-background remains available there, while root-agent turns stay sequential and whole-job settlement still gates patch capture.
56
+ - swarm-write is foreground-only **at the runtime level** — `--background`, `--wait`, `--fresh`, and `--resume` are rejected with `INVALID_ARGS`. The caller's host Bash launch is separate from the Kimi worker tools above: **default to `run_in_background: true`.** A fan-out routinely outlives a foreground shell timeout (Claude Code caps foreground Bash at 10 minutes; `--budget` defaults to 30m), and the run remains patch-only and worktree-confined. Keep `--budget` and `--max-concurrency` finite; never make a detached run open-ended
55
57
  - **the user should never have to type a job id** (it is a raw UUID), and you will not have one either — a detached run prints nothing at launch; the job id only reaches you with the final report. So cancel by omitting it: `${CLAUDE_PLUGIN_ROOT}/scripts/companion.sh cancel` targets the latest RUNNING job for this repo (`findLatestJob({runningOnly:true})`), which is the run you just launched. Pass an explicit id only if you already have one from a completed report. Note the ambiguity: with two runs in flight, the no-id form takes the most recent — if the user has more than one going, confirm which they mean before cancelling
56
58
  - **prefer `companion.sh cancel` over an Esc/interrupt, and say so if the user asks how to stop it.** A harness interrupt gives the companion only ~1.35s before SIGKILL (measured), which is less than its own 1500ms child-escalation plus quiescence plus `git diff --binary` patch capture — so interrupting can kill the run mid-teardown and **lose the patch**. The cancel command signals the job from a separate process that is not racing that deadline, so teardown completes and the partial patch survives
57
59
  - swarm-write **REFUSES without the `/kimi:setup` PreToolUse hook** (a write fan-out with no per-subagent enforcement is an N-fold blast radius). If the companion refuses, surface that and tell the user to run `/kimi:setup`; do not reach for `KIMI_PLUGIN_CC_SKIP_HOOK_CHECK`
58
- - requires kimi-code **>= 0.18.0** (normal-launch concurrency support; reviewed 2.5.3/2.6.0 sources have a rate-limit-recovery overrun) and a git repo with a **committed HEAD** — surface `WRITE_SWARM_NOT_A_REPO` / `WRITE_SWARM_NO_HEAD` plainly if the runtime reports them
60
+ - requires an exact certified CLI, at least 0.18.0, and a Git repo with committed HEAD; exact 2.6.2 uses bounded waves or a direct worker, while older versions retain their recovery limitation. Surface `WRITE_SWARM_NOT_A_REPO` / `WRITE_SWARM_NO_HEAD` plainly
59
61
  - `/kimi:result <jobId> --json` returns a structured envelope with metadata plus the artifact body.
60
62
 
61
63
  When swarm-write completes:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: kimi-swarm
3
- description: Use this agent ONLY when the user has explicitly asked for a READ-ONLY review fanned out in PARALLEL across many independent targets (files, modules, or questions) at once — a user-scoped whole-directory or repo-wide audit where one subagent per target is the point. Requires BOTH signals: many independent targets AND an explicit request for parallel fan-out. Do NOT auto-promote a single, unscoped, or diff-shaped review into a per-file swarm — use kimi-review for a single working-tree/branch diff or any review the user did not scope as a fan-out. Read-only (every subagent is hook-denied writes — zero write surface), bounded by a hard wall-clock --budget and a normal-launch concurrency setting; requires the /kimi:setup PreToolUse hook and refuses without it. Not for writes (see kimi-rescue) or free-form Q&A (see kimi-ask).
3
+ description: "Use this agent ONLY when the user has explicitly asked for a READ-ONLY review fanned out in PARALLEL across many independent targets (files, modules, or questions) at once — a user-scoped whole-directory or repo-wide audit where one subagent per target is the point. Requires BOTH signals: many independent targets AND an explicit request for parallel fan-out. Do NOT auto-promote a single, unscoped, or diff-shaped review into a per-file swarm — use kimi-review for a single working-tree/branch diff or any review the user did not scope as a fan-out. Read-only (every subagent is hook-denied writes — zero write surface), bounded by a hard wall-clock --budget and version-specific concurrency control (hard bounded waves or one direct worker on exact CLI 2.6.2; normal-launch limits on older certified versions); requires the /kimi:setup PreToolUse hook and refuses without it. Not for writes (see kimi-rescue) or free-form Q&A (see kimi-ask)."
4
4
  model: sonnet
5
5
  tools: Bash
6
6
  color: green
@@ -42,12 +42,13 @@ When invoked:
42
42
  - decide whether the task is a BROAD read-only fan-out rather than a single-diff review (kimi-review), free-form ask (kimi-ask), or implementation (kimi-rescue); for one working-tree or branch diff, use kimi-review instead
43
43
  - preserve the user's review scope as the trailing focus text — what to review across the workspace — with minimal reframing
44
44
  - call the shared companion runtime with one Bash invocation after any model-discovery step: `${CLAUDE_PLUGIN_ROOT}/scripts/companion.sh task swarm <args>`
45
- - the companion accepts a **strict allowlist** of flags: `--thinking <off|low|medium|high>` (requested per run), `--budget <duration>` (HARD wall-clock ceiling; e.g. `30m`, `1h`, `90s`; bare number = minutes; default 30m), `--cap <N>` (SOFT total-subagent-count hint injected into the coordinator prompt — advisory, the hook is stateless and can't count subagents), `--max-concurrency <N>` (caps normal launches on kimi-code 0.18.0+; **defaults to 4** when omitted, older binaries ignore it; reviewed 2.5.3/2.6.0 sources can exceed the requested cap during rate-limit recovery), and `-m`/`--model <name>`. Everything else is trailing focus text. Reasoning behavior follows the selected model and Kimi configuration unless `--thinking <effort>` requests one for this run (honoured by Kimi's own providers on models that can turn thinking off; other providers ignore it silently; the plugin cannot verify it). `--no-thinking` is rejected; use `--thinking off`
45
+ - the companion accepts a **strict allowlist** of flags: `--thinking <off|low|medium|high>` (requested per run), `--budget <duration>` (HARD wall-clock ceiling; e.g. `30m`, `1h`, `90s`; bare number = minutes; default 30m), `--cap <N>` (SOFT total-subagent-count hint injected into the coordinator prompt — advisory, the hook does not maintain a lifetime-total count), `--max-concurrency <N>` (**defaults to 4**; exact CLI 2.6.2 uses one direct worker at 1 and bounded waves at 2 or more; older certified versions retain normal-launch limits and the recovery overrun), and `-m`/`--model <name>`. Everything else is trailing focus text. Reasoning behavior follows the selected model and Kimi configuration unless `--thinking <effort>` requests one for this run (honoured by Kimi's own providers on models that can turn thinking off; other providers ignore it silently; the plugin cannot verify it). `--no-thinking` is rejected; use `--thinking off`
46
46
  - do not invent flags. The runtime hard-fails with `INVALID_ARGS` on unknown flag-shaped tokens — pass `--` before flag-shaped objective text to forward it as scope text rather than a flag
47
- - **cost is the only real risk, and it is bounded by construction.** This agent can be auto-dispatched, and a swarm is N parallel model runs — but there is no write surface (every spawned subagent inherits the `swarm` label and fires the same index-0 PreToolUse hook, so its write/edit/shell is denied exactly like a single-turn review's). The runtime enforces a normal-launch peak: `--max-concurrency` defaults to `4` for every run, and `--budget` defaults to 30m; reviewed 2.5.3/2.6.0 sources can exceed the requested peak during rate-limit recovery. You SHOULD still pass an explicit `--max-concurrency` sized to the target count (lower to throttle; raise only when the user asks) and keep `--budget` at or below 30m. Never attempt to remove these bounds
47
+ - **Keep the finite runtime bounds.** Read-only workers deny writes and shell through the managed hook. `--max-concurrency` defaults to 4 and `--budget` to 30m. Exact CLI 2.6.2 enforces bounded waves, or a direct worker at 1; older certified versions retain the disclosed recovery overrun. Pass an explicit concurrency sized to the targets (raise only when the user asks) and keep the budget at or below 30m unless the user requests more. Neither a time budget nor concurrency is a dollar or lifetime-token cap.
48
+ - Exact CLI 2.6.2 counts simultaneous Kimi child-agent turns, excluding the coordinator and OS subprocesses. Fresh-only waves require at least two entries; group odd target counts into disjoint entries or resume an own-session child for remaining work. A stuck child holds its wave until completion or finite whole-job stop. Normal exit and cancellation require verified owned-process settlement before returning artifacts.
48
49
  - swarm is **foreground-only** — do not pass `--background`, `--wait`, `--fresh`, or `--resume` (the parser rejects them with `INVALID_ARGS`). Default to foreground so the run stays watchable. Detach the Bash call with `run_in_background: true` ONLY when the user explicitly asks for fire-and-forget, and only with a finite `--max-concurrency` and a reduced `--budget` (a backgrounded fan-out has no human watching it to Ctrl+C); after launching, tell the user to check `/kimi:status` for progress
49
50
  - swarm **REFUSES without the `/kimi:setup` PreToolUse hook**, matching every model-spawning command. If the companion refuses, surface that and tell the user to run `/kimi:setup`; do not reach for `KIMI_PLUGIN_CC_SKIP_HOOK_CHECK`
50
- - requires kimi-code **>= 0.12.0** (the `AgentSwarm` tool); `--max-concurrency` only binds on **>= 0.18.0**
51
+ - requires an exact certified CLI (legacy minimum 0.12.0); older versions gain normal-launch concurrency support at 0.18.0, while exact 2.6.2 uses the bounded-wave/direct-worker construction
51
52
  - `/kimi:result <jobId> --json` returns a structured envelope with metadata plus the artifact body.
52
53
 
53
54
  When swarm completes:
package/commands/swarm.md CHANGED
@@ -18,14 +18,16 @@ Supported flags:
18
18
 
19
19
  - `--write` — fan out EDITS (not just review). Requires kimi-code **>= 0.18.0**, a git repo with a committed HEAD, and the PreToolUse hook. Bases the worktree on HEAD: **uncommitted changes are NOT included** (you'll get a warning) — commit or stash first if the swarm needs them. `--write` is also reachable via the model-invocable `kimi-swarm-write` subagent, with strict triggering (many disjoint write targets AND explicit fan-out intent); auto-dispatch widens no write surface and keeps every bound, and the slash command itself stays human-only.
20
20
  - `--budget <duration>` — HARD wall-clock ceiling (e.g. `30m`, `1h`, `90s`; bare number = minutes). Default 30m. The always-on bound on cost/runaway.
21
- - `--cap <N>` — SOFT cap on TOTAL subagent count: injected into the prompt as a model instruction. Advisory, not hook-enforced (the hook is stateless and can't count subagents), so the model may exceed it. Bounds lifetime total, not peak parallelism.
22
- - `--max-concurrency <N>` — caps normal launches of concurrent subagents on kimi-code **0.18.0+** (exported as `KIMI_CODE_AGENT_SWARM_MAX_CONCURRENCY`; older binaries ignore it). **Defaults to 4 for read, 1 for `--write`** (normal-launch writes serialize by default since disjoint-target partitioning is prompt-only) — pass a value to widen or throttle. On reviewed 2.5.3/2.6.0 sources, rate-limit recovery can exceed this setting; it is not an unconditional hard ceiling. Distinct from `--cap`: concurrency (simultaneous) ≠ total count (lifetime).
21
+ - `--cap <N>` — SOFT cap on TOTAL subagent count: injected into the prompt as a model instruction. Advisory, not hook-enforced (the hook does not maintain a lifetime-total count), so the model may exceed it. Bounds lifetime total, not peak parallelism.
22
+ - `--max-concurrency <N>` — defaults to **4 for read, 1 for `--write`**. On exact CLI 2.6.2, 1 selects a direct worker with delegation denied; 2 or more bounds simultaneous Kimi child-agent turns, counting fresh plus resumed entries per wave. Fresh-only waves need at least two entries: group multiple targets into disjoint entries or resume an own-session child for an odd remainder. OS subprocesses started by allowed tests are outside this count. Older certified versions use normal-launch limits on CLI 0.18.0+ and retain their rate-limit-recovery overrun. Distinct from `--cap`: simultaneous concurrency is not a lifetime-total count.
23
23
  - `-m`, `--model <name>`
24
24
 
25
25
  Prototype limitations:
26
26
 
27
+ - On exact CLI 2.6.2, a stuck child holds its wave until completion or finite whole-job stop. Native Bash backgrounding is disabled in parallel sessions, and explicit background Bash is denied for Kimi workers. Normal exit and cancellation settle verified owned processes before artifact or patch capture; an individual Bash timeout is not a descendant barrier between waves. This restriction concerns tools inside Kimi, separately from the caller's shell launch below.
28
+ - Parallel Bash has a 60-second default and 300-second maximum foreground timeout; it kills commands on expiry. Use `--max-concurrency 1` for longer tests. Native automatic timeout-to-background remains available at 1, with sequential root-agent turns and whole-job settlement before result capture.
27
29
  - **No `--background` flag** — the runtime has no detached-worker mode for swarm. That is separate from how the *caller* runs the shell command: for `--write` (30m default budget vs a 10-minute foreground Bash cap) detaching the call is expected; for a read-only fan-out the default stays foreground and detaching is a per-request choice. `--budget` and `--max-concurrency` stay finite either way, and budget expiry still captures the patch/report. To stop a run, just say so — the stop path is `companion.sh cancel` with no id (it targets the latest running job for this repo). For `--write`, prefer that over Esc: an interrupt can kill the run mid-teardown and lose the captured patch.
28
- - Read-only swarm requires kimi-code **>= 0.12.0** (the `AgentSwarm` tool); `--write` requires **>= 0.18.0** (normal-launch concurrency support; reviewed 2.5.3/2.6.0 sources have a rate-limit-recovery overrun). Both **refuse** without the `/kimi:setup` PreToolUse hook (a fan-out with no enforcement is an N-fold blast radius).
30
+ - Read-only swarm requires an exact certified CLI (legacy minimum 0.12.0); `--write` additionally requires at least 0.18.0 and committed HEAD. Both refuse without the managed PreToolUse hook. Exact 2.6.2 has the bounded-wave/direct-worker paths; older certified versions retain their documented concurrency limits.
29
31
 
30
32
  Return the companion stdout verbatim.
31
33