MoonshotAI / MoonshotAI/kimi-cli

Kimi CLI stuck in reading one file again and again and stuck in a loop

Open
#640 16 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
11.4k
Forks
1.3k
Avg merge
9h 47m
Merged PRs (30d)
2

Description

What version of Kimi CLI is running?

0.76

Which open platform/subscription were you using?

custom anthropic endpoint model using config.toml

Which model were you using?

mimo-v2-flash

What platform is your computer?

Linux 6.18.3-arch1-1 x86_64 omarchy

What issue are you seeing?
Image

config.toml.txt

What steps can reproduce the bug?

This bug ONLY happens when the Kimi CLI auto compacts after long sessions and after it auto compacts it can get stuck in the loop of reading the same file over and over again.

What is the expected behavior?

It should read a single file once and if its a very long file and needs to continue reading it then max maby 2-3 times.

Additional information

Have a good day kimi cli devs! this is awsome cli tool.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the loop in Kimi CLI 0.76 using the supplied config.toml, custom Anthropic endpoint, and a long session that triggers auto-compaction. Start by tracing the auto-compaction and repeated file-reading flow; done means a long session no longer rereads the same file indefinitely, with coverage for the reported behavior.

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
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.