What version of Kimi Code CLI is running?
kimi, version 1.40.0
Which open platform/subscription were you using?
Kimi Code
Which model were you using?
kimi-for-coding
What platform is your computer?
Darwin 25.4.0 arm64 arm
What issue are you seeing?
I’m encountering two related issues recently:
-
Apparent infinite loop with repeated shell commands
When the agent is analyzing a codebase and searching for symbols (e.g., class Decompress... or def get_visible), it repeatedly issues the exact same grep command dozens of times. Even after the command has already returned results, the agent continues to execute identical queries in a loop until I manually interrupt it with Ctrl+C.
Screenshot evidence: the same grep -n "class Decompress ... press_submission.py -A 10 was executed ~15 times consecutively, and later grep -n "def get_visible" ... s/task/auto_sync.py -A 25 was executed another ~12 times. I had to interrupt twice with “你是不是死循环了?”.
-
Command/response content truncated
Starting from a recent version, the CLI no longer displays the full content of commands or their outputs. Long paths and arguments are collapsed into ... (e.g., grep -n "class Decompress ... press_submission.py -A 10), making it impossible to see exactly which file is being queried or what the full output was. This significantly hinders debugging when the agent misbehaves.
What steps can reproduce the bug?
- Open a mid-to-large Python project in
kimi-cli.
- Ask the agent to analyze or locate a specific class/function (e.g., “find where
DecompressSubmission is defined” or “explain get_visible in auto_sync.py”).
- The agent starts spawning
grep commands via Used Shell (...).
- Observe: the agent repeats the same
grep command many times instead of stopping after the first successful result.
- Observe: the command string itself is truncated with
... in the terminal UI, so the full path/arguments are hidden.
What is the expected behavior?
- Deduplication / loop prevention: After a
grep or ReadFile call returns valid data, the agent should use that information to proceed with the task, rather than re-issuing the identical command indefinitely.
- Full content display: The CLI should show the complete command string and its full output (or at least provide a
--verbose/debug flag to do so), as it did in earlier versions.
Additional information
- The issue happens intermittently but has become frequent recently.
- I have already tried interrupting the session (
Interrupted by user), but the agent resumes the same loop when a similar query context is given.
- Screenshots attached showing the repeated
Used Shell entries and the truncation with ....
What version of Kimi Code CLI is running?
kimi, version 1.40.0
Which open platform/subscription were you using?
Kimi Code
Which model were you using?
kimi-for-coding
What platform is your computer?
Darwin 25.4.0 arm64 arm
What issue are you seeing?
I’m encountering two related issues recently:
Apparent infinite loop with repeated shell commands
When the agent is analyzing a codebase and searching for symbols (e.g.,
class Decompress...ordef get_visible), it repeatedly issues the exact samegrepcommand dozens of times. Even after the command has already returned results, the agent continues to execute identical queries in a loop until I manually interrupt it withCtrl+C.Screenshot evidence: the same
grep -n "class Decompress ... press_submission.py -A 10was executed ~15 times consecutively, and latergrep -n "def get_visible" ... s/task/auto_sync.py -A 25was executed another ~12 times. I had to interrupt twice with “你是不是死循环了?”.Command/response content truncated
Starting from a recent version, the CLI no longer displays the full content of commands or their outputs. Long paths and arguments are collapsed into
...(e.g.,grep -n "class Decompress ... press_submission.py -A 10), making it impossible to see exactly which file is being queried or what the full output was. This significantly hinders debugging when the agent misbehaves.What steps can reproduce the bug?
kimi-cli.DecompressSubmissionis defined” or “explainget_visibleinauto_sync.py”).grepcommands viaUsed Shell (...).grepcommand many times instead of stopping after the first successful result....in the terminal UI, so the full path/arguments are hidden.What is the expected behavior?
greporReadFilecall returns valid data, the agent should use that information to proceed with the task, rather than re-issuing the identical command indefinitely.--verbose/debug flag to do so), as it did in earlier versions.Additional information
Interrupted by user), but the agent resumes the same loop when a similar query context is given.Used Shellentries and the truncation with....