kimi-cli icon indicating copy to clipboard operation
kimi-cli copied to clipboard

File mentions (@) can't find the files

Open sudokai opened this issue 8 months ago • 7 comments

What version of Kimi Code CLI is running?

1.18.0

Which open platform/subscription were you using?

Kimi Code

Which model were you using?

kimi-for-coding

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

Since Kimi CLI 1.18.0, file mention suggestions are broken, most of the files cannot be found at all. Only files inside the current directory are suggested.

What steps can reproduce the bug?

Run kimi cli in a big directory with lots of files and subfolder tree full of files.

It seems that this happens in big directory trees, not with very simple folder structures.

What is the expected behavior?

The CLI suggests the file I'm trying to reference.

Additional information

The CLI only suggests files inside the current directory.

sudokai avatar Mar 09 '26 15:03 sudokai

Could you show some examples of the problem?

I ran kimi cli in the root folder of the open-source coding agent continue, it listed the files and folders in the root directory: Image

Then I navigated into a child folder (in this case core/), and it listed all the files there as well: Image

The current design is that when you're in the root folder, it only lists root-level files and folders. You can navigate into a subfolder to search files within it. This behavior is by design for the root directory.

Could you confirm whether you're experiencing this issue only at the root level, or also when navigating into subfolders? If it's also happening in subfolders, could you share a screenshot or example?

DRunkPiano114 avatar Mar 09 '26 16:03 DRunkPiano114

How to reproduce it:

Clone the https://github.com/apache/superset repo, start kimi cli in the repo root dir:

Claude Code (correctly suggests the file)

Image

Kimi (doesn't suggest the file):

Image

sudokai avatar Mar 09 '26 17:03 sudokai

Another example:

Image Image

sudokai avatar Mar 09 '26 17:03 sudokai

If it helps you narrowing down the issue, I first saw this behavior on kimi web, then after a few releases, on kimi cli

sudokai avatar Mar 10 '26 07:03 sudokai

Thanks for the detailed examples and following up!

The root cause is that Kimi currently uses hardcoded max limit for file/folder indexing cross the entire project, so in large repos like superset the limit gets exhausted before all files/folders are indexed.

Claude Code is folder based and only lists files and folders within the current directory level.

I'll be working on this.

DRunkPiano114 avatar Mar 10 '26 07:03 DRunkPiano114

Thanks for prioritising this. As it currently stands, Kimi CLI is close to unusable in big repositories, so a fix is very needed.

Claude Code is folder based and only lists files and folders within the current directory level.

If you check the first example I linked, Claude Code successfully managed to reference and suggest files many levels deep into the current directory:

Image

sudokai avatar Mar 10 '26 10:03 sudokai

Duplicated with #1276

hongquan avatar Mar 16 '26 09:03 hongquan