kimi-cli crashes with SIGSEGV on Python 3.14.0a6 due to PyYAML C extension ABI incompatibility
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Reproduce the crash with uv tool install kimi-cli --python 3.14, then trace the import path through yaml/cyaml.py, yaml/__init__.py, kimi_cli/agentspec.py, and kimi_cli/cli/info.py. Inspect how PyYAML and related C extensions are selected or built for Python 3.14. Done means kimi info and kimi no longer segfault on the reported environment while the documented Python 3.12 workaround remains understood.
Written by the indexing model from the issue text.
Description
Description
Installing kimi-cli with Python 3.14+ (required by kimi term / Toad) causes a segmentation fault when running any non-trivial command (e.g., kimi, kimi info). Commands like --help and --version work fine because they don't trigger the full import chain.
Environment
- OS: macOS 25.3.0 arm64 (Darwin)
- kimi-cli version: 1.41.0
- Python version: 3.14.0a6 (cpython-3.14.0a6-macos-aarch64-none)
- Installation method:
uv tool install kimi-cli(defaults to Python 3.14)
Steps to Reproduce
uv tool install kimi-cli --python 3.14
kimi info # SIGSEGV (exit code 139)
kimi # SIGSEGV (exit code 139)
Root Cause
The crash happens in the PyYAML C extension yaml._yaml (_yaml.cpython-314-darwin.so). The extension is compiled for Python 3.14 but appears to have an ABI incompatibility with Python 3.14.0a6, causing a segfault at import time.
Faulthandler Traceback
Fatal Python error: Segmentation fault
Current thread 0x00000001f093b100 (most recent call first):
File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 1064 in exec_module
...
File "yaml/cyaml.py", line 7 in <module>
File "yaml/__init__.py", line 13 in <module>
File "kimi_cli/agentspec.py", line 7 in <module>
File "kimi_cli/cli/info.py", line 18 in _collect_info
...
Extension modules: setproctitle._setproctitle, yaml._yaml (total: 2)
Workaround
Force installation with a stable Python version:
uv tool install --reinstall kimi-cli --python 3.12
However, this prevents using kimi term which explicitly requires Python 3.14+:
$ kimi term
`kimi term` requires Python 3.14+ because Toad requires it.
Impact
Users are stuck in a dilemma:
- Python 3.14 →
kimi termworks but kimi-cli itself crashes - Python 3.12/3.13 → kimi-cli works but
kimi termis unavailable
Suggested Fix
Ensure PyYAML and other C extensions (e.g., setproctitle) are compiled with full ABI compatibility for Python 3.14, or consider using a pure-Python YAML fallback on Python 3.14 until the ecosystem stabilizes.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
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.
More from MoonshotAI/kimi-cli
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MoonshotAI/kimi-cli#2629 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
MoonshotAI/kimi-cli#2624 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MoonshotAI/kimi-cli#2576 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
MoonshotAI/kimi-cli#2564 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MoonshotAI/kimi-cli#2532 ·
All issues in MoonshotAI/kimi-cli
Similar issues
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100