MoonshotAI / MoonshotAI/kimi-cli

Invalid tools: ['kimi_cli.tools.web:SearchWeb', 'kimi_cli.tools.web:FetchURL']

Open
#1,572 0 comments 0 reactions 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 Code CLI is running?

1.25.0

Which open platform/subscription were you using?

kimi-for-coding

Which model were you using?

No response

What platform is your computer?

Linux 6.8.9-100.fc38.x86_64 x86_64 unknown

What issue are you seeing?

2026-03-25 11:30:05.227 | ERROR | kimi_cli.cli:kimi:649 - Fatal error when running CLI

What steps can reproduce the bug?

使用 uv tool upgrade kimi-cli 升级后就会出现

What is the expected behavior?

No response

Additional information

在 ~/.local/share/uv/tools/kimi-cli/lib64/python3.13/site-packages/kimi_cli/agents/default/agent.yaml 中注释了相关工具,启动 kimi后让他自己修复:

• 问题已完全修复!从日志可以看到 SearchWeb 和 FetchURL 现在已经成功加载了:

Loaded tools: ['kimi_cli.tools.agent:Agent', ..., 'kimi_cli.tools.web:SearchWeb', 'kimi_cli.tools.web:FetchURL', ...]

问题原因: charset-normalizer 包的预编译二进制文件(mypyc 编译的 .so 文件)与 Python 3.13 不兼容,导致 trafilatura 无法导入,进而导致 FetchURL 和 SearchWeb 工具无法加载。

修复方法: 使用 --no-binary :all: 选项从源代码重新编译安装 charset-normalizer:

cd ~/.local/share/uv/tools/kimi-cli && uv pip install --force-reinstall --no-binary :all: charset-normalizer


What version of Kimi Code CLI is running?

1.25.0

Which open platform/subscription were you using?

kimi-for-coding

Which model were you using?

No response

What platform is your computer?

Linux 6.8.9-100.fc38.x86_64 x86_64 unknown

What issue are you seeing?

2026-03-25 11:30:05.227 | ERROR | kimi_cli.cli:kimi:649 - Fatal error when running CLI

What steps can reproduce the bug?

It will appear after upgrading using uv tool upgrade kimi-cli

What is the expected behavior?

No response

Additional information

Annotate the relevant tools in ~/.local/share/uv/tools/kimi-cli/lib64/python3.13/site-packages/kimi_cli/agents/default/agent.yaml and let him fix it by himself after starting kimi:

• Issue completely fixed! You can see from the log that SearchWeb and FetchURL are now loaded successfully:

Loaded tools: ['kimi_cli.tools.agent:Agent', ..., 'kimi_cli.tools.web:SearchWeb', 'kimi_cli.tools.web:FetchURL', ...]

Cause of the problem: The precompiled binary file of the charset-normalizer package (.so file compiled by mypyc) is incompatible with Python 3.13, causing trafilatura to fail to import, which in turn causes the FetchURL and SearchWeb tools to fail to load.

Fix: Reinstall charset-normalizer from source using the --no-binary :all: option:

cd ~/.local/share/uv/tools/kimi-cli && uv pip install --force-reinstall --no-binary :all: charset-normalizer

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

Start by reproducing the failure after uv tool upgrade kimi-cli on the reported Linux/Python 3.13 setup, then inspect the installed kimi_cli/agents/default/agent.yaml and the loading of SearchWeb and FetchURL. Done means the CLI starts after upgrading and both tools load without manually rebuilding charset-normalizer.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.