Skip to content

[Bug] ExitPlanMode reports "Not in plan mode" while system reminder claims plan mode is active / Plan mode 狀態不一致 #2478

Description

@proccl

Problem Description

While the system reminder explicitly says "Plan mode is active" and provides a plan file path, calling ExitPlanMode returns:

Not in plan mode. ExitPlanMode is only available during plan mode.

This makes it impossible for the assistant to exit plan mode normally. The workaround is to call EnterPlanMode again and then ExitPlanMode.

User also reported that after running /fork, plan mode can be exited normally.

Reproduction Steps

  1. Trigger plan mode (e.g. via /init or EnterPlanMode).
  2. Write the plan to the designated plan file.
  3. Call ExitPlanMode.
  4. Observe the error: Not in plan mode.
  5. Call EnterPlanMode again.
  6. Call ExitPlanMode again — now it works.

Expected Behavior

When the system reminder shows plan mode as active and the plan file exists, ExitPlanMode should recognize the state and enter the user-approval flow.

Environment

  • Kimi Code CLI
  • Plan mode triggered after /init

Workaround

  • Run /fork to create a new session, then plan mode exits normally.
  • Alternatively, call EnterPlanMode again before ExitPlanMode.

問題描述

系統 reminder 明確顯示「Plan mode is active」並給出 plan file 路徑,但呼叫 ExitPlanMode 時卻回傳:

Not in plan mode. ExitPlanMode is only available during plan mode.

這導致助手無法正常退出 plan mode,必須重新呼叫 EnterPlanMode 後再 ExitPlanMode 才能恢復。

使用者回報執行 /fork 後即可正常退出。

復現步驟

  1. 觸發 plan mode(例如透過 /initEnterPlanMode)。
  2. 將 plan 寫入指定的 plan file。
  3. 呼叫 ExitPlanMode
  4. 觀察錯誤:Not in plan mode
  5. 再次呼叫 EnterPlanMode
  6. 再次呼叫 ExitPlanMode —— 此時成功。

預期行為

當系統 reminder 顯示 plan mode active 且 plan file 已存在時,ExitPlanMode 應正確識別狀態並進入使用者審批流程。

環境

  • Kimi Code CLI
  • 透過 /init 進入 plan mode

變通方案

  • 執行 /fork 建立新會話後可正常退出。
  • 或者先呼叫 EnterPlanMode 再呼叫 ExitPlanMode

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions