[Bug] kimi -p /goal exits 0 while the goal is still active
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- cli
調査の方向性
apps/kimi-code/src/cli/goal-prompt.ts の goalExitCode と、apps/kimi-code/test/cli/goal-prompt.test.ts のテストから始めてください。active が docs/en/guides/interaction.md に記載された終了コードにどう対応すべきか確認し、その後 pnpm -C apps/kimi-code exec vitest run test/cli/goal-prompt.test.ts を実行してください。active な goal がゼロ以外のステータスで終了し、その動作が成功するテストでカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What version of Kimi Code is running?
2.6.3 (source main snapshot, 2026-11-18). Confirmed with a unit test.
Which open platform/subscription were you using?
None involved.
Which model were you using?
None involved.
What platform is your computer?
Windows 11 x64.
What issue are you seeing?
kimi -p "/goal ..." can exit with status 0 while the goal is still active.
When the goal does not reach a terminal state before print_wait_ceiling_s, applyPrintBackgroundPolicy warns print goal wait ceiling reached and returns. runNativeGoalTurn then calls goalExitCode('active'), which falls through to the default and returns 0. CI therefore sees success for an incomplete goal.
What steps can reproduce the bug?
-
Run a goal that will not finish quickly:
kimi -p "/goal <long-running objective>" -
Set a small
print_wait_ceiling_s, or let the default ceiling expire. -
Observe the
print goal wait ceiling reachedwarning. -
The process exits
0, and the goal summary still hasstatus: active.
A unit-level reproduction is:
expect(goalExitCode('active')).toBe(GOAL_EXIT_CODES.complete); // currently passes, but is wrong
Running:
pnpm -C apps/kimi-code exec vitest run test/cli/goal-prompt.test.ts
with:
it('does not report success for an active goal', () => {
expect(goalExitCode('active')).not.toBe(GOAL_EXIT_CODES.complete);
});
fails with expected +0 not to be +0.
What is the expected behavior?
A non-terminal goal should not exit with the success code. The docs currently define 0 for complete, 3 for blocked, and 6 for paused. active should either map to a non-zero code (for example paused, or a new incomplete code) or the process should keep waiting until the goal reaches a terminal state.
Additional information
Relevant code:
apps/kimi-code/src/cli/goal-prompt.ts—GOAL_EXIT_CODES/goalExitCodeapps/kimi-code/src/cli/v2/run-v2-print.ts— goal wait ceiling and exit-code assignmentpackages/agent-core-v2/src/features/goal/goalOps.ts—activeis a valid non-terminal status
The documented exit-code contract is in docs/en/guides/interaction.md (0 complete, 3 blocked, 6 paused), and the changelog for #1704 says kimi -p "/goal ..." stays alive until the goal reaches a terminal state.
Contribution
- I am willing to submit a PR for this bug fix myself. I will wait for a maintainer's
/approvein this issue before opening the PR.
- 主要言語
- TypeScript
- スター
- 8.3k
- フォーク
- 1.4k
- 平均マージ
- 12時間 6分
- マージ済み PR(30日)
- 596
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MoonshotAI/kimi-code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
MoonshotAI/kimi-code#5539 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Kimi RC workspace folder picker does not display symbolic link directories対応中かも @markankamaransheogarat-sys が 2 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
MoonshotAI/kimi-code#5296 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MoonshotAI/kimi-code#5256 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
MoonshotAI/kimi-code#5057 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
MoonshotAI/kimi-code#5025 ·
メンテナーはふだん 1 日以内に返信
MoonshotAI/kimi-code の issue をすべて見る
似ている issue
-
area/ci bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
melgarafael/DeskcommCRM#5290 ·
メンテナーはふだん 1 日以内に返信
-
Add Alice&Botオープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
slavakurilyak/awesome-ai-agents#1048 ·
-
easy enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信