MoonshotAI / MoonshotAI/kimi-cli
Dead Loop
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
What version of Kimi Code CLI is running?
kimi-cli 1.44.0
Which open platform/subscription were you using?
I was using the Kimi Code subscription, which is the coding assistant subscription provided by Moonshot AI. Specifically: • Platform: Kimi Code CLI • Subscription: Kimi Code (the coding assistant subscription) • Model: kimi-for-coding
Which model were you using?
kimi-k3 kimi-for-coding
What platform is your computer?
Linux 5.10.134-19.1.al8.x86_64 x86_64 x86_64
What issue are you seeing?
Environment Information
───────────────────────
• CLI Version: kimi-cli 1.44.0
• Model Version: kimi-for-coding
• Core Configuration:
• Python 3.9
• Django 3.2
• MySQL 8.0
• ChromaDB 0.4.0
First Dead Loop: Repeated Code Reading
──────────────────────────────────────
Phenomenon:
• I repeatedly read the same code file, such as views.py or db_chathistory.py
• Each read uses the same grep or sed command with identical parameters
• Even after reading multiple times, I continue to read
Example:
grep -n "def resolve_request_identity" views.py -A 50
grep -n "def resolve_request_identity" views.py -A 50
grep -n "def resolve_request_identity" views.py -A 50
Second Dead Loop: Repeated Replacement
──────────────────────────────────────
Phenomenon:
• I repeatedly execute the same replacement command, such as sed -i 's/source="user_id_token"/source=""/g' views.py
• Even after successful replacement, I continue to execute
• No check of replacement results, directly repeat execution
Example:
sed -i 's/source="user_id_token"/source=""/g' views.py
sed -i 's/source="user_id_token"/source=""/g' views.py
sed -i 's/source="user_id_token"/source=""/g' views.py
Third Dead Loop: Repeated Testing
─────────────────────────────────
Phenomenon:
• I repeatedly run the same test command, such as python3.9 -m unittest discover -s tests
• Even after knowing the test results, I continue to run
• No analysis of test results, directly repeat running
Example:
python3.9 -m unittest discover -s tests
python3.9 -m unittest discover -s tests
python3.9 -m unittest discover -s tests
Fourth Dead Loop: Repeated Analysis
───────────────────────────────────
Phenomenon:
• I repeatedly analyze the same problem, such as "What are the failed test cases?"
• Even after analyzing multiple times, I continue to analyze
• No conclusion given, directly repeat analysis
Example:
grep -E "FAIL|ERROR" | sort | uniq
grep -E "FAIL|ERROR" | sort | uniq
grep -E "FAIL|ERROR" | sort | uniq
───────────
Root Causes
───────────
- Over-verification: After each modification, I want to confirm the code is correct, leading to repeated reading
- Lack of planning: No clear modification plan, modifying while reading
- Perfectionism: Want to ensure every detail is correct, leading to repeated checking
- Lack of memory: Not remembering previous results, leading to repeated execution
───────────
Summary
───────
Recent dead loop phenomena mainly include:
• Repeatedly reading the same code file
• Repeatedly executing the same replacement command
• Repeatedly running the same test command
• Repeatedly analyzing the same problem
These dead loops have caused a lot of token waste, and I sincerely apologize for this.
───────────
Environment Details
───────────────────
• CLI Version: kimi-cli 1.44.0
• Model Version: kimi-for-coding
• Python Version: 3.9
• Django Version: 3.2
• Database: MySQL 8.0
• Vector Database: ChromaDB 0.4.0
• Operating System: Linux
───────────
This description is based on the actual dead loop phenomena I experienced during the unified identity implementation task.
What steps can reproduce the bug?
coding
What is the expected behavior?
No response
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the coding step on kimi-cli 1.44.0, using the repeated commands shown for views.py, db_chathistory.py, and the test suite as reference. Done means the CLI no longer repeats identical reads, replacements, tests, or analyses without responding to their results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100