# Table of Contents
- [Kimi Code Overview | Kimi Code Docs](#kimi-code-overview-kimi-code-docs)
- [Model Configuration | Kimi Code Docs](#model-configuration-kimi-code-docs)
- [Kimi Code 概览 | Kimi Code 文档](#kimi-code-kimi-code-)
- [Membership Benefits | Kimi Code Docs](#membership-benefits-kimi-code-docs)
- [FAQ | Kimi Code Docs](#faq-kimi-code-docs)
- [Kimi Code Community Guidelines | Kimi Code Docs](#kimi-code-community-guidelines-kimi-code-docs)
- [What's New | Kimi Code Docs](#what-s-new-kimi-code-docs)
- [Error Reference | Kimi Code Docs](#error-reference-kimi-code-docs)
- [Changelog | Kimi Code Docs](#changelog-kimi-code-docs)
- [Contact and Feedback | Kimi Code Docs](#contact-and-feedback-kimi-code-docs)
- [Using the Desktop App | Kimi Code Docs](#using-the-desktop-app-kimi-code-docs)
- [Configuration | Kimi Code Docs](#configuration-kimi-code-docs)
- [Customization | Kimi Code Docs](#customization-kimi-code-docs)
- [Core Operations | Kimi Code Docs](#core-operations-kimi-code-docs)
- [Claude Code | Kimi Code Docs](#claude-code-kimi-code-docs)
- [Changelog | Kimi Code Docs](#changelog-kimi-code-docs)
- [Using Kimi in OpenCode | Kimi Code Docs](#using-kimi-in-opencode-kimi-code-docs)
- [Quick Start | Kimi Code Docs](#quick-start-kimi-code-docs)
- [Claude Code | Kimi Code Docs](#claude-code-kimi-code-docs)
- [在 IDE 中使用 | Kimi Code 文档](#-ide-kimi-code-)
- [Using Kimi in OpenCode | Kimi Code Docs](#using-kimi-in-opencode-kimi-code-docs)
- [Using Kimi in Codex | Kimi Code Docs](#using-kimi-in-codex-kimi-code-docs)
- [Using Kimi in Codex | Kimi Code Docs](#using-kimi-in-codex-kimi-code-docs)
- [Using Kimi in Hermes Agent | Kimi Code Docs](#using-kimi-in-hermes-agent-kimi-code-docs)
- [开始使用 | Kimi Code 文档](#-kimi-code-)
- [快速开始 | Kimi Code 文档](#-kimi-code-)
- [从 kimi-cli 迁移 | Kimi Code 文档](#-kimi-cli-kimi-code-)
- [常见问题 | Kimi Code 文档](#-kimi-code-)
- [Claude Code | Kimi Code 文档](#claude-code-kimi-code-)
- [Quick Start | Kimi Code Docs](#quick-start-kimi-code-docs)
- [远程控制 | Kimi Code 文档](#-kimi-code-)
- [平台与模型 | Kimi Code 文档](#-kimi-code-)
- [Membership Benefits | Kimi Code Docs](#membership-benefits-kimi-code-docs)
- [在网页中使用 | Kimi Code 文档](#-kimi-code-)
- [会话与上下文 | Kimi Code 文档](#-kimi-code-)
- [交互与输入 | Kimi Code 文档](#-kimi-code-)
- [数据路径 | Kimi Code 文档](#-kimi-code-)
- [环境变量 | Kimi Code 文档](#-kimi-code-)
- [Kimi Code 社区倡议 | Kimi Code 文档](#kimi-code-kimi-code-)
- [错误参考(Error Reference) | Kimi Code 文档](#-error-reference-kimi-code-)
- [快速开始 | Kimi Code 文档](#-kimi-code-)
- [变更记录 | Kimi Code 文档](#-kimi-code-)
- [会员权益 | Kimi Code 文档](#-kimi-code-)
- [最新动态 | Kimi Code 文档](#-kimi-code-)
- [使用桌面端 | Kimi Code 文档](#-kimi-code-)
- [Model Context Protocol | Kimi Code 文档](#model-context-protocol-kimi-code-)
- [Agent Skills | Kimi Code 文档](#agent-skills-kimi-code-)
- [kimi 命令 | Kimi Code 文档](#kimi-kimi-code-)
- [配置文件 | Kimi Code 文档](#-kimi-code-)
- [斜杠命令 | Kimi Code 文档](#-kimi-code-)
- [内置工具 | Kimi Code 文档](#-kimi-code-)
- [键盘快捷键 | Kimi Code 文档](#-kimi-code-)
- [配置覆盖 | Kimi Code 文档](#-kimi-code-)
- [常见使用案例 | Kimi Code 文档](#-kimi-code-)
- [服务 API | Kimi Code 文档](#-api-kimi-code-)
- [核心操作 | Kimi Code 文档](#-kimi-code-)
- [联系与反馈 | Kimi Code 文档](#-kimi-code-)
- [配置 | Kimi Code 文档](#-kimi-code-)
- [定制化 | Kimi Code 文档](#-kimi-code-)
- [在 OpenCode 中使用 | Kimi Code 文档](#-opencode-kimi-code-)
- [在 OpenCode 中使用 | Kimi Code 文档](#-opencode-kimi-code-)
- [在 Codex 中使用 | Kimi Code 文档](#-codex-kimi-code-)
- [变更记录 | Kimi Code 文档](#-kimi-code-)
- [Agent 与 subagent | Kimi Code 文档](#agent-subagent-kimi-code-)
- [Hooks | Kimi Code 文档](#hooks-kimi-code-)
- [自定义主题 | Kimi Code 文档](#-kimi-code-)
- [kimi acp 子命令 | Kimi Code 文档](#kimi-acp-kimi-code-)
- [Plugins | Kimi Code 文档](#plugins-kimi-code-)
- [Claude Code | Kimi Code 文档](#claude-code-kimi-code-)
- [模型配置 | Kimi Code 文档](#-kimi-code-)
- [在 Codex 中使用 | Kimi Code 文档](#-codex-kimi-code-)
- [在 Hermes Agent 中使用 | Kimi Code 文档](#-hermes-agent-kimi-code-)
- [会员权益 | Kimi Code 文档](#-kimi-code-)
---
# Kimi Code Overview | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/#VPContent)
On this page
Kimi Code Overview [](https://www.kimi.com/code/docs/en/#kimi-code-overview)
==============================================================================
What is Kimi Code [](https://www.kimi.com/code/docs/en/#what-is-kimi-code)
----------------------------------------------------------------------------
Kimi Code is an intelligent programming service for developers included in [Kimi membership benefits](https://www.kimi.com/membership/pricing?from=kfc_docs_overview)
. Built on Kimi's latest flagship models, it provides AI-assisted capabilities—such as code reading, file editing, and command execution—through product forms like the Desktop app, CLI, and VS Code extension. Subscribers can also obtain an API Key to integrate Kimi Code's model capabilities into third-party development tools and platforms.
Core Advantages [](https://www.kimi.com/code/docs/en/#core-advantages)
------------------------------------------------------------------------
**1\. Models and inference**
Flagship K3 modelPowered by our strongest flagship model K3 — 2.8 trillion parameters — excelling at long-horizon programming, front-end visual design, knowledge work, and complex reasoning.
1M-token context windowA million-token context loads an entire large codebase with cross-module dependencies in one pass, enabling whole-project understanding and refactoring.
260 tokens/s inferenceChoose between the standard K2.8 Preview and the K2.7 Code HighSpeed tier, with output up to 260 tokens/s for a noticeably faster coding loop.
**2\. Ecosystem and extensibility**
Professional data sourcesPlug in professional-grade data sources to extend what AI coding can do.
Works with mainstream toolsCompatible with Kimi Code CLI, Claude Code, VS Code, and other mainstream agent tools — switch models seamlessly.
Early access to experimental featuresBe first to try Kimi's latest model and inference capabilities as they land.
Getting Started [](https://www.kimi.com/code/docs/en/#getting-started)
------------------------------------------------------------------------
Kimi Code allows members to use their benefits in both the official client and third-party platforms, covering different development scenarios.
### Using the Official Client [](https://www.kimi.com/code/docs/en/#using-the-official-client)
Choose the client that fits you and install with one click:
Kimi Code DesktopKimi Code CLIKimi Code for VS Code
For developers who prefer a graphical app. Open a local project folder in Kimi Code Desktop and let the Agent read code, edit files, run commands, and verify results through conversation. Available on macOS and Windows.
[Kimi Code DesktopmacOS · Apple Silicon](https://code.kimi.com/kimi-code/desktop/download/KimiCode-mac-arm64.dmg)
[Kimi Code DesktopmacOS · Intel](https://code.kimi.com/kimi-code/desktop/download/KimiCode-mac-x64.dmg)
[Kimi Code DesktopWindows](https://code.kimi.com/kimi-code/desktop/download/KimiCode-win-x64.exe)
After installing, open the app and sign in with your Kimi account as prompted—no API Key management needed. See [Desktop Quick Start](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html)
for more.
For developers who prefer terminal operations. Chat with AI in the terminal, letting it read code, edit files, execute commands, search the web, and autonomously complete development tasks.
📢 CLI Upgraded
Kimi Code CLI has gone through a major version upgrade — moving from Python/uv to Node.js, bringing a simpler install experience, faster startup, and a redesigned terminal UI. The legacy version will no longer be maintained. See [Version Upgrade](https://www.kimi.com/code/docs/kimi-code-cli/guides/migration.html)
for details and migration instructions, or refer to the legacy Python-based Kimi Code [docs](https://moonshotai.github.io/kimi-cli/en/)
if needed.
bash
# macOS / Linux
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
powershell
# Windows (PowerShell)
irm https://code.kimi.com/kimi-code/install.ps1 | iex
After installation, run `kimi` in the terminal to start; on first use, log in to the Kimi Code platform with the `/login` command to complete the connection — no need to manually manage an API Key.
For developers who prefer the VS Code editor. Collaborate with AI in the editor sidebar, supporting code completion, file editing, web search, and automated tasks.
Search for "Kimi Code" in the VS Code Extensions marketplace to install, or visit [Visual Studio Marketplace](vscode:extension/moonshot-ai.kimi-code)
. After installation, complete the connection via the login button in the sidebar — no need to manually manage an API Key.
> If the extension doesn't appear after installation, restart VS Code or run "Developer: Reload Window" from the Command Palette (Mac: Cmd+Shift+P, Windows/Linux: Ctrl+Shift+P).
Other editors such as JetBrains and Zed can connect via CLI's ACP protocol. See [Using Kimi Code CLI in IDEs](https://www.kimi.com/code/docs/kimi-code-cli/guides/ides.html)
for details.
### API Access [](https://www.kimi.com/code/docs/en/#api-access)
When integrating Kimi Code into third-party development tools, you need to manually configure an API Key to complete authentication.
#### Service Endpoint [](https://www.kimi.com/code/docs/en/#service-endpoint)
The Kimi Code API is compatible with both OpenAI and Anthropic protocols. Different tools have different requirements for address configuration:
* **Base URL**: Some tools (e.g., Claude Code) only require the Base URL, and the tool will automatically append the subsequent path.
* **Full Endpoint**: Some tools (e.g., Trae) require the complete API request address.
Choose the corresponding address as needed:
| Protocol | Base URL | Common Endpoint Example |
| --- | --- | --- |
| OpenAI Compatible | China: `https://api.kimi.com/coding/v1` Overseas: `https://api.kimi.ai/coding/v1` | `https://api.kimi.com/coding/v1/chat/completions` |
| Anthropic Compatible | China: `https://api.kimi.com/coding/` Overseas: `https://api.kimi.ai/coding/` | `https://api.kimi.com/coding/v1/messages` |
#### Model IDs [](https://www.kimi.com/code/docs/en/#model-ids)
Different model IDs correspond to different membership tiers and context windows. See [Membership Benefits](https://www.kimi.com/code/docs/en/kimi-code/membership.html)
for details.
Both protocols accept the following 4 model IDs:
| Model ID | Description |
| --- | --- |
| `k3` | K3 — available to Moderato / Plus members and above; Allegretto / Pro members and above unlock the up-to-1M context window; supports `low` / `high` / `max` thinking effort levels. Best for large codebase analysis, multi-file refactoring, and long-document processing. |
| `k3-256k` | K3 256K context version — available to Moderato / Plus members and above; supports `low` / `high` / `max` thinking effort levels. Within 256k context, it delivers the same results as K3. `k3` (1M) consumes about twice as much quota as `k3-256k`. Ideal for everyday Q&A, code completion, routine feature development, and single-file or small-file edits — video input is not supported. |
| `kimi-for-coding` | K2.8 Preview — available to Andante / Plus members and above; supports up to 1M context and `low` / `high` / `max` reasoning effort. |
| `kimi-for-coding-highspeed` | K2.7 Code HighSpeed — available to Allegretto / Pro members and above. |
See [Model configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html)
for model capabilities and setup details.
#### Obtaining an API Key [](https://www.kimi.com/code/docs/en/#obtaining-an-api-key)
Kimi members can create and manage API Keys in the [Kimi Code Console](https://www.kimi.com/code/console)
(up to 5 keys; each is shown only once upon creation—please keep it safe).
#### Configuring in Third-Party Tools [](https://www.kimi.com/code/docs/en/#configuring-in-third-party-tools)
After obtaining an API Key, configure the corresponding Base URL and API Key in the environment variables of the respective tool to start using it. For detailed setup steps, see the corresponding tool guide:
[Claude CodeAnthropic's command-line coding assistant](https://www.kimi.com/code/docs/en/third-party-tools/claude-code)
[OpenCodeA terminal-based coding agent](https://www.kimi.com/code/docs/en/third-party-tools/opencode)
[CodexOpenAI's coding agent](https://www.kimi.com/code/docs/en/third-party-tools/codex)
> **Note**: Please maintain the tool's real identity identifier when using. Tampering with the client identifier (User-Agent) is considered a violation and may result in suspension of membership benefits.
Platform Comparison [](https://www.kimi.com/code/docs/en/#platform-comparison)
--------------------------------------------------------------------------------
Kimi Code membership benefits are designed specifically for programming scenarios. If you need to call large model capabilities in your own product, or require team collaboration and usage management, please visit the [Kimi Platform](https://platform.kimi.ai/)
.
| Comparison Item | Kimi Code Platform | Kimi Platform |
| --- | --- | --- |
| Base URL | OpenAI Compatible: China `https://api.kimi.com/coding/v1` Overseas `https://api.kimi.ai/coding/v1` Anthropic Compatible: China `https://api.kimi.com/coding/` Overseas `https://api.kimi.ai/coding/` | China `https://api.moonshot.cn/v1` Overseas `https://api.moonshot.ai/v1` |
| Billing | Membership subscription, monthly/annual payment, with rate limiting | Pay-as-you-go, top up and use |
| Best For | Terminal/IDE Agent programming, multi-file engineering tasks | Product integration, enterprise-level calls, multimodal application development |
Next Steps [](https://www.kimi.com/code/docs/en/#next-steps)
--------------------------------------------------------------
* [Kimi Code CLI Quick Start](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html)
– Install, log in, and start your first conversation
* [Kimi Code for VS Code Quick Start](https://www.kimi.com/code/docs/kimi-code-for-vscode/getting-started.html)
– Install the extension, log in, and typical workflows
* [Using in More Third-Party Tools](https://www.kimi.com/code/docs/third-party-tools/claude-code.html)
– Claude Code, OpenCode, Codex, and more
* [Membership Benefits](https://www.kimi.com/code/docs/en/kimi-code/membership.html)
– Quota refresh and rate limits, quota sharing, Extra Usage, and more
* [FAQ](https://www.kimi.com/code/docs/kimi-code/faq.html)
– Common issues with installation, login, and usage
---
# Model Configuration | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code/models.html#VPContent)
On this page
Model Configuration [](https://www.kimi.com/code/docs/en/kimi-code/models.html#model-configuration)
=====================================================================================================
This page covers the models Kimi Code provides and how to switch between them in each client.
Model Overview [](https://www.kimi.com/code/docs/en/kimi-code/models.html#model-overview)
-------------------------------------------------------------------------------------------
Kimi Code currently offers three models—K3, K2.8 Preview, and K2.7 Code HighSpeed—across four model IDs, selectable by model ID in clients or third-party tools. Model specs:
Recommended model launch
**K2.8 Preview** is now fully rolled out in Kimi Code — `kimi-for-coding` is upgraded in place with no configuration changes: performance close to K3, with `low` / `high` / `max` thinking effort levels and up to 1M context. See [What's New](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html)
.
| Model ID | `k3` | `k3-256k` | `kimi-for-coding` | `kimi-for-coding-highspeed` |
| --- | --- | --- | --- | --- |
| Model version | K3 | K3 | K2.8 Preview | K2.7 Code HighSpeed |
| Description | The most capable flagship coding model: 2.8T parameters, 1M context window | The 256K context version of K3 — `k3` (1M) consumes about twice as much quota as `k3-256k` | Performance close to K3 with more efficient thinking; good at code completion and routine development tasks | The high-speed version of K2.7 Code, with the same coding ability and ~5–6× faster output |
| Speed | Regular | Regular | Regular | HighSpeed (6× speed, 3× quota usage) |
| Context window | `1048576` (for higher-tier members) | `262144` only | `1048576` | `262144` |
| Reasoning | `reasoning_effort:low` / `high` / `max` (default `high`) | `reasoning_effort:low` / `high` / `max` (default `high`) | `reasoning_effort:low` / `high` / `max` (default `max`) | `Thinking:ON` |
| Availability (new plans) | Plus and above 1M context for Pro and above | Plus and above | Plus and above | Pro and above |
| Availability (legacy plans) | Moderato and above 1M context for Allegretto and above | Moderato and above | Andante and above | Allegretto and above |
| Multimodal input | Image, video | Image only | Image, video | Image, video |
Need a higher membership plan?
Different membership plans unlock different models, context windows, and speeds. [**Upgrade your plan →**](https://www.kimi.com/code/#pricing)
Why did usage go up after the new model launched?
After switching models, the context cache built earlier no longer hits on the new model, so that context has to be re-prefilled. Usage therefore looks higher right after switching. Recommended action:
* **Start a new session when using the new model**: this gives better results and lower consumption.
Why do I still get a 401 with the correct model ID?
When the requested capability exceeds your plan's entitlements, the server returns `401`. Three common cases:
* **No K3 access**: your plan is below Moderato / Plus and can't call `k3`, `k3-256k` (the new Go tier has no coding quota) — upgrade to Moderato / Plus or above.
* **No 1M access**: on a Moderato / Plus plan, `k3` supports up to 256K context; up to 1M context is available on Allegretto / Pro or above. `k3-256k` has a fixed 256K context limit.
* **No HighSpeed access**: some plans don't include HighSpeed — upgrade to Allegretto / Pro or above to call `kimi-for-coding-highspeed`.
For the full error text and how to handle it, see the [Error Reference](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html)
.
Why isn't HighSpeed noticeably faster?
Two common reasons:
* **Mistyped model ID**: the HighSpeed ID must be `kimi-for-coding-highspeed`; a wrong value silently falls back to the standard `kimi-for-coding` — no error, no speedup.
* **Tools and scripts dominate**: HighSpeed only speeds up **model output**. Tool calls (reading/writing files, running commands, etc.) and script execution are unaffected, so when they take up most of a turn the overall speedup feels small.
How to reduce the overhead of switching reasoning effort?
Switching reasoning effort invalidates the context cache you've built up, so context that would have hit the cache must be re-prefilled. To avoid triggering re-prefill too often:
* Pick an effort that fits the task and keep it consistent within a session;
* When you genuinely need a different effort, start a new session rather than switching back and forth in a long session.
Switching between K3 (1M) and K3-256k
**Switching from K3 (1M) to K3-256k**: if the current session's context already exceeds 256k, some coding tools (such as Kimi Code CLI and Claude Code) will perform a compact on the tool side. Recommendations:
1. Manually run compact once before switching to compress the context to within 256k. This preserves the key points of the task, keeps the session intact, and lets you benefit from more durable quota after switching.
2. If the conversation history includes video files, switching directly will fail because K3-256k does not support video input. Please compact first, then switch.
**Switching from K3-256k to K3 (1M)**: if `k3-256k` is close to the 256k limit and you don't want compact to lose information, you can switch directly to 1M. The current version switching from 256k to 1M does not affect the cache.
How to Switch Models [](https://www.kimi.com/code/docs/en/kimi-code/models.html#switch-model)
-----------------------------------------------------------------------------------------------
Usage notes
* **Start a new session when switching model IDs**: switching models invalidates the context cache you've built up. We recommend starting a new session to get the best experience and avoid extra token consumption.
* **Fill in the Model ID, not the model version name**: when calling a model, use one of the Model IDs from the table above (`k3`, `k3-256k`, `kimi-for-coding`, `kimi-for-coding-highspeed`). Entering a model version name like `K3` or `K2.8 Preview` will cause the call to fail.
* **Thinking off routes to K2.8 Preview (no thinking)**: with thinking disabled, requests to the K3 series and K2.8 Preview are served by K2.8 Preview with thinking off.
Ways to switch to the target model:
### Official clients [](https://www.kimi.com/code/docs/en/kimi-code/models.html#official-clients)
* **Kimi Code Desktop**: switch models in the model picker inside the Composer; if the target model isn't listed yet, restart the app or sign in again.
* **Official Kimi Code CLI**: type `/model` to switch models—no config changes needed; if the latest model isn't listed yet, `/logout` and sign in again with `/login`.
* **Kimi Code for VS Code**: pick the target model from the dropdown menu in the input bar; if it isn't listed yet, restart VS Code or reinstall the extension.
### Third-party tools [](https://www.kimi.com/code/docs/en/kimi-code/models.html#third-party-tools)
Set the tool's Model ID to the target model. Detailed steps:
1. Create an API Key in the [Kimi Code Console](https://www.kimi.com/code/console)
.
2. Fill in the Base URL and the corresponding Model ID in your tool.
Kimi Code API supports both OpenAI and Anthropic protocols. Base URLs:
| Protocol | Base URL |
| --- | --- |
| OpenAI compatible | China `https://api.kimi.com/coding/v1` Overseas `https://api.kimi.ai/coding/v1` |
| Anthropic compatible | China `https://api.kimi.com/coding/` Overseas `https://api.kimi.ai/coding/` |
For detailed setup steps, see the corresponding tool guide:
[Claude CodeAnthropic's command-line coding assistant](https://www.kimi.com/code/docs/en/third-party-tools/claude-code)
[OpenCodeA terminal-based coding agent](https://www.kimi.com/code/docs/en/third-party-tools/opencode)
[CodexOpenAI's coding agent](https://www.kimi.com/code/docs/en/third-party-tools/codex)
Effort mapping in third-party tools
Both K3 and K2.8 Preview support `low` / `high` / `max` thinking effort levels; the effort a tool sends is mapped as below:
# default
null / undefined → model default (high for K3, max for K2.8 Preview)
any other unknown → HTTP 400 error
# → max
ultra / max / xhigh → max
# → high (recommended)
high / medium → high
# → low
low / minimum / light → low
# → thinking disabled
none → thinking.type disabled
---
# Kimi Code 概览 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/#VPContent)
On this page
Kimi Code 概览 [](https://www.kimi.com/code/docs/#kimi-code-%E6%A6%82%E8%A7%88)
===============================================================================
Kimi Code 是什么 [](https://www.kimi.com/code/docs/#kimi-code-%E6%98%AF%E4%BB%80%E4%B9%88)
-----------------------------------------------------------------------------------------
Kimi Code 是 [Kimi 会员权益](https://www.kimi.com/membership/pricing?from=kfc_docs_overview)
中专为开发者提供的智能编程服务,基于 Kimi 最新旗舰模型,通过桌面端、CLI、VS Code 扩展插件等产品形态,为开发者提供代码阅读、文件编辑、命令执行等 AI 辅助能力。同时,订阅用户可获取 API Key,将 Kimi Code 的模型能力接入到第三方开发工具与平台。
核心优势 [](https://www.kimi.com/code/docs/#%E6%A0%B8%E5%BF%83%E4%BC%98%E5%8A%BF)
-------------------------------------------------------------------------------
**一、模型与推理**
旗舰 K3 模型搭载最强旗舰模型 K3,参数规模高达 2.8 万亿,在长程编程、前端视觉设计、知识工作与复杂推理等核心场景表现卓越。
1M Tokens 超长上下文支持百万级上下文窗口,可一次性完整载入大型代码库及跨模块依赖,实现全局代码理解与项目级重构。
260 Tokens/s 极速推理提供 K2.8 Preview 普速版与 K2.7 Code HighSpeed 高速版双模式,推理速度最高可达 260 Tokens/s,显著加速编码效率。
**二、扩展与生态**
专业知识库(Data Source)支持接入专业级数据源,深度扩展 AI Coding 能力边界。
主流工具无缝兼容全面兼容 Kimi Code CLI、Claude Code、VS Code 等主流 Agent 工具,模型切换丝滑无感。
实验性功能优先开放优先体验 Kimi 在模型与推理领域的最新技术与产品实现,先人一步触达前沿特性。
开始使用 [](https://www.kimi.com/code/docs/#%E5%BC%80%E5%A7%8B%E4%BD%BF%E7%94%A8)
-------------------------------------------------------------------------------
Kimi Code 支持会员在官方客户端和第三方平台使用权益,覆盖不同的开发场景。
### 使用官方客户端 [](https://www.kimi.com/code/docs/#%E4%BD%BF%E7%94%A8%E5%AE%98%E6%96%B9%E5%AE%A2%E6%88%B7%E7%AB%AF)
选择适合你的客户端,一键安装:
Kimi Code DesktopKimi Code CLIKimi Code for VS Code
适合希望在图形界面中管理项目和会话的开发者。在桌面端中打开本地项目文件夹,与 AI 对话完成代码阅读、文件编辑、命令执行和结果验证,支持 macOS 与 Windows。
[Kimi Code 桌面版macOS · Apple Silicon](https://code.kimi.com/kimi-code/desktop/download/KimiCode-mac-arm64.dmg)
[Kimi Code 桌面版macOS · Intel](https://code.kimi.com/kimi-code/desktop/download/KimiCode-mac-x64.dmg)
[Kimi Code 桌面版Windows](https://code.kimi.com/kimi-code/desktop/download/KimiCode-win-x64.exe)
安装后打开应用,按页面提示登录 Kimi 账号即可开始使用,无需手动管理 API Key。更多说明见[桌面端快速开始](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html)
。
适合习惯终端操作的开发者。在终端中与 AI 对话,让它阅读代码、编辑文件、执行命令、搜索网页,自主完成开发任务。
📢 CLI 已升级
Kimi Code CLI 已完成重大版本升级,底层从 Python/uv 迁移至 Node.js,带来更简单的安装方式、更快的启动速度和全新的终端界面。旧版将不再维护。查看 [版本升级](https://www.kimi.com/code/docs/kimi-code-cli/guides/migration.html)
了解详情和迁移方式,如需参考旧版内容,请查阅 Python 版 Kimi Code [文档站](https://moonshotai.github.io/kimi-cli/zh/)
。
bash
# macOS / Linux
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
powershell
# Windows (PowerShell)
irm https://code.kimi.com/kimi-code/install.ps1 | iex
安装完成后,在终端中运行 `kimi` 启动,首次使用通过 `/login` 命令登录 Kimi Code 平台即完成接入,无需手动管理 API Key。
适合偏好使用 VS Code 编辑器的开发者。在编辑器侧边栏与 AI 协同,支持代码补全、文件编辑、网页搜索和自动化任务。
在 VS Code 扩展市场搜索 "Kimi Code" 安装,或访问 [Visual Studio Marketplace](vscode:extension/moonshot-ai.kimi-code)
。安装后通过侧边栏的登录按钮完成接入,无需手动管理 API Key。
> 若安装后未显示扩展,请重启 VS Code 或在命令面板中执行 "Developer: Reload Window" (Mac: Cmd+Shift+P, Windows/Linux: Ctrl+Shift+P)。
其他编辑器如 JetBrains、Zed 可通过 CLI 的 ACP 协议接入使用,详见 [在 IDE 中使用](https://www.kimi.com/code/docs/kimi-code-cli/guides/ides.html)
。
### API 接入 [](https://www.kimi.com/code/docs/#api-%E6%8E%A5%E5%85%A5)
将 Kimi Code 接入第三方开发工具时,需要手动配置 API Key 完成认证。
#### 服务地址 [](https://www.kimi.com/code/docs/#%E6%9C%8D%E5%8A%A1%E5%9C%B0%E5%9D%80)
Kimi Code API 同时兼容 OpenAI 和 Anthropic 两种协议。不同工具对地址配置的要求不同:
* **Base URL**:部分工具(如 Claude Code)只需填写 Base URL,工具会自动拼接后续路径。
* **完整 Endpoint**:部分工具(如 Trae)需要填写完整的 API 请求地址。
按需选择对应的地址:
| 协议 | Base URL | 常用 Endpoint 示例 |
| --- | --- | --- |
| OpenAI 兼容 | 国内:`https://api.kimi.com/coding/v1` 海外:`https://api.kimi.ai/coding/v1` | `https://api.kimi.com/coding/v1/chat/completions` |
| Anthropic 兼容 | 国内:`https://api.kimi.com/coding/` 海外:`https://api.kimi.ai/coding/` | `https://api.kimi.com/coding/v1/messages` |
#### 模型 ID [](https://www.kimi.com/code/docs/#%E6%A8%A1%E5%9E%8B-id)
不同模型 ID 对应不同的会员档位与上下文窗口,具体权益见 [会员权益](https://www.kimi.com/code/docs/kimi-code/membership.html)
。
两种协议均可使用以下 4 个模型 ID:
| Model ID | 说明 |
| --- | --- |
| `k3` | K3,Moderato / Plus 及以上会员可调用,Allegretto / Pro 及以上会员可解锁最高 100 万上下文;支持 `low` / `high` / `max` 三档思考强度,适合大型代码库分析、多文件重构、超长文档处理等长上下文任务。 |
| `k3-256k` | K3 256K 上下文版,Moderato / Plus 及以上会员可调用;支持 `low` / `high` / `max` 三档思考强度。256k 上下文内效果与 K3 相同,`k3`(1M)消耗约为 `k3-256k` 两倍,适合日常问答、代码补全、常规功能开发、单文件或少量文件修改场景,不支持视频输入。 |
| `kimi-for-coding` | K2.8 Preview,Andante / Plus 及以上会员可用;支持最高 1M 上下文与 `low` / `high` / `max` 三档思考强度。 |
| `kimi-for-coding-highspeed` | K2.7 Code 高速版,Allegretto / Pro 及以上会员可用。 |
模型能力与配置细节见 [模型配置](https://www.kimi.com/code/docs/kimi-code/models.html)
。
#### 获取 API Key [](https://www.kimi.com/code/docs/#%E8%8E%B7%E5%8F%96-api-key)
Kimi 会员可在 [Kimi Code 控制台](https://www.kimi.com/code/console)
创建和管理(最多 5 个,仅创建时显示一次,请妥善保存)。
#### 配置到第三方工具 [](https://www.kimi.com/code/docs/#%E9%85%8D%E7%BD%AE%E5%88%B0%E7%AC%AC%E4%B8%89%E6%96%B9%E5%B7%A5%E5%85%B7)
获取 API Key 后,将对应 Base URL 和 API Key 配置到对应工具的环境变量即可使用。详细配置步骤请参考对应工具的接入文档:
[Claude CodeAnthropic 的命令行编程助手](https://www.kimi.com/code/docs/third-party-tools/claude-code)
[OpenCode终端编程 Agent](https://www.kimi.com/code/docs/third-party-tools/opencode)
[CodexOpenAI 的编程 Agent](https://www.kimi.com/code/docs/third-party-tools/codex)
> **注意**:使用时请保持工具的真实身份标识,篡改客户端标识(User-Agent)将被视为违规,可能导致会员权益暂停。
平台对比 [](https://www.kimi.com/code/docs/#%E5%B9%B3%E5%8F%B0%E5%AF%B9%E6%AF%94)
-------------------------------------------------------------------------------
Kimi Code 会员权益专为编程场景设计。如需在自己的产品中调用大模型能力,或需要团队协作与用量管理,请访问 [Kimi 开放平台](https://platform.kimi.com/)
。
| 对比项 | Kimi Code 平台 | Kimi 开放平台 |
| --- | --- | --- |
| Base URL | OpenAI 兼容: 国内 `https://api.kimi.com/coding/v1` 海外 `https://api.kimi.ai/coding/v1` Anthropic 兼容: 国内 `https://api.kimi.com/coding/` 海外 `https://api.kimi.ai/coding/` | 国内 `https://api.moonshot.cn/v1` 海外 `https://api.moonshot.ai/v1` |
| 计费方式 | 会员订阅,按月/年付费,有频控限制 | 按量付费,充值即用 |
| 最佳场景 | 终端/IDE Agent 编程、多文件工程任务 | 产品集成、企业级调用、多模态应用开发 |
下一步 [](https://www.kimi.com/code/docs/#%E4%B8%8B%E4%B8%80%E6%AD%A5)
---------------------------------------------------------------------
* [Kimi Code CLI 快速开始](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html)
– 安装、登录、第一次对话
* [Kimi Code for VS Code 快速开始](https://www.kimi.com/code/docs/kimi-code-for-vscode/getting-started.html)
– 安装扩展、登录、典型工作流
* [在更多第三方工具中使用](https://www.kimi.com/code/docs/third-party-tools/claude-code.html)
– Claude Code、OpenCode、Codex 等
* [会员权益](https://www.kimi.com/code/docs/kimi-code/membership.html)
– 额度刷新与频率限制、配额共享、加油包等
* [常见问题](https://www.kimi.com/code/docs/kimi-code/faq.html)
– 安装、登录、使用中的常见问题
---
# Membership Benefits | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code/membership.html#VPContent)
On this page
Membership Benefits [](https://www.kimi.com/code/docs/en/kimi-code/membership.html#membership-benefits)
=========================================================================================================
📢 New plans released
The new Kimi membership plans are now available, with pricing unchanged — see the [Kimi Code plan page](https://www.kimi.ai/code/#pricing)
for plan details and pricing. For new members, **the weekly quota limit is removed**, and only the rolling 5-hour rate window remains. The Go tier has no coding quota; Plus and above can use Kimi Code. Existing subscribers on legacy plans are not affected: the tier name, quota rules, and auto-renewal all remain as they are. See the [plan comparison](https://www.kimi.com/code/docs/en/kimi-code/membership.html#plan-comparison)
below for the differences between the legacy and new plans.
Overview [](https://www.kimi.com/code/docs/en/kimi-code/membership.html#overview)
-----------------------------------------------------------------------------------
Kimi Code is the developer-focused AI coding service within [Kimi membership benefits](https://www.kimi.com/membership/pricing?from=kfc_docs_membership)
, provided together with a Kimi membership subscription and sharing the same quota. Requests from the CLI, VS Code, Desktop, and third-party tools all count toward that quota.
See the [Kimi membership page](https://www.kimi.com/membership/pricing?from=kfc_docs_membership)
for tiers and pricing.
Membership Tiers [](https://www.kimi.com/code/docs/en/kimi-code/membership.html#plan-comparison)
--------------------------------------------------------------------------------------------------
Kimi membership tiers have been renamed, with pricing unchanged. Here is how the new plans compare with the legacy ones:
| Item | Legacy plans | New plans |
| --- | --- | --- |
| Kimi Code availability | Andante and above | Plus and above |
| 5-hour rate window | Yes | Yes |
| Weekly rate window | Yes | No |
| Monthly total quota | Yes | Yes |
| K3 access | Moderato and above | Plus and above |
| K3 1M context | Allegretto and above | Pro and above |
| HighSpeed access | Allegretto and above | Pro and above |
**FAQ**
Can I keep using my legacy plan?
Yes. Legacy plans purchased before the new plans launched remain usable. When the term ends, you can renew or upgrade to a new plan.
Do I have to upgrade to a new plan?
No — migration is optional. Your legacy plan keeps renewing as long as you stay subscribed; whether to upgrade depends on your needs.
How do I upgrade my plan?
On the [Kimi Code plan page](https://www.kimi.ai/code/#pricing)
, pick the new plan you want and click "Subscribe" to complete payment. Your current plan's remaining days are prorated automatically, and the new plan takes effect immediately.
Quota and Limits [](https://www.kimi.com/code/docs/en/kimi-code/membership.html#quota-and-limits)
---------------------------------------------------------------------------------------------------
Quota rules differ between new and existing members:
* **New members**: the weekly quota limit is removed — quota no longer refreshes every 7 days. The **rolling 5-hour rate window** still applies: too many requests in a short time trigger rate limiting, which recovers automatically once the window rolls over.
* **Existing members on legacy plans**: rules are unchanged — quota **refreshes automatically every 7 days** from your subscription date, unused quota does not roll over, and the same 5-hour rolling rate window applies.
Both groups share the Kimi membership monthly total quota: if the monthly total is reached, Kimi Code quota is frozen until the monthly quota resets or you upgrade. Monthly usage can be viewed on the [Subscription](https://www.kimi.com/membership/subscription)
page.
All logged-in devices and API Keys share the same quota; devices inactive for over 30 days are automatically unbound and can be restored by running `/login` again. Log in to the [Kimi Code Console](https://www.kimi.com/code/console)
at any time to check remaining quota and rate-limit status and to manage API Keys and devices.
Extra Usage [](https://www.kimi.com/code/docs/en/kimi-code/membership.html#extra-usage)
-----------------------------------------------------------------------------------------
When your subscription quota runs out, you can keep making requests using your Extra Usage balance without waiting for a refresh. Only subscribed members can enable it, and **Kimi on the web and Kimi Code share the same Extra Usage balance**. See the full terms in the [Extra Usage Agreement](https://www.kimi.com/user/agreement/extra-usage-rules-cn)
.

**Top-up entry points**
* **From the main site**: go to the Kimi [Subscription page](https://www.kimi.com/membership/subscription?tab=quota)
, scroll to the "Extra Usage" module at the bottom then choose an amount and complete payment.
* **From the Kimi Code Console**: once your weekly quota (existing members on legacy plans) or 5-hour quota reaches over **80%** used, the progress card shows a **Buy Extra Usage** button that takes you to the subscription page to purchase.

**Enabling and managing**
Turn on the "Extra Usage" toggle, and when your subscription quota runs out, the system automatically deducts from your Extra Usage balance. Click **Settings** in the module to enable a **monthly spending cap** and set the maximum you can spend this month; the progress bar shows this month's Extra Usage consumption in real time.
**Billing and rules**
* **Billing**: charged by actual usage — the more content read and generated, and the more complex the task, the higher the cost; the balance is shown in RMB, with rates as displayed on the platform. Extra Usage pricing is close to the official API pricing of the [Kimi Open Platform](https://platform.kimi.com/)
; for heavy usage, upgrading your subscription is usually more cost-effective.
* **Deduction priority**: time-limited quotas such as the subscription are deducted first; **Extra Usage is deducted last** as a fallback. Once enabled, even if your subscription quota is maxed out, Extra Usage is consumed seamlessly and tasks don't stop or error out.
* **Spending cap**: enable a "monthly spending cap" in settings to limit how much Extra Usage can be spent this month; without it, there is no cap.
* **Validity and stacking**: the balance does not expire and stacks across top-ups; it remains usable after the subscription lapses, but you can't top up during the lapse — re-subscribe first to top up again.
* **Refunds**: generally non-refundable, non-transferable, and non-redeemable.
> Billing example (from official examples, for a rough sense of scale; actual rates per the platform): a simple request (e.g. "recommend a rock song") costs about **¥0.03**; a complex multi-step task (e.g. "plan a week-long road trip from Chengdu to western Sichuan") costs about **¥1.6**.
> Top-up limits: minimum ¥25 per top-up, up to 10 times and ¥3,000 per day, with a balance cap of ¥10,000.
**Checking your usage**
* **Kimi web / app**: Settings → Subscription & Invoices → [My Quota](https://www.kimi.com/membership/subscription?tab=quota)
.
* **Kimi Code Console**: **once Extra Usage is enabled**, log in to the [Console](https://www.kimi.com/code/console)
to view your balance and usage.
* **Kimi Code CLI**: type `/usage` on the command line to check directly.

**FAQ**
Do Kimi on the web and Kimi Code use the same Extra Usage wallet?
Yes. The Extra Usage balance is shared between Kimi and Kimi Code — top up once and use it in both; the Extra Usage you top up under "My Quota" and the one in the Kimi Code Console are the same balance.
Which is deducted first, Extra Usage or subscription quota?
Time-limited quotas such as the subscription are deducted first; Extra Usage is only deducted as a fallback once all time-limited quotas are exhausted.
When I hit the monthly / weekly (legacy plans) / hourly limit, or get rate-limited mid-session, can I keep going?
Yes. Once Extra Usage is enabled you're not affected by subscription limits — whenever any quota is reached it seamlessly switches to the Extra Usage balance, so tasks don't stop or error out, and only Extra Usage is deducted without affecting your membership quota refresh.
How is Extra Usage billed, and how does it compare with a same-priced subscription or Open Platform API?
Billing depends on the request's input/output volume and cache hit rate; Extra Usage pricing is close to the [Kimi Open Platform](https://platform.kimi.com/)
's official API, and for heavy usage upgrading your subscription is usually more cost-effective.
Can unused balance roll over to next month, and does it stack?
Yes — it's credit-based, doesn't expire, and stacks; it stays usable after the subscription lapses, but you can't top up during the lapse and must re-subscribe to top up again.
When the balance is nearly used up (e.g. a 25 RMB top-up), will the current request finish?
It guarantees the "last model call" completes even if its billing exceeds the limit, but it doesn't guarantee the whole task will finish.
Is Extra Usage available for Enterprise?
Not yet supported.
After I close my account, is the balance refunded?
To request a refund, go to [Kimi.ai](https://www.kimi.com/)
on the web, click your profile picture in the bottom-left corner, then select **Get Help** → **User Feedback** to reach our support team.
Next steps [](https://www.kimi.com/code/docs/en/kimi-code/membership.html#next-steps)
---------------------------------------------------------------------------------------
* [Model configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html)
— models, context windows, and switching methods available for each tier
* [Error reference](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html)
— how to handle errors such as quota exhaustion and insufficient permissions
---
# FAQ | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code/faq.html#VPContent)
On this page
FAQ [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#faq)
==================================================================
Installation and Authentication [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#installation-and-authentication)
--------------------------------------------------------------------------------------------------------------------------
### Empty model list during `/login` [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#empty-model-list-during-login)
If you see the error "No models available for the selected platform" when running the `/login` command, it may be due to:
* **Invalid or expired API key**: Check whether the API key you entered is correct and still valid.
* **Network connection issues**: Confirm you can access the API service addresses (such as `api.kimi.ai` or `api.moonshot.ai`).
**Note: Distinguish Platforms**
Kimi Code membership benefits and the [Kimi Platform](https://platform.kimi.com/)
have different Base URLs. Please ensure your Base URL and API Key are matched correctly.
| Platform | Base URL | Billing | Key Source |
| --- | --- | --- | --- |
| **Kimi Code** | Anthropic-compatible: China `https://api.kimi.com/coding/` Overseas `https://api.kimi.ai/coding/` | Membership subscription (quota included) | [Kimi Code Console](https://www.kimi.com/code/console) |
| **Kimi Open Platform** | China `https://api.moonshot.cn/v1` Overseas `https://api.moonshot.ai/v1` | Pay-as-you-go | [Kimi Open Platform](https://platform.kimi.com/) |
### Invalid API key [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#invalid-api-key)
Possible reasons:
* **Typo**: Check for extra spaces or missing characters.
* **Expired or revoked**: Verify the key status in the console.
### Membership expired or quota exhausted [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#membership-expired-or-quota-exhausted)
Use the `/usage` command to check your current quota and membership status. If your quota is exhausted or membership has expired, renew or upgrade at [Kimi Code](https://kimi.com/code)
.
Subscription [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#subscription)
------------------------------------------------------------------------------------
### How do I request an invoice or upgrade my membership? [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#how-do-i-request-an-invoice-or-upgrade-my-membership)
Visit the [Kimi Membership page](https://www.kimi.com/membership/pricing?from=kfc_docs_faq#pricing-faq)
and follow the instructions to submit an invoice request or upgrade your plan.
Interaction Issues [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#interaction-issues)
------------------------------------------------------------------------------------------------
### Image paste fails [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#image-paste-fails)
If you see "Current model does not support image input" when pasting with `Ctrl-V`, the current model does not support image input.
Solutions:
* **Switch to a vision-capable model**: Use a model with `image_in` capability.
* **Check clipboard content**: Make sure the clipboard contains actual image data, not just a file path.
Updates and Upgrades [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#updates-and-upgrades)
----------------------------------------------------------------------------------------------------
### Slow first launch on macOS [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#slow-first-launch-on-macos)
macOS Gatekeeper performs a security check on new programs the first time they run, causing a slow startup. Solutions:
* **Wait for the check to complete**: Be patient on first launch; subsequent startups will be normal.
* **Add to Developer Tools**: Go to System Settings → Privacy & Security → Developer Tools and add your terminal app.
### How to upgrade Kimi Code CLI [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#how-to-upgrade-kimi-code-cli)
Run `kimi upgrade` inside the CLI to automatically check for the latest version and be guided through the upgrade. You can also use the package manager directly:
sh
npm install -g @moonshot-ai/kimi-code@latest
VS Code Extension FAQ [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#vs-code-extension-faq)
------------------------------------------------------------------------------------------------------
The following are common questions about the Kimi Code VS Code extension.
### VS Code says no workspace is open [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#vs-code-says-no-workspace-is-open)
Open a folder in VS Code — the Kimi Code VS Code extension requires a workspace to function properly.
### VS Code says CLI not found [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#vs-code-says-cli-not-found)
Manually install Kimi Code CLI and configure `kimi.executablePath` in VS Code settings, or ensure the built-in CLI exists.
### VS Code login fails [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#vs-code-login-fails)
Try skipping login and using API key mode instead, check your network connection, or retry later via the extension's action menu.
### VS Code shows no response after sending a message [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#vs-code-shows-no-response-after-sending-a-message)
Confirm that Kimi Code CLI is available, a model is configured, and a workspace folder is open in VS Code. Check error logs via "Kimi Code: Show Logs".
### VS Code connection timeout [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#vs-code-connection-timeout)
Requests time out after 30 seconds with no response. Check your network and retry.
### VS Code shows an error before sending a message [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#vs-code-shows-an-error-before-sending-a-message)
Certain errors prevent sending messages in VS Code, such as CLI not found, version too low, not logged in, or session busy. Errors appear as toast notifications; your input is preserved for retry.
Feedback and Contact [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#feedback-and-contact)
----------------------------------------------------------------------------------------------------
### Problem not resolved by this page [](https://www.kimi.com/code/docs/en/kimi-code/faq.html#problem-not-resolved-by-this-page)
If the above content hasn't resolved your issue, please go to [Kimi.ai](https://www.kimi.com/)
on the web, click your profile picture in the bottom-left corner, then select **Get Help** → **User Feedback** to consult our support team. Please describe the problem, steps taken, and any relevant logs — we'll get back to you as soon as possible.
---
# Kimi Code Community Guidelines | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code/community-guidelines.html#VPContent)
On this page
Kimi Code Community Guidelines [](https://www.kimi.com/code/docs/en/kimi-code/community-guidelines.html#kimi-code-community-guidelines)
=========================================================================================================================================
Kimi Code is dedicated to providing intelligent, high-performance AI coding services to users worldwide — through continuous model improvements, relentless pursuit of Agent capabilities, and a flexible Token Plan. Our goal is to shorten the distance between imagination and reality, and make AI agents accessible to everyone. To ensure every Kimi Code user has a better experience, we put forward the following guidelines.
Scope of Use [](https://www.kimi.com/code/docs/en/kimi-code/community-guidelines.html#scope-of-use)
-----------------------------------------------------------------------------------------------------
Kimi Code subscriptions are for interactive use only. We're compatible with mainstream coding tools and agent frameworks (Kimi CLI, VS Code, Claude Code, OpenCode, OpenClaw, etc.), so you can call Kimi Code's AI capabilities from the tools you already use. For enterprise integrations, commercial services, or other platform-related inquiries, visit the [Kimi Platform](https://platform.moonshot.ai/)
to explore partnership options.
✧ Usage Guidelines We Need to Highlight [](https://www.kimi.com/code/docs/en/kimi-code/community-guidelines.html#%E2%9C%A7-usage-guidelines-we-need-to-highlight)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
To ensure everyone can continue to access stable model services, there are some usage guidelines you need to follow.
#### Don't resell your account or API access
Your account is a direct connection between you and Kimi Code. Transferring it to others also puts your own data and usage history at risk.
#### Don't resell Kimi Code's capabilities as a service
Using Kimi Code to support your own work is completely fine. Repackaging it as a product to sell to others bypasses our pricing and service structure — and isn't fair to users who play by the rules.
#### Don't spoof or alter client identity information
We rely on this information to maintain service quality and security. Impersonating or masking your client identity can make your requests behave unpredictably from the platform's perspective.
#### Don't use Kimi Code for non-interactive automation
Kimi Code subscriptions are for personal interactive use only. Using it for non-interactive purposes — such as scripted batch execution or data annotation pipelines — goes beyond normal use.
If your usage doesn't align with the guidelines above, we'll review the situation first and take appropriate action—such as **limiting concurrent access**—based on the severity. You'll then see a `You've reached your concurrent request limit` error — see the [error reference](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#concurrent-request-limit)
for details. Accordingly, if you purchase through unauthorized channels (such as resold accounts or third-party sellers), your account may be suspended upon verification, and we **will not be liable for any losses**.
Think we got it wrong?
If your account has been mistakenly suspended, please contact our support email at [support@moonshot.ai](mailto:support@moonshot.ai)
. To help us resolve your issue efficiently, please include your account ID, the time of suspension, a description of your use case, and any relevant screenshots.
♡ How We Love to See Kimi Code Used [](https://www.kimi.com/code/docs/en/kimi-code/community-guidelines.html#%E2%99%A1-how-we-love-to-see-kimi-code-used)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Kimi Code welcomes every builder who believes code can change the world — whether you're an indie developer, an open source contributor, or someone just getting started turning their first idea into a product. We especially encourage sustained, focused use. For users who maintain longer sessions and make good use of conversation history, the platform dynamically optimizes how your quota is consumed, meaning the same workload uses less of it.
Join the Community [](https://www.kimi.com/code/docs/en/kimi-code/community-guidelines.html#join-the-community)
-----------------------------------------------------------------------------------------------------------------
If you'd like to connect with more like-minded Kimi Coders, join our [Discord community](https://discord.gg/rGSAZtWSZg)
and let's build together. Happy Coding!
FAQ [](https://www.kimi.com/code/docs/en/kimi-code/community-guidelines.html#faq)
-----------------------------------------------------------------------------------
**Q1: I'm a heavy user with high daily usage. Will I get flagged by mistake?**
No. Our risk detection considers a wide range of signals. Users with normal patterns across IP address, conversation behavior, and usage metrics are not typically flagged, regardless of volume.
**Q2: Will using a VPN or corporate proxy get me suspended?**
Accessing Kimi through a forward proxy (like a VPN or company network) is fine. Sharing your account with others through a reverse proxy is a violation.
**Q3: I use Kimi Code across multiple devices and tools at the same time. Will that get me suspended?**
No. Switching between devices (e.g., work laptop, personal machine) or different coding tools (Kimi CLI, VS Code, Claude Code) is a completely normal usage pattern. You won't be mistakenly flagged as long as you don't deliberately spoof or alter your client identity.
---
# What's New | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#VPContent)
On this page
What's New [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#what-s-new)
======================================================================================
A record of new features and key fixes across Kimi Code products — focused on the changes most worth knowing about.
LatestKimi Code CLI
v2.1.0 September 23, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v2-1-0-september-23-2026)
-------------------------------------------------------------------------------------------------------------------
#### Fullscreen mode (experimental) [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#fullscreen-mode-experimental)
A new experimental fullscreen interface: the transcript scrolls independently, text can be selected with the mouse, fold blocks expand or collapse on click, and a clickable "Jump to bottom" indicator sits at the bottom. Enable it under `/settings` → TUI mode, or set `tui_mode = "fullscreen"` in `~/.kimi-code/tui.toml`, then restart Kimi Code. → [tui.toml](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#tuitoml)
#### Faster startup, lower memory [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#faster-startup-lower-memory)
Shorter CLI startup time and reduced memory usage — first paint arrives noticeably sooner in large projects.
#### File watching is now off by default [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#file-watching-is-now-off-by-default)
Filesystem watching for config and workspace files no longer runs by default; to hot-reload AGENTS.md, skills, or MCP config, set `[watch] enabled = true` or `KIMI_CODE_WATCH=1`. → [watch](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#watch)
Also in this release: hardened workspace trust boundaries — file tools can no longer reach outside the working directory through symbolic links, and project-local config only takes effect after the workspace is trusted; new `auto_session_title` config to turn off automatic session title generation by clients. → [Config files](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#top-level-fields)
Kimi Code Desktop
Kimi Code Desktop is here September 17, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#kimi-code-desktop-is-here-september-17-2026)
---------------------------------------------------------------------------------------------------------------------------------------------------------
The Kimi Code desktop client is officially available: it carries the Agent core of Kimi Code CLI into a graphical interface, where you open a project, talk to the Agent, and ship changes in one window. Available now for macOS (Apple Silicon / Intel) and Windows. → [Quick Start](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html)
#### Every step stays visible [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#every-step-stays-visible)
Tool calls, thinking, and the files changed in each turn are all presented in the interface; sensitive operations raise approval prompts, and three permission modes (Always Ask / Ask When Needed / Never Ask) keep you in control. → [Handle approvals](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#handle-approvals)
#### A complete workflow from conversation to delivery [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#a-complete-workflow-from-conversation-to-delivery)
Goal mode keeps long-running objectives moving and can be paused, resumed, or cancelled; plan mode proposes an approach before touching files, and the plan can be reviewed and refined; long tasks can move to the background, where you can check progress or stop them at any time. → [Choose a task mode](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#choose-a-task-mode)
#### Built-in browser and visual annotation [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#built-in-browser-and-visual-annotation)
The browser lives in the right panel, with tabs that stay with the session and page context shared with the Agent; screenshot annotation, text selection comments, `@` file mentions, and element picking on web pages tell the Agent exactly what to change. → [Verify in the terminal](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#verify-in-the-terminal)
Download: [macOS · Apple Silicon](https://code.kimi.com/kimi-code/desktop/download/KimiCode-mac-arm64.dmg)
· [macOS · Intel](https://code.kimi.com/kimi-code/desktop/download/KimiCode-mac-x64.dmg)
· [Windows](https://code.kimi.com/kimi-code/desktop/download/KimiCode-win-x64.exe)
Kimi Code CLI
v2.0.0 September 17, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v2-0-0-september-17-2026)
-------------------------------------------------------------------------------------------------------------------
#### New `/desktop` command [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#new-desktop-command)
The new `/desktop` slash command (alias `/install-desktop`) and the `kimi install-desktop` subcommand open the desktop app page in your browser, so you can download and install the desktop client without leaving the terminal. → [`kimi install-desktop`](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-command.html#kimi-install-desktop)
#### Mermaid diagrams in the terminal [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#mermaid-diagrams-in-the-terminal)
Mermaid code blocks now render as diagrams in the terminal; turn this off under `/settings` → Mermaid diagrams, or set `mermaid = "off"` in the `[markdown]` section of tui.toml.
Also in this release: the built-in browser plugin is renamed to Kimi Browser Extension; when accumulated media in a session exceeds 20 MB, the oldest images and videos are omitted from requests with a warning → [Paste images and videos](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/interaction.html#paste-images-and-videos)
. Since v2.0.1, a provider's API key can be read from a named environment variable via `api_key_env` instead of being written into the config file → [Config files](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#providers)
.
Kimi Code CLI
v0.43.0 September 14, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-43-0-september-14-2026)
---------------------------------------------------------------------------------------------------------------------
#### AI session titles in Web, on by default [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#ai-session-titles-in-web-on-by-default)
A title is generated automatically after the first turn, and you can regenerate it from the rename box — no more naming sessions by hand.
#### Delete sessions from the session selector [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#delete-sessions-from-the-session-selector)
Select a session in the session selector, press `Ctrl-X`, then `y` to confirm — cleaning up old sessions is much easier.
#### Fairer time budgets in Goal Mode [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#fairer-time-budgets-in-goal-mode)
Time budgets no longer count the time while a session is closed, and the 24-hour cap is gone, so long-running goals no longer burn budget while you are away. → [Goal mode](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/interaction.html#goal-mode)
Also in this release: `kimi upgrade` (alias `kimi update`) gains a `-y, --yes` flag to skip the confirmation prompt; the new `KIMI_CODE_PERMISSION_MODE_REMINDER` environment variable (set to `0`) stops injecting auto-permission-mode reminders into the model context. v0.43.1 fixes pressing `Ctrl-C` while a subagent is running quitting the entire CLI — it now only interrupts the running subagent.
Model Release
K2.8 Preview September 11, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#k2-8-preview-september-11-2026)
-------------------------------------------------------------------------------------------------------------------------------
🎉 **K2.8 Preview** is now fully rolled out in Kimi Code! The Model ID is unchanged — still `kimi-for-coding` — so clients and third-party tools work with no configuration changes. → [Model configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html)
#### Performance close to K3, with more efficient thinking [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#performance-close-to-k3-with-more-efficient-thinking)
Coding and agent capabilities are improved across the board, with significantly more efficient thinking than K2.7 Code.
#### Adjustable thinking effort [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#adjustable-thinking-effort)
Same thinking levels as K3: `low` / `high` / `max` (default `max`). With thinking turned off, requests to the K3 series and K2.8 Preview are served by K2.8 Preview (no thinking).
#### 1M ultra-long context [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#_1m-ultra-long-context)
A context window of up to 1M is available across all membership tiers.
Kimi Code CLI
v0.42.0 September 9, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-42-0-september-9-2026)
-------------------------------------------------------------------------------------------------------------------
#### Remote Control is now generally available [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#remote-control-is-now-generally-available)
Remote Control is out of the experimental stage — no experimental flag needed. Take over a local session from your phone or another computer, anywhere. → [Remote Control](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/remote-control.html)
#### Sortable media preview bar in the Web input box [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#sortable-media-preview-bar-in-the-web-input-box)
Attachments appear in a sortable preview bar, so you can reference images and videos inline in your text, and previews survive queuing and sending. HEIC, HEIF, and BMP images are now supported too. → [Pasting images and video](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/interaction.html#pasting-images-and-video)
#### Completed tool calls collapse into summaries [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#completed-tool-calls-collapse-into-summaries)
Finished tool calls now collapse into a title plus a one-line result summary, keeping the transcript clean — press `Ctrl-O` to expand the full output. → [Keyboard shortcuts](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/keyboard.html#tool-output)
Also in this release: the `/btw` side-chat subagent gains read-only tools; the subagent model pool (`[secondary_model]`) is now always on and its experimental flag has been removed.
Kimi Code CLI
v0.41.0 September 4, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-41-0-september-4-2026)
-------------------------------------------------------------------------------------------------------------------
#### Tower multi-agent collaboration in Web [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#tower-multi-agent-collaboration-in-web)
The web version adds an experimental tower multi-agent mode — enable it with the `/tower` command or the plus menu in the input box, and set the base branch with `/tower `.
#### Text selection annotations in Web [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#text-selection-annotations-in-web)
Select text in messages, file previews, diff and per-turn change panels, or the terminal to add a comment or quote it into the conversation.
#### Dangerous commands no longer blocked [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#dangerous-commands-no-longer-blocked)
Auto permission mode no longer blocks dangerous commands or commands that cannot be statically analyzed. → [The three permission modes](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/interaction.html#the-three-permission-modes)
Also in this release: a new session rating prompt (can be disabled in config); answers to background questions are now delivered directly to the agent instead of through an output file.
Kimi Code CLI
v0.40.0 September 2, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-40-0-september-2-2026)
-------------------------------------------------------------------------------------------------------------------
#### Renamed permission modes and a new dangerous-command guard [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#renamed-permission-modes-and-a-new-dangerous-command-guard)
The former YOLO / Auto modes are now Ask When Needed (`/ask-when-needed`) and Never Ask (`/never-ask`); Manual is Always Ask. A built-in dangerous-command guard also ships in this release: commands such as `shutdown`, `reboot`, or `rm -rf` are blocked outright in Never Ask mode and always require your confirmation in the other modes; disable it with `[permission] dangerous_command_guard = false`. → [Interaction & input](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/interaction.html#the-three-permission-modes)
#### Subagent model pool graduates from experimental [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#subagent-model-pool-graduates-from-experimental)
The `[secondary_model]` subagent settings are now generally available and enabled by default in every launch mode; you can still opt out with `KIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL=0` or `[experimental] secondary-model = false`. → [Config files](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#secondary-model)
#### Plugins panel in web settings [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#plugins-panel-in-web-settings)
The web settings now include a Plugins panel for browsing the plugin marketplace and installing, enabling, disabling, or removing plugins. → [Plugins](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html)
Also in this release: Tower mode (experimental) no longer starts on its own — turn it on explicitly with `/tower on` or `/tower `; the new `kimi session list` command lists sessions from the command line. v0.40.1 fixes the kimi-cli migration prompt reappearing after the migration had completed or been dismissed.
Kimi Code CLI
v0.39.0 August 27, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-39-0-august-27-2026)
---------------------------------------------------------------------------------------------------------------
#### Remote control for local web sessions [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#remote-control-for-local-web-sessions)
Set `KIMI_CODE_EXPERIMENTAL_REMOTE_CONTROL=1`, then run `kimi rc`, `kimi web --remote-control`, or `/remote-control` to access a local web session remotely. → [Remote control](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/remote-control.html)
#### Experimental Tower multi-agent orchestration [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#experimental-tower-multi-agent-orchestration)
Set `KIMI_CODE_EXPERIMENTAL_TOWER=1`, then use `/tower on` and `/tower ` to start Tower mode and coordinate multiple agents toward an objective.
#### Fork subagents from the current conversation [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#fork-subagents-from-the-current-conversation)
Set `KIMI_CODE_EXPERIMENTAL_SUBAGENT_FORK=1`, or `subagent_fork = true` under `[experimental]`, to let the subagent and swarm tools use `fork` to start from a snapshot of the calling agent's conversation history. → [Agents and subagents](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/agents.html)
Also in this release: Configure an independent AgentSwarm timeout with `[swarm] timeout_ms` or `KIMI_CODE_SWARM_TIMEOUT_MS`; file tools and Shell now resolve Git Bash paths correctly on Windows. v0.39.1 fixes the web permission mode leaking across sessions, the first typed character being swallowed in an empty composer, and startup hanging on "Connecting…" with many workspaces, and adds a file mode to the OpenIn menu.
Kimi Code CLI
v0.38.0 August 20, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-38-0-august-20-2026)
---------------------------------------------------------------------------------------------------------------
#### New WaitFor tool [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#new-waitfor-tool)
The agent can now wait for a background task to finish within the current turn — no need to end the turn and get woken up again. → [Background Tasks](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/tools.html#background-tasks)
#### 13 new data sources in Kimi Datasource [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#_13-new-data-sources-in-kimi-datasource)
The official data plugin adds Chinese government data (NDA/NBS) and standards (GB/HB/DB/TT), eight international organization datasets (WHO, FAO, UNSD, ECB, Eurostat, UNICEF, OECD, FRED), Xinhua Finance, and Caixin. Update the plugin from the Official tab in `/plugins`. → [Kimi Datasource](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html#kimi-datasource)
Also in this release: Edit and Write now require reading an existing file before modifying it; overly long `!` shell command output is collapsed automatically — press ctrl+o to expand it together with tool output.
Kimi Code CLI
v0.37.0 August 18, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-37-0-august-18-2026)
---------------------------------------------------------------------------------------------------------------
#### Activate multiple skills in one prompt [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#activate-multiple-skills-in-one-prompt)
Type `/` after whitespace in the input to insert a skill tag — a single prompt can now activate multiple skills. Skill slash commands typed while the agent is busy are also queued instead of rejected. → [Invoking a Skill](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/skills.html#invoking-a-skill)
#### Web session management upgrade [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#web-session-management-upgrade)
The sidebar gains Open / Done / Workspaces tabs, sessions can be marked as Done, and there's a new dedicated session management page; the search dialog can now search workspaces and scrolls to the selected entry. → [Using Kimi Code in the browser](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/web.html)
#### Auto-update for the native Windows CLI [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#auto-update-for-the-native-windows-cli)
The single-file Windows CLI now updates itself — no more manual downloads.
Also in this release: @-mentioned files, folders, and skills in chat messages render as icon capsules, and the browser tab title shows the current workspace directory; the web Subagent panel is renamed to Background Agent; 0.37.1 fixes pasted images and videos failing to reach the model.
Kimi Code CLI
v0.36.0 August 13, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-36-0-august-13-2026)
---------------------------------------------------------------------------------------------------------------
#### Subagent model pool [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#subagent-model-pool)
The experimental subagent model configuration is now a model pool: list candidate models with descriptions under `[secondary_model]`, and the main agent picks one per spawn based on the task; you can also pin a default with `/secondary-model` or `default_model`. Enable it with `KIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL=1`. → [Subagent model pool](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#subagent-model-pool)
#### Experimental fullscreen TUI mode [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#experimental-fullscreen-tui-mode)
Set `KIMI_CODE_TUI_FULL_SCREEN=1` to switch to a fullscreen alternate-screen UI: scrollable transcript viewport, mouse text selection, clickable links, and Ctrl-Shift-F search. → [Environment Variables](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/env-vars.html)
#### LaTeX math rendering [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#latex-math-rendering)
The TUI now renders LaTeX math formulas (`$…$` / `$$…$$`) in messages as Unicode formulas.
Also in this release: the workspace trust prompt now shows project MCP launch targets and defaults to declining trust, and untrusted workspaces can no longer plant same-named `fd`/`stty` executables; fixed Ctrl+C being ignored during automatic retries of failed API requests.
Kimi Code CLI
v0.35.0 August 12, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-35-0-august-12-2026)
---------------------------------------------------------------------------------------------------------------
#### Modern Web Guidance plugin in the bundled marketplace [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#modern-web-guidance-plugin-in-the-bundled-marketplace)
Run `/plugins` and select Modern Web Guidance to install it and get modern web development guidance. → [Plugins](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html)
#### Live background-subagent progress in the `/tasks` panel [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#live-background-subagent-progress-in-the-tasks-panel)
The `/tasks` panel now shows the live work progress of background subagents, so you can follow along without waiting for them to finish. → [Slash Commands](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/slash-commands.html)
Also in this release: fixed the token counts reported after compaction reading far below the real context size — they now match the numbers shown while the session runs; fixed coder subagents spawning further subagents by default.
Kimi Code CLI
v0.34.0 August 6, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-34-0-august-6-2026)
-------------------------------------------------------------------------------------------------------------
#### Kimi Computer Use comes to Windows [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#kimi-computer-use-comes-to-windows)
Kimi Computer Use now supports Windows x64 (Windows 10 1903+ / Windows 11) — install it from the Official tab in `/plugins`. → [Kimi Computer Use](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html#kimi-computer-use)
#### Cache-expiry reminder [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#cache-expiry-reminder)
Resuming a long-idle session or sending a message after a long idle stretch now shows a reminder that the context cache may have expired, with options to compact or start a new session first; set [`cache_expiry_hint`](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#tui-toml)
to `false` to disable it.
#### `kimi web` stability and experience improvements [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#kimi-web-stability-and-experience-improvements)
When a model request fails, a failure card now stays in the session with one-click resume; the sidebar session list adds a flat view; subagent tasks show the model and thinking level they use; and the working status shows retry progress (attempt N of M) during automatic retries.
Also in this release: browser extension links and activation steps are shown after installing Kimi WebBridge; UTF-16 text files can now be read; `/feedback` works for all signed-in users; fixed `kimi -p` exiting before background tasks and subagents finish; fixed removing an MCP server breaking open sessions (its tools stay visible, but calls fail with a removal notice).
Kimi Code CLI
v0.33.0 August 5, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-33-0-august-5-2026)
-------------------------------------------------------------------------------------------------------------
#### Official built-in plugins: Kimi Computer Use and Kimi WebBridge [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#official-built-in-plugins-kimi-computer-use-and-kimi-webbridge)
The Official tab of the `/plugins` marketplace now lists two official built-in capabilities — press Enter to deploy the managed runtime in one step, with retry after interrupted installs and automatic backup of legacy WebBridge skills on upgrade. → [Installation and Management](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html#installation-and-management)
#### agent-core-v2 engine enabled by default [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#agent-core-v2-engine-enabled-by-default)
The interactive TUI, `kimi -p`, `kimi acp`, and other CLI surfaces now run on the agent-core-v2 engine by default; set `KIMI_CODE_LEGACY_FLAG=1` to fall back to the legacy engine if needed. → [Environment Variables](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/env-vars.html)
#### `kimi web` enhancements [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#kimi-web-enhancements)
The web UI now supports adding and managing custom providers in settings, pinning sessions in the sidebar, setting emoji session titles, and viewing your signed-in account and plan usage.
Also in this release: new `/bug` command as an alias for `/feedback`; startup now asks whether to trust the current folder; fixed MCP OAuth re-authorization always failing with `Invalid redirect URI`.
Kimi Code CLI
v0.32.0 August 4, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-32-0-august-4-2026)
-------------------------------------------------------------------------------------------------------------
#### Four new hook events [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#four-new-hook-events)
Four new hook events — `TurnStarted`, `UserPromptQueued`, `TaskStarted`, and `SessionHeartbeat` — let you observe turn starts, queued user input, sub-task launches, and session heartbeats by configuring them under `[[hooks]]` in `config.toml`. → [Event Reference](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/hooks.html#event-reference)
#### `loop_control` config keys renamed [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#loop-control-config-keys-renamed)
`max_retries_per_step` is now `max_attempts_per_step`, and `max_steps_per_run` is now `max_steps_per_turn`. The old keys no longer take effect — a rename warning is shown at startup, so update your config. → [loop\_control](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#loop-control)
#### Local token-usage estimation [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#local-token-usage-estimation)
A new `[token_counting]` config section: when the provider doesn't report token usage, the context-size display can switch to a local estimate. → [token\_counting](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#token-counting)
Also in this release: when the models.dev catalog is unreachable, Kimi Code falls back to a built-in snapshot so known third-party providers can still be imported offline; fixed auto-compaction retrying an oversized request until failure.
Kimi Code CLI
v0.31.0 July 30, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-31-0-july-30-2026)
-----------------------------------------------------------------------------------------------------------
#### Plugins can contribute custom agents [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#plugins-can-contribute-custom-agents)
A plugin can now ship its own agents: declare directories in the manifest's `agents` field, or simply place an `agents/` directory at the plugin root. The agent files are discovered automatically while the plugin is enabled and are available for sub-agent delegation. → [Plugin Agents](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html#plugin-agents)
#### Plugins can inject system-prompt instructions [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#plugins-can-inject-system-prompt-instructions)
`kimi.plugin.json` gains `systemPrompt` and `systemPromptPath` fields, letting an enabled plugin contribute instructions to the agent's system prompt — effective in the TUI, `kimi -p`, and `kimi web`. → [System-prompt instructions](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html#system-prompt-instructions)
#### Markdown-defined custom agents in the TUI [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#markdown-defined-custom-agents-in-the-tui)
Markdown agent files, previously limited to `kimi web`, now work in the TUI as well: frontmatter declares the name, description, and tool permissions, and the body is the system prompt. → [Custom Agents](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/agents.html#custom-agents)
Also in this release: the new `/secondary_model` slash command configures the secondary model used by sub-agents (experimental — enable it in `/experiments` first); TaskOutput is now always non-blocking, returning an immediate snapshot while completion still arrives via automatic notification.
Kimi Code CLI
v0.30.0 July 29, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-30-0-july-29-2026)
-----------------------------------------------------------------------------------------------------------
#### Customizable footer status line [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#customizable-footer-status-line)
`tui.toml` gains a `[status_line]` section: arrange the built-in slots (mode, goal, model, tasks, git, and more) with `items`, or plug in your own status-line command with `command`. → [Configuration files](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#tui-toml)
#### Fail fast when quota runs out [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#fail-fast-when-quota-runs-out)
When your account quota or balance is exhausted, Kimi Code now errors immediately instead of silently retrying for about 3 minutes.
Also in this release: installing an official plugin that bills against plan quota (like Kimi Datasource) now shows a quota note, and you're nudged to run `/plugins` when a plugin used in the session has an update; repeated invalid tool calls now stop the turn instead of retrying indefinitely.
Kimi Code CLI
v0.29.1 July 24, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-29-1-july-24-2026)
-----------------------------------------------------------------------------------------------------------
#### Web search and web fetch without OAuth [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#web-search-and-web-fetch-without-oauth)
v0.29.1 adds `KIMI_WEB_SEARCH_*` and `KIMI_WEB_FETCH_*` environment variables so you can configure web search and web fetch services without OAuth login. → [Environment variables](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/env-vars.html#runtime-switches)
#### Global default MCP server timeouts [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#global-default-mcp-server-timeouts)
`config.toml` and environment variables now support global default MCP server timeouts, so you don't have to set them per server. → [Configuration files](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#mcp)
Also in this release: experimental secondary-model bindings for newly spawned subagents; fix loss of thinking content with OpenAI-compatible endpoints that return reasoning under a different field name.
Kimi Code CLI
v0.29.0 July 22, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-29-0-july-22-2026)
-----------------------------------------------------------------------------------------------------------
#### Web: Define agents with Markdown files [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#web-define-agents-with-markdown-files)
You can now define your own agents as Markdown files: frontmatter at the top declares name, description, and tool permissions, and the body is the system prompt. Custom agents are discovered automatically by the main agent and delegated alongside built-in sub-agents. → [Agents and Sub-Agents](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/agents.html#custom-agents)
#### Web: SYSTEM.md overrides the main agent's system prompt [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#web-system-md-overrides-the-main-agent-s-system-prompt)
Write a plain Markdown `$KIMI_CODE_HOME/SYSTEM.md` to permanently override the default main agent's system prompt without passing `--agent` or `--agent-file` every launch; explicitly passed agent files still take precedence. → [Agents and Sub-Agents](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/agents.html#overriding-the-main-agent-s-system-prompt-with-system-md)
#### Enable/disable tools globally in config.toml [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#enable-disable-tools-globally-in-config-toml)
A new `[tools]` table in `config.toml` lets you enable or disable specific tools across all sessions, so you don't have to adjust them manually each time. → [Configuration files](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#tools)
Also in this release: videos attached to prompts are now delivered to the model with the prompt itself; the ACP client supports choosing thinking effort; v0.29.1 adds environment variables for web search and web fetch services without OAuth login, plus global default MCP server timeouts in `config.toml`.
Kimi Code CLI
v0.28.0 July 20, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-28-0-july-20-2026)
-----------------------------------------------------------------------------------------------------------
#### `kimi web` runs in the foreground, `kimi server` deprecated [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#kimi-web-runs-in-the-foreground-kimi-server-deprecated)
`kimi web` now runs in the current terminal foreground and opens the browser automatically; stop it with `Ctrl+C`. The old `kimi server` command tree is deprecated, its subcommands removed, with only `kimi server kill` retained as a fallback for stopping background services launched before v0.28.0. → [kimi web](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-command.html#kimi-web)
#### Thinking effort persists more conservatively [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#thinking-effort-persists-more-conservatively)
Thinking effort is now persisted only for levels below a model's top tier (`max`), so switching models no longer leaves you with an empty or unresponsive effort picker when the old `max` setting isn't supported. → [Model configuration](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#models)
Also in this release: the web model switcher now warns that switching models or thinking effort invalidates the existing prompt cache; the YOLO and Auto permission mode descriptions are corrected — YOLO auto-approves tool actions but may still ask questions, while Auto is fully autonomous and never asks.
Kimi Code CLI
v0.27.0 July 17, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-27-0-july-17-2026)
-----------------------------------------------------------------------------------------------------------
#### `/copy` for the last reply [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#copy-for-the-last-reply)
New `/copy` slash command copies the last assistant message to the clipboard — no more manually selecting long answers. → [Slash Commands](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/slash-commands.html)
#### Auto-refresh of the model list for API key users [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#auto-refresh-of-the-model-list-for-api-key-users)
When calling Kimi coding models with an API key, Kimi Code now automatically fetches the latest model list, so new models are usable without manual config changes. → [Model configuration](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#models)
Also in this release: OAuth connection failures now show the underlying network cause (DNS, refused connection, TLS, timeout) instead of a bare `fetch failed`; the built-in URL fetch tool's network safeguards are hardened so crafted domains and redirect chains can no longer reach loopback or internal network services.
Model Release
Kimi K3 July 16, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#kimi-k3-july-16-2026)
-----------------------------------------------------------------------------------------------------------
**Kimi K3**, our most capable model to date, is now released and open-sourced, and available in Kimi Code.
#### Model scale & architecture [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#model-scale-architecture)
2.8 trillion parameters, built on KDA hybrid linear attention and Attention Residuals — the first open-source model at the 3-trillion-parameter scale.
#### Long context & multimodal [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#long-context-multimodal)
Native visual understanding with up to 1M-token context, handling large codebases and extended coherent reasoning.
#### Coding & agent strengths [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#coding-agent-strengths)
Excels at long-horizon programming, game dev / 3D, and knowledge work; sustains long engineering tasks with minimal human supervision across kernel optimization, GPU compilers, chip design, and scientific computing.
#### Benchmark positioning [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#benchmark-positioning)
A top-tier model that outperforms Opus 4.8, GPT 5.5, and other mainstream models; on challenging coding tasks such as kernel optimization, it performs close to the strongest proprietary models.
#### Membership [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#membership)
Moderato members and above can use Kimi K3; Allegretto members and above unlock the 1M context window. K3 now supports `low` / `high` / `max` thinking effort levels, so you can pick the right intensity for each task. → [Model configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html)
#### Usage tip [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#usage-tip)
Switching models invalidates the existing context cache, so consumption is higher right after switching; start a new session before using Kimi K3 for better results and lower consumption.
Kimi Code CLI
v0.26.0 July 16, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-26-0-july-16-2026)
-----------------------------------------------------------------------------------------------------------
#### Coder sub-agent capabilities aligned with the main agent [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#coder-sub-agent-capabilities-aligned-with-the-main-agent)
The coder sub-agent now supports background tasks, todo lists, plan mode, skill invocation, and nested agents, so it can handle more complex coding workflows on its own. → [Agents and Sub-Agents](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/agents.html)
#### Cache-invalidation hints in `/model` and `/effort` [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#cache-invalidation-hints-in-model-and-effort)
Switching the model or effort now warns that the existing prompt cache will be invalidated, and suggests using `/new` to avoid extra token costs. → [Slash Commands](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/slash-commands.html)
Also in this release: the context-size indicator no longer under-reports the model's actual context usage; a resumed session without new activity is no longer incorrectly marked as just updated.
Kimi Code CLI
v0.25.0 July 16, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-25-0-july-16-2026)
-----------------------------------------------------------------------------------------------------------
#### Attach any file in web chat [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#attach-any-file-in-web-chat)
The built-in web UI now supports attaching files of any type in chat: drop a file anywhere on the window to send it, and files, images, and videos are shown as attachment tags in the message bubble. → [Using Kimi Code CLI in IDEs](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/ides.html)
#### Aligned Anthropic effort configuration [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#aligned-anthropic-effort-configuration)
Anthropic-compatible providers now apply the official effort configuration, with unknown models falling back to a 128k output limit and custom-named models getting correct thinking-strength controls for new sessions. → [Providers and models](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/providers.html)
Also in this release: model request failures now show full diagnostics; two security issues were fixed — the web server's bearer-token check could be bypassed via percent-encoded API paths, and the session filesystem API could follow symlinks outside the workspace and access host files.
Kimi Code CLI
v0.24.2 July 15, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-24-2-july-15-2026)
-----------------------------------------------------------------------------------------------------------
#### Built-in docs Q&A skill [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#built-in-docs-q-a-skill)
A new built-in `/check-kimi-code-docs` answers Kimi Code product questions (CLI usage, configuration, membership, error codes) straight from the official docs, citing source links in its answers — so you no longer have to leave the terminal to look something up. → [Built-in Skill Commands](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/slash-commands.html#built-in-skill-commands)
Also in this release: the per-step LLM retry cap has been raised from 3 to 10, so transient provider-side failures (429 / overload) are retried automatically before the whole turn fails; and print mode (`kimi -p`) no longer exits after a single turn — as long as background tasks are pending it stays alive and feeds each result back to the main agent (`print_background_mode` now defaults to `steer`, and background tasks and subagents no longer time out by default).
Kimi Code CLI
v0.24.0 July 14, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-24-0-july-14-2026)
-----------------------------------------------------------------------------------------------------------
#### Session export [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#session-export)
The web UI can now export a session: run `/export`, or pick "Export session" from a session's overflow menu, to bundle the conversation and troubleshooting logs into a downloadable ZIP (up to 64 MiB) — handy for archiving or filing a report. → [Exporting a session](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/sessions.html#exporting-a-session)
#### Foreground commands background on timeout [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#foreground-commands-background-on-timeout)
When a foreground `Bash` command hits its timeout it is no longer killed — it moves to the background and keeps running, reporting its result when it finishes, so long-running commands are no longer lost midway. Set `bash_auto_background_on_timeout = false` under `[background]` to restore the kill-on-timeout behavior. → [Built-in Tools · Shell](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/tools.html#shell)
Also in this release: forking a session now fully preserves media attachments, plan files, background task output, and cron jobs, and a failed fork no longer leaves a partial copy behind; `kimi web` now defaults to the rebuilt agent engine.
Kimi Code
HighSpeed & Extra Usage are live July 9, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#highspeed-extra-usage-are-live-july-9-2026)
---------------------------------------------------------------------------------------------------------------------------------------------------------
#### ⚡ HighSpeed is now available [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#%E2%9A%A1-highspeed-is-now-available)
Kimi Code now offers two tiers — **Standard** and **HighSpeed** — built on the same model with identical coding ability; HighSpeed delivers roughly **5–6× the output speed** of Standard. Switch instantly with `/model` in the CLI, or set the model ID to `kimi-for-coding-highspeed` in third-party tools. HighSpeed requires an [Allegretto](https://www.kimi.com/membership/pricing?from=kfc_membership_topbar&track_id=a7764d49-73ad-4d08-b2f3-a8d7433917f8)
plan or above. → [How to Switch Models](https://www.kimi.com/code/docs/en/kimi-code/models.html#switch-model)
#### Extra Usage is now available [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#extra-usage-is-now-available)
When your subscription quota runs out, keep making requests with your Extra Usage balance — it **bypasses the monthly / weekly / hourly membership quota limits**, works whenever any limit is reached, only deducts the Extra Usage balance, and doesn't affect your membership quota refresh. Only subscribed members can enable it, at Kimi homepage → Settings → Membership Plan → My Quota. → [About Extra Usage](https://www.kimi.com/code/docs/en/kimi-code/membership.html#extra-usage)
Kimi Code CLI
v0.23.0 July 6, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-23-0-july-6-2026)
---------------------------------------------------------------------------------------------------------
#### Archived sessions [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#archived-sessions)
The web UI adds an Archived sessions page where you can browse and restore archived sessions in one click — open Settings → Archived to view them.
#### Reasoning preserved across turns [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#reasoning-preserved-across-turns)
With Thinking enabled, Kimi models now keep their reasoning across turns by default so the model can build on its earlier thought; set `[thinking] keep = "off"` to disable it. → [Model configuration](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#thinking)
#### Compaction summary at a glance [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#compaction-summary-at-a-glance)
After the context is compacted, the TUI shows a summary of what was compacted; press `Ctrl-O` to show or hide it within the compaction block — the same shortcut that collapses tool output. → [Interaction and input](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/interaction.html#during-streaming-output)
Also in this release: an experimental on-demand tool loader (`select_tools`) — with the `tool-select` flag enabled, capable models load MCP tools on demand instead of sending them all on every request, preserving the provider's prompt cache; and sessions that existed on disk but were missing from the list or returned 404 on direct access are fixed, as the server now rebuilds the session index on startup.
Kimi Code CLI
v0.22.0 July 2, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-22-0-july-2-2026)
---------------------------------------------------------------------------------------------------------
#### Automatic oversized-image compression [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#automatic-oversized-image-compression)
Images that exceed model limits are now automatically downsampled and re-encoded before reaching the model, cutting vision-token cost and avoiding provider image-size errors.
#### Model configuration overrides [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#model-configuration-overrides)
A new `[models."".overrides]` table lets you override model metadata after provider-catalog refreshes — useful for pinning thinking-effort levels, default effort, and other fields so custom configs survive refreshes. → [Model configuration](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#model-overrides)
#### New web UI design system [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#new-web-ui-design-system)
The built-in web UI gets a refreshed design system with updated colors, typography, spacing, light and dark palettes, and subtler enter/exit and expand/collapse animations for a more consistent look and feel.
Also in this release: a new Cmd/Ctrl+K session-search palette filters by title, workspace, and recent prompt; consecutive tool calls are now grouped into a collapsible stack with diff line counts and inline previews for image, video, and audio results.
Kimi Code CLI
v0.21.0 July 1, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-21-0-july-1-2026)
---------------------------------------------------------------------------------------------------------
#### Plugins can provide slash commands [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#plugins-can-provide-slash-commands)
Plugins can now declare slash commands via a `commands` field in their manifest, registered as `:` and invoked with `$ARGUMENTS` expansion — turning common workflows into commands with no extra setup. → [Plugin slash commands](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html#plugin-slash-commands)
#### Mermaid diagrams in web chat [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#mermaid-diagrams-in-web-chat)
Fenced `mermaid` blocks in assistant responses now render as diagrams in the built-in web UI, and KaTeX math and Mermaid parsing run in Web Workers to keep the UI responsive during live streaming.
Kimi Code CLI
v0.20.2 June 29, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-20-2-june-29-2026)
-----------------------------------------------------------------------------------------------------------
#### Video input and Anthropic-compatible protocol [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#video-input-and-anthropic-compatible-protocol)
Kimi Code now supports the Anthropic-compatible protocol, and the `ReadMediaFile` tool can send video to the model as multimodal content — availability follows the current model's `image_in` / `video_in` capabilities. → [Built-in tools](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/tools.html#file-tools)
#### Web completion sound and notifications [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#web-completion-sound-and-notifications)
The built-in web UI gains a completion sound, a completion notification, and an issue notification, each with its own toggle in settings. Issue notifications are off by default; only after you opt in is the issue text pushed to the desktop.
#### Custom outbound request headers [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#custom-outbound-request-headers)
A new `KIMI_CODE_CUSTOM_HEADERS` environment variable lets you customize headers on outbound LLM requests (one `Name: Value` per line), and a `User-Agent` header is now sent to non-Kimi providers.
Also in this release: a provider 413 context overflow now recovers by compacting and retrying first, and compaction output is capped at 128k tokens by default to avoid provider `max_tokens` errors.
Kimi Code CLI
v0.20.0 June 26, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-20-0-june-26-2026)
-----------------------------------------------------------------------------------------------------------
#### Shell mode [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#shell-mode)
Type `!` in the input box to enter shell mode and run terminal commands without leaving the conversation — output is written into the context for later turns. For long-running commands, press `Ctrl+B` to move them into the background. For example, run `!gh auth login` to sign in to the GitHub CLI without opening a new terminal. → [Shell mode](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/interaction.html#shell-mode)
#### Expose the web server to the internet [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#expose-the-web-server-to-the-internet)
`kimi web` gains a `--host` option to expose the web server beyond your local machine, hardened with token authentication and rate limiting so you can reach the session UI from a remote box. → [kimi web](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-command.html#kimi-web)
#### Redesigned plugin manager [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#redesigned-plugin-manager)
`/plugins` is now a single tabbed panel: **Installed** to manage installed plugins, **Official** for the Kimi-maintained marketplace, **Third-party** for marketplace plugins from other publishers, and **Custom** to install from a GitHub URL, zip, or local path — switch tabs with `Tab` / `Shift-Tab`. A confirmation prompt now appears before installing third-party plugins. → [Plugins](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html#installation-and-management)
Also in this release: fixed a startup crash on Linux caused by a native clipboard error, and `/reload` now refreshes plugin Skills so plugin changes take effect in the current session without starting a new one.
Kimi Code CLI
v0.19.0 June 22, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-19-0-june-22-2026)
-----------------------------------------------------------------------------------------------------------
#### Extra workspace directories [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#extra-workspace-directories)
You can now add directories beyond your working directory to a session: use `/add-dir ` to add one to the current session, or `kimi --add-dir ` at startup. When you choose to remember a directory, the path is written to the project-level `.kimi-code/local.toml` so it applies automatically in every session of that project. → [Project-local configuration](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#project-local-configuration)
#### Background tasks [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#background-tasks)
Press `Ctrl+B` to move long-running foreground commands and sub-agents into the background, freeing up the session to continue, and view their status from the `/tasks` panel. → [Session Management](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/slash-commands.html#session-management)
Also in this release: provider safety-policy blocks are now surfaced instead of being silently treated as a completed turn, and the file-mention experience is improved.
Kimi Code CLI
v0.18.0 June 18, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-18-0-june-18-2026)
-----------------------------------------------------------------------------------------------------------
#### Web session filtering and lazy loading [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#web-session-filtering-and-lazy-loading)
The web sidebar gains a session filter that matches on title and the most recent user prompt, and the chat view lazy-loads earlier messages as you scroll up — making long sessions easier to browse. → [kimi web](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-command.html#kimi-web)
#### Cap AgentSwarm ramp-up concurrency [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#cap-agentswarm-ramp-up-concurrency)
A new `KIMI_CODE_AGENT_SWARM_MAX_CONCURRENCY` environment variable limits how many sub-agents AgentSwarm runs at once during its initial ramp-up, making large swarms less likely to hit provider rate limits. → [Runtime switches](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/env-vars.html#runtime-switches)
Also in this release: the web app no longer loads only the 20 most recent sessions, and web settings now display the current version.
Kimi Code CLI
v0.17.0 June 17, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-17-0-june-17-2026)
-----------------------------------------------------------------------------------------------------------
#### Kimi Code Web Mode [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#kimi-code-web-mode)
A new web mode you can launch with `kimi web` or the in-CLI `/web`, continuing the current session in a browser chat interface. `kimi web` is an alias for `kimi server run --open` — it starts the local server in the background and opens the web UI automatically. → [kimi web](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-command.html#kimi-web)
Also in this release: when an OAuth token refresh still fails after internal retries, the underlying connection error is shown instead of a misleading re-login prompt; and `kimi web` failing to start in the background is fixed (v0.17.1).
Kimi Code CLI
v0.16.0 June 16, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-16-0-june-16-2026)
-----------------------------------------------------------------------------------------------------------
#### `kimi vis` session visualizer [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#kimi-vis-session-visualizer)
A new built-in `kimi vis` command launches the session visualizer in your browser, pointed at your local sessions, so you can see a whole session unfold at a glance. It supports `--port`/`--host`, `--no-open`, and `kimi vis ` to deep-link straight to a specific session. → [kimi vis](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-command.html#kimi-vis)
Also in this release: Anthropic-compatible providers no longer read ambient Anthropic shell credentials and custom headers, avoiding accidental credential leakage; and repeated compaction is fixed for cases where context stays over the blocking threshold.
Kimi Code CLI
v0.15.0 June 15, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-15-0-june-15-2026)
-----------------------------------------------------------------------------------------------------------
#### All-sessions picker [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#all-sessions-picker)
A new all-sessions picker view lets you browse sessions across every working directory, search them by name, page through the list, and copy a ready-to-run resume command for sessions started elsewhere.
#### Reasoning follows your language [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#reasoning-follows-your-language)
The same-language rule now extends to the model's reasoning, so its thinking follows the language you use while keeping code and technical terms in their original form.
Also in this release: MCP now supports legacy SSE servers alongside stdio and streamable HTTP transports (→ [connection methods](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/mcp.html#connection-methods)
); and TUI components now wrap, compact, or truncate over-wide content to stay readable in narrow terminals.
Model Release
Kimi K2.7 Code June 12, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#kimi-k2-7-code-june-12-2026)
-------------------------------------------------------------------------------------------------------------------------
**Kimi K2.7 Code**, our latest coding model, is now released and open-sourced — and available in Kimi For Coding. The new model takes effect only with Thinking On (thinking mode enabled).
#### Improved coding & agent performance over K2.6 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#improved-coding-agent-performance-over-k2-6)
+10.4% on Program-Bench, +11.4% on MCP Mark Verified, and +76.2% on SWE Marathon.
#### Reasoning efficiency [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#reasoning-efficiency)
Less overthinking, with 30% lower reasoning-token usage compared to K2.6.
#### Long-horizon coding [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#long-horizon-coding)
Improved instruction following and higher end-to-end coding task success rates.
#### ⚡ Kimi K2.7 Code HighSpeed Edition (beta coming soon) [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#%E2%9A%A1-kimi-k2-7-code-highspeed-edition-beta-coming-soon)
The same model at roughly 5-6× the output speed.
Kimi Code CLI
v0.14.0 June 10, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-14-0-june-10-2026)
-----------------------------------------------------------------------------------------------------------
#### `Interrupt` hook event [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#interrupt-hook-event)
When you interrupt a turn (for example by pressing Esc), hooks now receive a dedicated `Interrupt` event — it fires in place of `Stop`, so external tooling no longer mistakes an interrupted turn for one that is still running. Programmatic interruptions such as timeouts don't trigger it. → [Event reference](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/hooks.html#event-reference)
#### Kimi Datasource adds legal data [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#kimi-datasource-adds-legal-data)
The official data plugin is now at v3.2.0, adding Chinese laws, regulations, and judicial cases — coverage now spans five data domains: stock market, macroeconomics, corporate registry, academic literature, and legal. → [Plugin overview](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html#kimi-datasource)
Also in this release: images in tool outputs are no longer dropped when using OpenAI-compatible Chat Completions; since v0.13.1, running `/undo` without a count opens an interactive picker for choosing which prompts to roll back (→ [Session management](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/slash-commands.html#session-management)
).
Kimi Code CLI
v0.13.0 June 10, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-13-0-june-10-2026)
-----------------------------------------------------------------------------------------------------------
#### Custom color themes [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#custom-color-themes)
Beyond the built-in dark and light palettes, you can now define your own as a JSON file — override only the colors you care about, the rest fall back to a base palette, and the file name becomes the theme name. Or run `/custom-theme` and let Kimi pick colors with you and write the theme file into `~/.kimi-code/themes/`. → [Custom themes](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/themes.html)
#### `/import-from-cc-codex` one-step import [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#import-from-cc-codex-one-step-import)
Import selected instructions, Skills, and MCP settings from Claude Code and Codex — no need to reconfigure everything by hand when moving to Kimi Code. → [Built-in skill commands](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/slash-commands.html#built-in-skill-commands)
Also in this release: the marketplace list now flags installed plugins that have updates available — select one and press `Enter` to upgrade (→ [Plugins](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html#installation-and-management)
); device login keeps the URL and code visible when the browser fails to open.
Kimi Code CLI
v0.12.0 June 9, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-12-0-june-9-2026)
---------------------------------------------------------------------------------------------------------
#### `/swarm` multi-agent parallel tasks [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#swarm-multi-agent-parallel-tasks)
Use `/swarm ` to start swarm mode — multiple agents work on the same objective in parallel, with live progress display and rate-limit-aware automatic retries. Swarm mode exits automatically when the task completes. → [Slash commands](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/slash-commands.html#modes-run-control)
#### Proxy support [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#proxy-support)
The standard `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, and `NO_PROXY` environment variables are now fully honored, including SOCKS proxies (`socks5://`, `socks4://`, and similar schemes). Loopback addresses always bypass the proxy, so local MCP servers on localhost continue to work after setting one. → [Environment variables](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/env-vars.html)
#### Goals, background questions, and Sub-Skill discovery are now stable [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#goals-background-questions-and-sub-skill-discovery-are-now-stable)
These three features no longer require experimental opt-ins and are available by default. Micro compaction is also enabled by default — it trims older oversized tool results to reduce context overhead. To opt out, set `experimental.micro_compaction = false` in `config.toml`. (Removed in v0.22.1.)
Also in this release: Homebrew installations are detected and updated with `brew upgrade kimi-code`; Skills and global agent instructions load from `KIMI_CODE_HOME` when set; long shell commands in approval prompts now wrap to show the full command; multiple goal mode and ACP routing fixes.
Kimi Code CLI
v0.11.0 June 5, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-11-0-june-5-2026)
---------------------------------------------------------------------------------------------------------
#### Built-in Skills as direct slash commands [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#built-in-skills-as-direct-slash-commands)
Built-in Skills (such as `update-config`) now appear directly in the slash command panel — no `skill:` prefix needed. Type `/` and they show up immediately, grouped ahead of external Skills. → [Slash commands](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/slash-commands.html#skill-dynamic-commands)
#### Sub-Skill discovery (experimental) [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#sub-skill-discovery-experimental)
A new experimental Sub-Skill system ships built-in `sub-skill.review` (audit existing Skills) and `sub-skill.consolidate` (merge Skills into hierarchical groups). Enable with `KIMI_CODE_EXPERIMENTAL_SUB_SKILL=1`. → [Agent Skills](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/skills.html)
Also in this release: YOLO mode now asks for confirmation before starting a goal and suggests switching to Auto for unattended work; sub-agents show resume instructions on timeout; multiple goal queue bug fixes.
Kimi Code CLI
v0.10.0 June 4, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-10-0-june-4-2026)
---------------------------------------------------------------------------------------------------------
#### Goal queue [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#goal-queue)
Use `/goal next ` to line up upcoming tasks — when the current goal completes, Kimi picks up the next one automatically, no waiting, no manual trigger. Open `/goal next manage` to reorder the queue interactively. → [Using Goals](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/interaction.html#goal-mode)
#### Experimental features panel (`/experiments`) [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#experimental-features-panel-experiments)
Type `/experiments` in the TUI to open a visual toggle panel — flip a switch, confirm, and Kimi writes the change to `config.toml` and reloads the session. No manual config editing needed.
#### New built-in `update-config` Skill [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#new-built-in-update-config-skill)
You can now ask Kimi to edit its own configuration files directly.
This release also includes: `/reload` to hot-reload the session after config changes (→ [Slash commands](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/slash-commands.html#account-configuration)
); `kimi doctor` to validate config file syntax (→ [kimi doctor](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-command.html#kimi-doctor)
); Windows now fails early when Git Bash is missing.
Kimi Code CLI
v0.9.0 June 3, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-9-0-june-3-2026)
-------------------------------------------------------------------------------------------------------
#### `kimi acp` subcommand [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#kimi-acp-subcommand)
Connect the CLI to your IDE via the ACP (Agent Client Protocol) — Zed, JetBrains AI Chat, and other editors can directly drive Kimi's sessions and tool calls without switching to a browser or terminal. → [Use in IDEs](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/ides.html)
#### `/btw` side-channel conversation [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#btw-side-channel-conversation)
Open a side conversation without interrupting the current main turn — ask a quick question or add context without affecting the Agent's main task. Entering `/btw` with no content opens the panel and waits for your input. → [Slash Commands](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/slash-commands.html#information-status)
Also: fixed `Ctrl-G` external editor invocation on Windows; unified TUI dialog and selector interaction.
Kimi Code CLI
v0.8.0 June 2, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-8-0-june-2-2026)
-------------------------------------------------------------------------------------------------------
#### Autonomous Goal mode (experimental) [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#autonomous-goal-mode-experimental)
Start with `/goal ` and Kimi will work toward that goal across multiple turns until it's done or hits a decision point that needs you. → [Autonomous goal](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/slash-commands.html#autonomous-goal)
#### Background structured questions [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#background-structured-questions)
When the Agent needs a decision from you, it parks that question in the background and keeps working on other steps — no more blocking on a single small choice. → [AskUserQuestion](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/tools.html#collaboration-tools)
#### `kimi provider` subcommand [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#kimi-provider-subcommand)
Add or remove providers directly from the terminal without entering the TUI — useful for scripts and CI. → [kimi provider](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-command.html#kimi-provider)
Also: **background auto-update** is now on by default (disable in `tui.toml`); **context compaction** ([`/compact`](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/sessions.html#context-compression)
) now attaches the to-do list to the summary so the Agent doesn't forget where it left off.
Kimi Code CLI
v0.7.0 June 2, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-7-0-june-2-2026)
-------------------------------------------------------------------------------------------------------
#### `/provider` interactive provider manager [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#provider-interactive-provider-manager)
Type `/provider` in the TUI to open a visual interface for viewing, adding, and removing providers — no more manually editing config files to switch models. → [Platforms & Models](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/providers.html#provider-%E2%80%94-interactive-provider-management)
#### `KIMI_MODEL_ADAPTIVE_THINKING` environment variable [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#kimi-model-adaptive-thinking-environment-variable)
When connecting to a custom endpoint, force-specify whether adaptive thinking is enabled instead of relying on model-name inference. → [Model fields](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#models)
Also: scheduled task trigger times now display in **local timezone**.
Kimi Code CLI
v0.6.0 May 29, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-6-0-may-29-2026)
-------------------------------------------------------------------------------------------------------
#### `KIMI_MODEL_*` environment variable channel [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#kimi-model-environment-variable-channel)
Set a few environment variables to temporarily switch models without touching config files — changes expire on restart, ideal for testing or CI. → [Define a model via environment variables](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/env-vars.html#define-a-model-from-environment-variables-kimi-model)
#### Install plugins directly from a GitHub URL [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#install-plugins-directly-from-a-github-url)
Paste a repo link to install community plugins, with support for pinning specific versions. The plugin manager labels each install with a trust level. → [Installation & Management](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html#installation-and-management)
#### Removed default step limit [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#removed-default-step-limit)
The per-turn 1000-step cap is gone — long tasks no longer get force-interrupted. → [loop\_control](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#loop-control)
Kimi Code CLI
v0.5.0 May 28, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-5-0-may-28-2026)
-------------------------------------------------------------------------------------------------------
#### Scheduled tasks [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#scheduled-tasks)
Set timed schedules or one-off reminders in natural language — Kimi executes automatically at the right time without you having to watch. → [Scheduled Tasks](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/tools.html#scheduled-tasks)
#### `/auto` permission mode [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#auto-permission-mode)
A more restrained automation mode than `/yolo` — tool approvals are handled automatically, but the Agent won't ask you questions. Good for unattended runs where you don't want to fully open the gates. → [Interaction & Input](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/interaction.html#the-three-permission-modes)
Kimi Code CLI
v0.4.0 May 27, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-4-0-may-27-2026)
-------------------------------------------------------------------------------------------------------
#### Plugin system launched [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#plugin-system-launched)
Install plugin packages that bundle Skills and MCP servers. The official marketplace is live, with Kimi Datasource as the first published plugin. → [Plugins](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html)
#### Session export [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#session-export-1)
Export conversation history as a Markdown file, or package it as a ZIP to submit feedback. → [Sessions & Context](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/sessions.html#exporting-a-session)
#### Permission system redesign [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#permission-system-redesign)
Read-only operations outside the working directory no longer trigger approval prompts — fewer unnecessary interruptions. → [Permission config](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#permission)
Kimi Code CLI
v0.2.0 – v0.3.0 May 26, 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-2-0-%E2%80%93-v0-3-0-may-26-2026)
---------------------------------------------------------------------------------------------------------------------------------
#### OpenAI-compatible reasoning models work out of the box [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#openai-compatible-reasoning-models-work-out-of-the-box)
DeepSeek, Qwen, One API, and other models with thinking tokens need no extra configuration. → [openai provider](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/providers.html#openai)
#### `/logout` with provider selection [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#logout-with-provider-selection)
A provider picker now appears on logout to avoid accidentally logging out of the wrong provider.
#### `/connect` command [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#connect-command)
Search a public directory of providers and configure one in a single step — no need to write config files by hand. (Superseded by `/provider` in v0.7.0.)
Kimi Code CLI
v0.1.0 May 2026 [](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html#v0-1-0-may-2026)
------------------------------------------------------------------------------------------------
**Kimi Code CLI — initial release.** The entire codebase has been rewritten from Python / uv to TypeScript / Node.js. This isn't an incremental update — it's a new foundation, with a redesigned architecture, installation flow, and configuration format.
Key differences from the legacy kimi-cli:
| | Legacy kimi-cli | Kimi Code CLI |
| --- | --- | --- |
| Runtime | Python + uv | Node.js (no Python dependency) |
| Install | `uv tool install` | One-line `curl` script or `npm install -g` |
| Config file | `~/.kimi/config.toml` | `~/.kimi-code/config.toml` (incompatible format) |
| Terminal UI | Basic text output | Full TUI (chat view + status bar + approval panel) |
| Startup speed | Slower (Python cold start) | Faster (Node.js native binary) |
| Multi-provider | Limited | Built-in Anthropic / OpenAI / Gemini / Vertex, and more |
| Sub-agents | Not supported | Built-in coder / explore / plan sub-agents |
| Plugin system | Not supported | Supported (since v0.4.0) |
| Scheduled tasks | Not supported | Supported (since v0.5.0) |
Existing kimi-cli data (config, sessions, MCP declarations) can be migrated in one step with `kimi migrate`. → [Version Upgrade](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/migration.html)
---
# Error Reference | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#VPContent)
On this page
Error Reference [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#error-reference)
======================================================================================================
This document covers **server-side errors** and **tool call errors** you may encounter when calling the Kimi Code API, including authentication, rate limiting, request format, and internal server issues. If you are experiencing client-side problems (such as CLI installation failures, IDE connection issues, MCP configuration errors, etc.), please refer to the [FAQ](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#)
.
Find the relevant entry in the table below based on the error message shown in your terminal or client, and follow the guidance provided.
Note
If you are using a third-party client such as OpenCode or Claude Code, the client may transform or re-wrap error codes, so the code you see may differ from what is documented here. In that case, **focus on the text content of the error message** and match keywords in the quick lookup table below.
Quick Lookup [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#quick-lookup)
------------------------------------------------------------------------------------------------
Errors fall into two groups: **model call errors** occur while the model is generating a response (authentication, rate limiting, request format, etc.), while **tool call errors** occur while the AI is executing a tool call (such as reading a web page or processing an image). Match keywords in the corresponding table below based on where the error originates.
### Model calls [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#model-calls)
| Error keyword | HTTP status | Jump to |
| --- | --- | --- |
| `The API Key appears to be invalid or may have expired` | 401 | [Authentication Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#invalid-api-key) |
| `Invalid Authentication` | 401 | [Authentication Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#invalid-authentication) |
| `Your current subscription does not have access to k3` | 401 | [Permission Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#no-k3-access) |
| `Your current plan supports only kimi-k3 up to 256K context` | 401 | [Permission Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#no-1m-access) |
| `Your current subscription does not have access to kimi-for-coding-highspeed` | 401 | [Permission Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#highspeed-model-access-denied) |
| `Your model id does not exist, recognized as other:` | 401 | [Permission Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#model-id-does-not-exist) |
| `unable to verify your membership benefits` | 402 | [Membership Benefit Unavailable](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#unable-to-verify-membership) |
| `You've reached your 5-hour usage limit` | 403 | [Quota & Account Limits](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#_5-hour-rolling-quota-reached) |
| `You've reached your weekly (7-day) usage limit` | 403 | [Quota & Account Limits](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#weekly-7-day-quota-exhausted) |
| `You've reached your monthly usage limit for this billing cycle` | 403 | [Quota & Account Limits](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#monthly-kimi-quota-exhausted) |
| `You've reached your concurrent request limit` | 403 | [Quota & Account Limits](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#concurrent-request-limit) |
| `We're receiving too many requests` | 429 | [Rate Limits & Overload](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#too-many-concurrent-requests) |
| `The engine is currently overloaded` | 429 | [Rate Limits & Overload](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#inference-engine-overloaded) |
| `total message size N exceeds limit 2097152` | 400 | [Request Format Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#message-body-exceeds-context-limit) |
| `Your request exceeded model token limit: 262144` | 400 | [Request Format Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#token-limit-exceeded) |
| `thinking is enabled but reasoning_content is missing` | 400 | [Request Format Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#missing-reasoning-content-field) |
| `unsupported image url` | 400 | [Request Format Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#unsupported-image-url) |
| `function name ... is duplicated` | 400 | [Request Format Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#duplicate-tool-name) |
| `The request was rejected because it was considered high risk` | 400 | [Request Format Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#content-safety-rejection) |
| `Not found the model kimi-for-coding or Permission denied` | 404 | [Resource Not Found](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#model-not-found) |
| `method not found` | 404 | [Resource Not Found](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#endpoint-not-found) |
| `bot_id ... value does not match id_kinds` | 500 | [Internal Server Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#invalid-bot-id-format) |
| `failed to connect to ... database=membership_` | 500 | [Internal Server Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#database-connection-failed) |
| `FATAL: terminating connection due to administrator command` | 500 | [Internal Server Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#database-connection-failed) |
| `failed to evaluate rate limit script` | 500 | [Internal Server Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#internal-connection-error) |
| `i/o timeout` / `conn closed` / `bad connection` | 500 | [Internal Server Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#internal-connection-error) |
| `503 Service Unavailable` / `504 Gateway Timeout` / `502 Bad Gateway` | 500 | [Internal Server Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#downstream-service-unavailable) |
### Tool calls [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#tool-calls)
| Error keyword | HTTP status | Jump to |
| --- | --- | --- |
| `context canceled` | 499 | [Tool Call Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#request-canceled) |
| `url2text` / `spider checkUrl failed` / `invalid html` | 500 | [Tool Call Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#web-page-read-failed) |
| `image_url:moderation request error` | 500 | [Tool Call Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#image-moderation-failed) |
| `We consider the current URL poses a security risk` | 403 | [Tool Call Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#url-security-risk-blocked) |
| `invalid_url: The provided URL is invalid` | 400 | [Tool Call Errors](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#invalid-url-format) |
Authentication Errors [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#authentication-errors)
------------------------------------------------------------------------------------------------------------------
**HTTP 401**
The request did not carry valid credentials, or the credentials have expired. The server validates identity before processing any request — 401 means this step failed. **Do not retry**; fix the credentials and resend the request.
### Invalid API Key [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#invalid-api-key)
error, status code: 401, message: The API Key appears to be invalid or may have expired. Please verify your credentials and try again.
The API Key is incorrect, or the key has been revoked or expired in the console.
**How to fix:**
* **Typo in key**: Check for extra spaces or missing characters
* **Key revoked or expired**: Go to [Console](https://www.kimi.com/code/console?from=kfc_overview_topbar)
› API Keys and verify the key's status
* **Environment variable override**: Check whether a `KIMI_API_KEY` or `OPENAI_API_KEY` environment variable is overriding your config file — run `echo $KIMI_API_KEY` to check
### Invalid Authentication [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#invalid-authentication)
error, status code: 401, message: Invalid Authentication
The request did not carry valid credentials, or uses an unsupported authentication format.
**How to fix:**
The most common cause is accidentally using an API key or Base URL from the Kimi Open Platform. Kimi Code and the [Kimi Open Platform](https://platform.kimi.com/)
are two separate systems — keys and Base URLs are not interchangeable:
* Kimi Code: get your key from the [Console](https://www.kimi.com/code/console?from=kfc_overview_topbar)
, Base URL is `https://api.kimi.ai/coding/v1` (OpenAI protocol) or `https://api.kimi.ai/coding/` (Anthropic protocol)
* Open Platform: get your key from [platform.kimi.com](https://platform.kimi.com/)
, Base URL is `https://api.moonshot.ai/v1`
Membership Benefit Unavailable [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#membership-benefit-unavailable)
------------------------------------------------------------------------------------------------------------------------------------
**HTTP 402**
The server cannot verify the subscription status of the current account. This is usually a temporary issue.
### Unable to Verify Membership [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#unable-to-verify-membership)
error, status code: 402, message: We're unable to verify your membership benefits at this time. Please ensure your membership is active.
**How to fix:**
* Confirm your Kimi Code subscription is still active
* Wait a moment and retry
* Check your subscription status in the [Console](https://www.kimi.com/code/console?from=kfc_overview_topbar)
* If the issue persists, go to [Kimi.ai](https://www.kimi.com/)
on the web, click your profile picture in the bottom-left corner, then select **Get Help** → **User Feedback** to consult our support team
Permission Errors [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#permission-errors)
----------------------------------------------------------------------------------------------------------
**HTTP 401**
The request is correctly formatted and identity is verified, but the current account's subscription tier does not include the requested capability (such as K3, 1M context, or the HighSpeed model). **Retrying is pointless** — upgrade your plan or adjust the request. For quota and concurrency issues, see [Quota & Account Limits](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#quota-account-limits)
and [Rate Limits & Overload](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#rate-limits-overload)
.
### No K3 Access [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#no-k3-access)
error, status code: 401, message: Your current subscription does not have access to k3. Upgrade to higher-tier Kimi Code plans. Upgrade: Upgrade: https://www.kimi.com/code?from=server_highspeed_error#pricing
Your current subscription does not include access to `k3`. Calling K3 requires a Moderato / Plus plan or above.
**How to fix:**
* [Upgrade](https://www.kimi.com/code/#pricing)
to a Moderato / Plus plan or above to call `k3`
* If you prefer not to upgrade, keep using the standard model `kimi-for-coding`
### No 1M Access [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#no-1m-access)
error, status code: 401, message: Your current plan supports only k3 up to 256K context. 1M context is available on higher-tier Kimi Code plans. Upgrade: https://www.kimi.com/code?from=server_k3_error#pricing
Your current plan only supports up to 256K context when calling `k3`. To use up to 1M context, upgrade to an Allegretto / Pro plan or above. When calling `k3-256k` directly with context over 256K, the server returns `k3-256k supports only 256K context.` — compact the context or switch to `k3`.
**How to fix:**
* [Upgrade](https://www.kimi.com/code/#pricing)
to an Allegretto / Pro plan or above to use `k3` with up to 1M context
* If you prefer not to upgrade, keep using `k3` with 256K context, or switch to the standard model `kimi-for-coding`
### Model ID Does Not Exist [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#model-id-does-not-exist)
error, status code: 401, message: Your model id does not exist, recognized as other:. Please set model id as ``.
The model ID used in the request is not recognized by the model side. A common cause is using a format that's only valid in a specific scenario in an entry that doesn't support it. For example, the `k3[1m]` form (with surrounding quotes) is only needed in Claude Code environment-variable configurations to explicitly request a 1M context window. In API requests or other third-party tools' Model ID fields, use `k3` directly.
**How to fix:**
* Check the actual model id shown after `recognized as other:` in the error message and make sure it has no typos or extra symbols
* If configuring Claude Code environment variables, make sure you followed the example in [Using in More Third-Party Tools](https://www.kimi.com/code/docs/third-party-tools/claude-code.html)
, including the surrounding quotes
* For API requests or other third-party tools, change the Model ID to the standard form (e.g. `k3`, `kimi-for-coding`, `kimi-for-coding-highspeed`) instead of the Claude Code env-only `k3[1m]` form
### HighSpeed Model Access Denied [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#highspeed-model-access-denied)
error, status code: 401, message: Your current subscription does not have access to kimi-for-coding-highspeed. Upgrade to higher-tier Kimi Code plans. Upgrade: Upgrade: https://www.kimi.com/code?from=server_highspeed_error#pricing
Your current subscription does not include access to the high-speed model `kimi-for-coding-highspeed`. It is the same model as the standard `kimi-for-coding`, but with roughly 5–6x faster output, and requires an Allegretto / Pro plan or above.
**How to fix:**
* [Upgrade](https://www.kimi.com/membership/pricing?from=server_highspeed_error)
to an Allegretto / Pro plan or above to unlock the high-speed model
* If you prefer not to upgrade, keep using the standard model `kimi-for-coding` — identical capabilities, just slower output
Quota & Account Limits [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#quota-account-limits)
------------------------------------------------------------------------------------------------------------------
**HTTP 403**
Account-side limits have been reached, in two kinds: quota errors are account usage issues — **retrying is pointless**; wait for the window to reset, purchase extra usage, or upgrade your plan. The concurrent request limit is triggered by risk-control policy, is unrelated to your remaining quota, and follows the appeal process.
### 5-Hour Rolling Quota Reached [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#_5-hour-rolling-quota-reached)
error, status code: 403, message: You've reached your 5-hour usage limit. Your quota will reset when the current 5-hour window ends. To continue now, purchase extra usage or upgrade your plan: https://www.kimi.com/membership/subscription?tab=quota
The call volume within the current 5-hour rolling window has reached its limit.
**How to fix:**
* Wait for the current 5-hour window to end and the quota to reset; check the reset time in the [Console](https://www.kimi.com/code/console?from=kfc_overview_topbar)
* Go to the [Subscription page](https://www.kimi.com/membership/subscription?tab=quota)
to purchase extra usage or upgrade your plan for a higher limit
### Weekly (7-Day) Quota Exhausted [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#weekly-7-day-quota-exhausted)
error, status code: 403, message: You've reached your weekly (7-day) usage limit. Your quota will reset when the current 7-day window ends. To continue now, purchase extra usage or upgrade your plan: https://www.kimi.com/membership/subscription?tab=quota
Kimi Code subscription quota refreshes every 7 days, and the quota in the current 7-day window has been fully used. This error only applies to existing members on legacy plans (Andante / Moderato / Allegretto / Allegro); new members (Go / Plus / Pro / Max / Ultra) are not subject to the weekly quota limit and never trigger this error.
**How to fix:**
* Wait for the current 7-day window to end and the quota to refresh; view usage details in the [Console](https://www.kimi.com/code/console?from=kfc_overview_topbar)
* Go to the [Subscription page](https://www.kimi.com/membership/subscription?tab=quota)
to purchase extra usage or upgrade your plan for a higher quota
### Monthly Kimi Quota Exhausted [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#monthly-kimi-quota-exhausted)
error, status code: 403, message: You've reached your monthly usage limit for this billing cycle. Your quota will be refreshed in the next cycle. To continue now, purchase extra usage or upgrade your plan: https://www.kimi.com/membership/subscription?tab=quota
Your Kimi [monthly quota](https://www.kimi.com/membership/subscription)
has been fully consumed.
All Kimi membership benefits — including PPT, Agent Cluster, Kimi Code, etc. — share the same monthly quota. Once the total quota is exhausted, further requests cannot be made even if Kimi Code still has remaining quota. You must wait for the quota to automatically reset next month or upgrade your plan. See [Kimi Membership Credits](https://www.kimi.com/membership-credits)
for details. When the quota is exhausted, your account enters a frozen state, as shown below:

**How to fix:**
* Wait for automatic reset at the start of the next billing cycle
* Go to the [Subscription page](https://www.kimi.com/membership/subscription?tab=quota)
to purchase extra usage or upgrade your plan for a higher monthly quota
### Concurrent Request Limit [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#concurrent-request-limit)
error, status code: 403, message: You've reached your concurrent request limit. Please wait for your ongoing requests to finish and try again.
The number of in-flight requests on the account has reached its limit. This limit is triggered by risk-control policy.
**How to fix:**
* Read the [Kimi Code Community Guidelines](https://www.kimi.com/code/docs/en/kimi-code/community-guidelines.html)
to understand the violation and what is covered
* To appeal, email [support@moonshot.ai](mailto:support@moonshot.ai)
and include your account ID, the time the limit was triggered, a description of your use case, and relevant screenshots
Rate Limits & Overload [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#rate-limits-overload)
------------------------------------------------------------------------------------------------------------------
**HTTP 429**
Transient limits — **a short wait and retry recovers them**: too many concurrent requests means the account sent too many requests in a short period; inference engine overload is a server capacity issue, not related to your personal quota or account status.
### Too Many Concurrent Requests [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#too-many-concurrent-requests)
error, status code: 429, message: We're receiving too many requests at the moment. Please wait a moment and try again.
Too many requests were sent in a short period, exceeding the account limit.
**How to fix:**
* Wait a moment and retry; avoid sending requests rapidly in succession
### Inference Engine Overloaded [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#inference-engine-overloaded)
error, status code: 429, message: The engine is currently overloaded, please try again later
The server's current request volume exceeds inference capacity. **Not related to your personal quota or account status.** This may occur during peak hours (14:00–17:00 on weekdays). Kimi Code will address this promptly — you can also avoid peak hours.
**How to fix:**
* Wait a moment and retry
Request Format Errors [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#request-format-errors)
------------------------------------------------------------------------------------------------------------------
**HTTP 400**
The request content itself has a problem; the server rejects it during parsing or validation. **Fix the request content — no need to wait or contact support.**
### Message Body Exceeds Context Limit [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#message-body-exceeds-context-limit)
error, status code: 400, message: total message size 5943865 exceeds limit 2097152
The total size of all messages (including conversation history, system prompt, and tool results) exceeds the 2 MB context limit. This is the most frequently occurring 400 error.
**How to fix:**
* Trim conversation history by removing unnecessary earlier turns
* Process long content in segments to keep each request within size limits
### Token Limit Exceeded [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#token-limit-exceeded)
error, status code: 400, message: Invalid request: Your request exceeded model token limit: 262144 (requested: 558009)
The number of tokens in the request exceeds the model's single-request limit (262,144 tokens).
**How to fix:**
* Shorten the prompt or truncate conversation history
* Process long content across multiple requests
### Missing Reasoning Content Field [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#missing-reasoning-content-field)
error, status code: 400, message: thinking is enabled but reasoning_content is missing in assistant tool call message at index 2
Extended thinking (thinking mode) is enabled, but the `reasoning_content` field is missing from the tool call message. This is a Kimi Code-specific field required when thinking mode is active.
**How to fix:**
* Add the `reasoning_content` field to the assistant message in tool calls
* See the [Providers and models](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/providers.html)
for the field specification
### Unsupported Image URL [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#unsupported-image-url)
error, status code: 400, message: Invalid request: unsupported image url: C:\Users\pc\...\screenshot.jpg
The image URL format is not supported: local file paths, non-standard base64 prefixes, or unsupported external domains.
**How to fix:**
* Local paths must be uploaded to a publicly accessible URL
* Base64 images must use the standard format: `data:image/jpeg;base64,...`
### Duplicate Tool Name [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#duplicate-tool-name)
error, status code: 400, message: function name unnamed_function is duplicated
The `tools` array contains duplicate tool definitions with the same name.
**How to fix:**
* Ensure every tool's `name` field is unique
### Content Safety Rejection [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#content-safety-rejection)
error, status code: 400, message: The request was rejected because it was considered high risk
The request content triggered content safety detection and was rejected by the server.
**How to fix:**
* Review your prompt for sensitive content and retry after modification
* If you believe this is a false positive, go to [Kimi.ai](https://www.kimi.com/)
on the web, click your profile picture in the bottom-left corner, then select **Get Help** → **User Feedback** to contact our support team with the content that triggered the error
Resource Not Found [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#resource-not-found)
------------------------------------------------------------------------------------------------------------
**HTTP 404**
The requested resource does not exist, or the current account does not have access. Verify the model name and endpoint path.
### Model Not Found [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#model-not-found)
error, status code: 404, message: Not found the model kimi-for-coding or Permission denied
**How to fix:**
* Confirm the model name is spelled correctly (`kimi-for-coding`)
* Confirm the account has [Kimi Code](https://kimi.com/code)
access enabled
### Endpoint Not Found [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#endpoint-not-found)
method not found
**How to fix:**
* Verify the request URL is correct. Kimi Code Base URL is `https://api.kimi.ai/coding/v1` (OpenAI protocol) or `https://api.kimi.ai/coding/` (Anthropic protocol)
Internal Server Errors [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#internal-server-errors)
--------------------------------------------------------------------------------------------------------------------
**HTTP 500**
An unexpected error occurred on the server — **not caused by request content or account status**. In most cases, waiting a moment and retrying will resolve it. If the issue persists, go to [Kimi.ai](https://www.kimi.com/)
on the web, click your profile picture in the bottom-left corner, then select **Get Help** → **User Feedback** to contact our support team.
### Invalid bot\_id Format [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#invalid-bot-id-format)
invalid_argument: field kimi.billing.v1.ClawExtension.bot_id: value "KIMI_CLAW_ID" (id_kind=uuid_v4): value does not match id_kinds: [uuid_v4]
invalid_argument: field kimi.billing.v1.ClawExtension.bot_id: value "openclaw-local" (id_kind=uuid_v4): value does not match id_kinds: [uuid_v4]
The `bot_id` is not a valid UUID v4. This field is automatically attached by client software when sending requests — it is normally managed by the client, not set manually by users.
**How to fix:**
* Update to the latest version of your client and retry
* If the issue persists after updating, go to [Kimi.ai](https://www.kimi.com/)
on the web, click your profile picture in the bottom-left corner, then select **Get Help** → **User Feedback** to contact our support team with the full error message
### Database Connection Failed [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#database-connection-failed)
internal: failed to connect to `user=kimi_chat_prod_rw database=membership_009`: ...: connection reset by peer
internal: FATAL: terminating connection due to administrator command (SQLSTATE 57P03)
The server could not connect to the membership verification database, or the database is under maintenance. This is an infrastructure-level failure.
**How to fix:**
* Wait 1–2 minutes and retry
### Internal Connection Error [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#internal-connection-error)
internal: conn closed
internal: driver: bad connection
internal: read tcp ...: i/o timeout
internal: unexpected EOF
internal: failed to evaluate rate limit script: read tcp ...: i/o timeout
Internal network connection anomaly on the server side, covering connection resets, I/O timeouts, Redis rate-limit script timeouts, and similar low-level errors. Usually a transient fault.
**How to fix:**
* Wait a moment and retry (start with 1 second, up to 3 retries)
### Downstream Service Unavailable [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#downstream-service-unavailable)
unavailable: 503 Service Unavailable
unavailable: 504 Gateway Timeout
unavailable: 502 Bad Gateway
The server received a 5xx response while calling a downstream model or infrastructure component.
**How to fix:**
* Wait a moment and retry
### Account Status Abnormal [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#account-status-abnormal)
unauthenticated: not_found: 未找到该账号,请确认是否注册
unauthenticated: failed_precondition: 因违反用户协议,该账号已被禁用。
unauthenticated: failed_precondition: 因违反用户协议,该账号已被暂时禁用。
unauthenticated: failed_precondition: 因违反用户协议,该账号已被禁言。
When the server queried the account, it found the account does not exist or is in an abnormal state.
**How to fix:**
* Account not found: confirm the account you are using has completed registration
* Account disabled/muted: email [support@moonshot.ai](mailto:support@moonshot.ai)
to learn the reason and how to appeal
Tool Call Errors [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#tool-call-errors)
--------------------------------------------------------------------------------------------------------
The following errors occur during AI tool call execution (such as reading web pages or processing images). **They do not affect the conversation itself** — only the specific operation that failed.
If you see authentication or rate-limiting errors (e.g. 401, 429) in this context, refer to the corresponding sections above.
### Request Canceled [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#request-canceled)
**HTTP 499**
error sending 'CallDataSourceTool' request: Post "http://...": context canceled
canceled: context canceled
The client disconnected before receiving a result — typically caused by the user manually stopping the operation, a network interruption, or a client-side timeout. Not a server error.
**How to fix:**
* If manually stopped, no action needed
* If this happens frequently without being triggered manually, check whether your client's timeout setting is too short
### Web Page Read Failed [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#web-page-read-failed)
**HTTP 500**
url2text:v2:fresh-request timeout
url-to-text request failed: 30001 invalid html
url-to-text request failed: 30041 check url failed, client error (4xx)
url-to-text request failed: 30043 check url failed, server error (5xx)
url-to-text request failed: 403 verify page
url-to-text request failed: 500 url is in blacklist
spider checkUrl failed: Post "...": context deadline exceeded
The AI failed to read the web page content. Common causes: target page response timeout, abnormal page structure, login required, URL on blocklist, or the target server itself returned an error.
**How to fix:**
* Timeout or server error: retry later
* Login-required pages (verify page): cannot be read via tool call — manually copy the content and paste it to the AI instead
* Blocklisted URL: the address is blocked by the system and cannot be accessed
### Image Moderation Failed [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#image-moderation-failed)
**HTTP 500**
image_url:moderation request error: 非法输入
image_url:Post "https://api.msh.team/v1/moderations": context deadline exceeded
While the AI was processing an image, the image content moderation service returned an error or timed out.
**How to fix:**
* `非法输入` (illegal input): the image content triggered content moderation — ensure the image complies with usage policies
* Timeout: retry later, or check your network connection
### URL Security Risk Blocked [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#url-security-risk-blocked)
**HTTP 403**
(security_risk) We consider the current URL poses a security risk and are unable to provide fetch service at this time.
The URL passed in the tool call was flagged as a security risk, and the server refused to fetch it.
**How to fix:**
* Internal network addresses (e.g. `192.168.x.x`, `10.x.x.x`) and known high-risk domains will be blocked
* Pages that require login cannot be fetched via tool calls
### Invalid URL Format [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#invalid-url-format)
**HTTP 400**
(invalid_url) The provided URL is invalid: parse "https://the repo for the contents of the path": invalid character " " in host name
(invalid_url) The provided URL is invalid: missing scheme
The model passed a natural-language description or a malformed string as a URL to the tool — typically a descriptive phrase treated as an address, or a missing protocol prefix.
**How to fix:**
* Ensure the value passed is a real, accessible URL — not a text description of one
* The protocol prefix (`http://` or `https://`) is required and cannot be omitted
Errors Not Covered Here [](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#errors-not-covered-here)
----------------------------------------------------------------------------------------------------------------------
If none of the entries above match the error you encountered, go to [Kimi.ai](https://www.kimi.com/)
on the web, click your profile picture in the bottom-left corner, then select **Get Help** → **User Feedback** to contact our support team, and include the full error message, Request ID, and the time of the request.
---
# Changelog | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#VPContent)
On this page
Changelog [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#changelog)
============================================================================================
This page documents the changes in each Kimi Code Desktop release.
1.0.3 (2026-09-23) [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#_1-0-3-2026-09-23)
-------------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#features)
* Click a local HTML file in the conversation to open it as a real page in the built-in browser.
* Downloads in the browser's download history can be paused, resumed, canceled, and retried, with speed and time left shown.
* Valid leading slash commands are highlighted in the Composer, with argument hints shown before you type arguments.
* Right-click a file name in the conversation to copy its path or reveal it in the folder.
* New settings toggle for automatic session title generation; turn it off to stop AI naming for new sessions.
* Free-plan accounts are prompted to upgrade when sending with subscription models.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#polish)
* Markdown tables in the conversation now have a rounded frame and expand to the full width.
* Cron jobs show readable names, schedules, and details in the conversation.
* Address bar suggestions are highlighted, deduplicated, and distinguished by type.
* The expanded tool panel shows the full Bash command.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#bug-fixes)
* Fix a vulnerability that let malicious web pages run arbitrary commands through the local embedded server.
* Fix long conversations freezing on open, stuttering while streaming, and excessive memory use on mobile.
* Fix the confirmation dialog spinning forever after deleting a session.
* Fix the subagent model showing as unconfigured in settings and not taking effect when saved.
* Fix a series of display issues with Swarm cards and member statuses.
* Fix forked sessions having their titles overwritten by automatic regeneration.
* Fix the terminal opening the search panel on Cmd+K and Ctrl+C not copying the selection.
* Fix the sidebar fighting the work panel when both are open.
* Fix side chat not showing a failure card on failed requests and side chat entries staying enabled on the empty new-session screen.
* Fix task notification cards losing stream order inside the turn fold.
* Fix unstable pinned screenshot dragging on Windows.
1.0.2 (2026-09-19) [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#_1-0-2-2026-09-19)
-------------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#features-1)
* Built-in browser overhaul: the transcript shows the Agent's live browsing activity, grouped into activity summaries with sources listed; the page glows while the Agent controls a tab; the Agent proactively shows pages you ask to see.
* New "Open in default browser" button in the address bar; download history shows live progress and file actions.
* The Agent can search with your configured search engine.
* Redesigned providers settings page.
* Quit confirmation is now an in-app dialog.
* Hover to reveal subagent names.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#polish-1)
* Faster startup paint, lighter sidebar updates, and bounded session search.
* The transcript no longer restyles when the composer wraps.
* Screenshots are no longer re-decoded when exporting or copying.
* The screenshot global hotkey is limited to stable builds.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#bug-fixes-1)
* Fix page capture failing when the window is hidden or minimized.
* Restore `` ctrl+` `` as the bottom terminal toggle and drop the new-terminal-tab shortcut.
* Keep the current view after login instead of jumping to the most recent session.
* Fix address bar suggestions not updating in place while typing.
* Fix cmd-clicked and middle-clicked links not opening in a new tab.
* Fix the Agent's browser URLs being cut to a single character.
* Fix the download save dialog not appearing on the app window.
* Fix sub-agent approval and question requests not being surfaced.
* Fix session restore flicker; turn file cards are limited to the latest 3 turns.
* Fix the transcript jumping while resizing the window or toggling dock panels.
* Windows: detect editors installed in custom directories, and preserve fullscreen window chrome and media controls.
1.0.1 (2026-09-17) [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#_1-0-1-2026-09-17)
-------------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#features-2)
* New "Open file" button in the changes diff detail view.
* Hovering a link in the transcript shows the full URL with open actions.
* Browser tool calls are visualized in the transcript.
* Image preview supports gallery navigation and a right-click menu.
* The confirm dialog for removing a workspace now spells out what removal does.
* Screenshot output actions are reordered to close, pin, save, copy.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#polish-2)
* Unify the styles of the providers, plugins, shortcuts, and browser tabs in settings.
* Improve interface clarity on low-DPI displays.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#bug-fixes-2)
* Failed-turn cards now show the full provider error.
* Edit and View menu role labels are localized.
* Multiple built-in browser fixes: Agent clipboard and undo keys not working on macOS, pages going blank when a non-http link is blocked, and element refs and wait polling failing intermittently.
* Fix toasts being hidden behind modal dialogs.
* Fix the app root scrolling when the right panel opens.
* Fix tool call rendering and chat interactions in side chat.
1.0.0 (2026-09-17) [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#_1-0-0-2026-09-17)
-------------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-desktop/changelog.html#features-3)
* Kimi Code Desktop is officially available: it carries the Agent core of Kimi Code CLI into a graphical interface, where you open a project, talk to the Agent, and ship changes in one window. Available for macOS (Apple Silicon / Intel) and Windows.
* Every step stays visible: tool calls, thinking, and the files changed in each turn are all presented in the interface; sensitive operations raise approval prompts, and three permission modes (Always Ask / Ask When Needed / Never Ask) keep you in control.
* A complete workflow from conversation to delivery: goal mode keeps long-running objectives moving and can be paused, resumed, or cancelled; plan mode proposes an approach before touching files, and the plan can be reviewed and refined; long tasks can move to the background, where you can check progress at any time.
* Built-in browser and visual annotation: the browser lives in the right panel, with tabs that stay with the session and page context shared with the Agent; screenshot annotation, text selection comments, `@` file mentions, and element picking on web pages tell the Agent exactly what to change.
* Sign in to use official Kimi models out of the box, or connect third-party model providers; sessions, projects, and background tasks are managed in one place, with plugins to extend capabilities.
---
# Contact and Feedback | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code/contact-and-feedback.html#VPContent)
On this page
Contact and Feedback [](https://www.kimi.com/code/docs/en/kimi-code/contact-and-feedback.html#contact-and-feedback)
=====================================================================================================================
Hit a problem, have a feature request, or want to reach the team directly? See whether you can resolve it yourself first, and if you still need help, contact us through any of the channels below.
Before you file [](https://www.kimi.com/code/docs/en/kimi-code/contact-and-feedback.html#before-you-file)
-----------------------------------------------------------------------------------------------------------
The [FAQ](https://www.kimi.com/code/docs/en/kimi-code/faq.html)
covers common questions and the [Error Reference](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html)
explains common server-side errors — worth checking before you reach out.
A few quick self-checks often resolve things on the spot:
* Is the CLI up to date? (run `kimi --version`, and update if needed)
* Can you reach Kimi's service? A corporate network or proxy may block `api.kimi.ai`
* Are you signed in, and is your API Key valid?
* Are the current working directory and file permissions OK?
Feedback channels [](https://www.kimi.com/code/docs/en/kimi-code/contact-and-feedback.html#feedback-channels)
---------------------------------------------------------------------------------------------------------------
Still stuck, or want to share a feature request or feedback? Pick whichever channel below fits.
### Online support [](https://www.kimi.com/code/docs/en/kimi-code/contact-and-feedback.html#online-support)
Go to [Kimi.ai](https://www.kimi.com/)
on the web, click your profile picture in the bottom-left corner, then select **Get Help** → **User Feedback** to reach our support team. Product usage, bugs, quota, and refund questions are all handled here — please describe the problem, the steps you took, and any relevant logs.
### Report from the CLI (recommended) [](https://www.kimi.com/code/docs/en/kimi-code/contact-and-feedback.html#report-from-the-cli-recommended)
Run `/feedback` in the Kimi Code CLI interactive UI, then choose what to upload alongside your report:
* **No attachment** — text feedback only
* **Logs only** — wire events and diagnostic logs from this session; **pick at least this** so we have something to triage
* **Logs + codebase** — also includes your codebase for deeper diagnosis; sensitive files (`.env`, config files, secret keys) are automatically excluded, and attachments are used only for diagnosis and never shared
After submitting, the CLI shows a `Session` and a `Feedback ID`. Email [code@moonshot.ai](mailto:code@moonshot.ai)
with both to follow up.
### GitHub Issues [](https://www.kimi.com/code/docs/en/kimi-code/contact-and-feedback.html#github-issues)
Search existing issues or open a new one in the Kimi Code CLI repository:
* [https://github.com/MoonshotAI/kimi-code/issues](https://github.com/MoonshotAI/kimi-code/issues)
### Email [](https://www.kimi.com/code/docs/en/kimi-code/contact-and-feedback.html#email)
Email [code@moonshot.ai](mailto:code@moonshot.ai)
. To help us triage quickly, please include:
* A description of the problem
* Steps to reproduce
* Environment info (run `kimi --version`)
* Relevant error logs — run `/export-debug-zip` in the CLI (or `kimi export` from the shell) to produce a debug ZIP that already bundles the diagnostic logs, and attach it.
### Join the Discord community [](https://www.kimi.com/code/docs/en/kimi-code/contact-and-feedback.html#join-the-discord-community)
Join our [Discord community](https://discord.gg/rGSAZtWSZg)
to chat with the team and other users.
Account appeals [](https://www.kimi.com/code/docs/en/kimi-code/contact-and-feedback.html#account-appeals)
-----------------------------------------------------------------------------------------------------------
If your account was mistakenly suspended or you need to report abuse, email [support@moonshot.ai](mailto:support@moonshot.ai)
with your account ID, the time it occurred, and a brief description of the situation.
---
# Using the Desktop App | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#VPContent)
On this page
Using the Desktop App [](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#using-the-desktop-app)
========================================================================================================================
The desktop app covers the full conversation-to-delivery flow in one window: describe the task, track execution, review and verify the result, and manage your projects. This page introduces these capabilities by function; the shortest path from installation to your first task is in [Quick Start](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html)
.
From project to result [](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#from-project-to-result)
--------------------------------------------------------------------------------------------------------------------------
A complete task usually follows this flow:
1. Add a local workspace.
2. Create or resume a session.
3. Describe the task in the Composer and use `@` to reference relevant files or directories.
4. Choose a normal task, Plan, Goal, or Swarm based on the task.
5. Handle approvals and questions from the Agent.
6. Review changes, file previews, and Git status.
7. Run verification commands in the terminal.
8. Continue, revert, or finish based on the result.
For your first session, start with a read-only task to confirm that Desktop is using the right workspace before asking the Agent to change files.
Choose a task mode [](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#choose-a-task-mode)
------------------------------------------------------------------------------------------------------------------
Different tasks call for different ways of working. The **+** button in the lower-left corner of the Composer provides several task modes:
* **Normal task**: Use for well-scoped changes that are easy to verify.
* **Plan**: Use when the impact is uncertain and you want to confirm the approach first. The Agent analyzes the task and proposes a plan before changing files. See [Plan mode](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/interaction.html#plan-mode)
.
* **Goal**: Use for a longer objective that needs multiple turns and checks. The goal appears above the Composer and can be paused, resumed, or cancelled. See [Goal mode](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/interaction.html#goal-mode)
.
* **Swarm**: Use for investigation or modification work that can be split into independent subtasks. Progress appears in the Tasks or Subagent area. See [Agents and Sub-Agents](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/agents.html)
.
Provide useful context [](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#provide-useful-context)
--------------------------------------------------------------------------------------------------------------------------
The more specific the context, the less the Agent drifts from the goal. State the goal first, then add context:
* Use `@` to reference relevant files or directories.
* Type `/` to invoke built-in commands or saved extension commands; valid commands are highlighted.
* Paste or drag files, images, videos, and other attachments.
* Capture part of the screen with `Shift + Command + S` (macOS) or `Shift + Ctrl + S` (Windows), and add a comment to provide page state, design references, or error information.
* Select text in messages, file previews, diffs, or the terminal and choose **Comment** or **Add to conversation** to quote it into the current task.
* Provide error logs, reproduction steps, expected behavior, and verification commands.
* Clearly state directories, files, or behavior that must not be changed.
Steer while it runs [](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#steer-while-it-runs)
--------------------------------------------------------------------------------------------------------------------
While a task is running, the Agent's tool calls and thinking appear in the conversation and can be checked at any time. You can send follow-up input to adjust the direction, such as narrowing the scope, adding constraints, asking for an explanation, stopping the current action, or reverting changes with `/undo`.
For questions not directly related to the current task, use Side chat to discuss them without leaving the main session.
Review changes [](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#review-changes)
----------------------------------------------------------------------------------------------------------
After a change, confirm which files were modified and what each change looks like.
* **Changes**: The Changes tab in the right panel lists every change by file. Inspect an individual file or the changes from a single turn. The Changes tab is a singleton, so the new-tab menu hides it when one is already open.
* **Git status**: The top of the Changes panel shows the current branch, ahead/behind status, and the number of changed files, and can also show pull request status.
* **File Preview**: Preview Markdown, JSON, HTML, PDF, CSV, images, and code or text files, with actions to copy, download, reveal in the system, and open in an external app. Markdown files with frontmatter show a metadata card. File paths mentioned in the conversation can also be clicked open directly, and right-clicking a file name copies its path or reveals it in the folder.

The Changes tab in the right panel shows the exact diff for each modified file.

The top of the Changes panel shows the current branch and the number of changed files; each file in the list expands to show its diff.
Verify in the terminal [](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#verify-in-the-terminal)
--------------------------------------------------------------------------------------------------------------------------
If the result needs verification, both terminal and web page options are available. The bottom terminal panel is the native desktop terminal. Open it from the terminal button in the upper-right corner of the session. It supports multiple tabs and runs commands with the current workspace as its `cwd`. Use it for the project's existing build, test, formatting, and other verification commands, or to inspect Git command output.

The bottom terminal panel runs verification commands like builds and tests and shows their output.
To verify web pages, open the built-in browser in the right panel: browser tabs stay with the session and share page context with the Agent, so you can check pages without switching to another window. Clicking a local HTML file in the conversation opens it as a real page in the built-in browser. You can also annotate elements or regions on the page—each annotation captures the element's details along with a screenshot and your comment, so the Agent knows exactly what to change.

Annotating an element in the built-in browser: element details are captured automatically and can be inserted into the composer with a screenshot and comment.
Manage background tasks [](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#manage-background-tasks)
----------------------------------------------------------------------------------------------------------------------------
The desktop app can run background tasks while the main session continues. The work bar above the Composer shows running background work such as background Bash and background Agents, with status and counts. Expand it to see the task list (filter by recent, running, completed, or all), where you can:
* Check the status, output, and runtime of background Bash and tool tasks.
* See a background Agent's model, thinking effort, status, and result.
* Open the details of a task or subagent — a background Agent opens a task tab in the right panel with its execution summary, thinking, and tool calls.
* Stop a running task.
Background tasks and background Agents are two kinds of work: the former shows command and tool execution, the latter shows a subagent's independent work.
Manage projects and sessions [](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#manage-projects-and-sessions)
--------------------------------------------------------------------------------------------------------------------------------------
Desktop organizes sessions by workspace, and a workspace maps to a local project folder. Sessions in a workspace can be created, switched, renamed, archived, restored, deleted, forked, exported, pinned, and searched. Multiple sessions can stay open in parallel tabs, with batch management for cleanup, and global search finds sessions across workspaces. A title is generated after the first turn and can be regenerated from the session item, or automatic generation can be turned off in Settings.
Forking keeps the current session while you try another direction; archiving, search, restore, and export help manage session history.
Use external apps [](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#use-external-apps)
----------------------------------------------------------------------------------------------------------------
File Preview is used to preview files and copy, download, reveal in the system, or open in an external app. The top menu opens the current project or file in an external app, including VS Code, Cursor, Zed, Xcode, the system terminal, or system file managers such as Finder or Explorer. It can also copy the current path.
Extend with plugins [](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#extend-with-plugins)
--------------------------------------------------------------------------------------------------------------------
Plugins bring specific tools, workflows, or external services into the desktop app. In the Plugins area of Settings, you can browse the marketplace and install, enable, update, or remove plugins, or add custom plugin sources.
The official extensions currently available include:
* **Kimi Computer Use**: lets the Agent operate apps and interfaces on this Mac.
* **Kimi Browser Extension**: lets the Agent drive your real browser with your existing sign-in state; if the browser extension is missing, the Plugins area provides the Chrome or Edge extension installer.
* **Kimi Datasource**: gives the Agent data-query and datasource capabilities for tasks that need external data.
For how plugins are added, the marketplace, and custom sources, see [Plugins](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html)
.
Adjust settings [](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html#adjust-settings)
------------------------------------------------------------------------------------------------------------
The Settings panel includes General, Account, Agents & Sessions, Providers, Plugins, Shortcuts, About, Lab, and Archived Sessions. It is used to manage models, providers, message folding, account, permissions, shortcuts, agreement links, and experimental options.

The Settings sidebar lists General, Account, Providers, Plugins, and other areas; the right side shows the options for the selected area.
Continue with [Quick Start](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html)
for the shortest path through the first session.
---
# Configuration | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/configuration.html#VPContent)
On this page
Configuration [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/configuration.html#configuration)
===========================================================================================================
Configure in the "Kimi" section of VS Code settings (you can also open it via the action menu → **General Config**).
### Operation Approval [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/configuration.html#operation-approval)
| Setting | Default | Description |
| --- | --- | --- |
| `kimi.yoloMode` | `false` | Automatically approve all tool calls. Suitable for scenarios where you trust the workflow and pursue efficiency |
### Files and Editor [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/configuration.html#files-and-editor)
| Setting | Default | Description |
| --- | --- | --- |
| `kimi.autosave` | `true` | Automatically save files before Kimi reads or writes |
| `kimi.editorContext` | `never` | Controls when to share the current editor's file and cursor position (`never` / `onConversationStart` / `onFileChange`) |
### Input and Shortcuts [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/configuration.html#input-and-shortcuts)
| Setting | Default | Description |
| --- | --- | --- |
| `kimi.useCtrlEnterToSend` | `false` | Use Ctrl/Cmd+Enter to send messages |
| `kimi.enableNewConversationShortcut` | `false` | Enable Cmd/Ctrl+N new conversation shortcut (enabling this will occupy the system's default "New File" shortcut) |
### Model and Reasoning [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/configuration.html#model-and-reasoning)
| Setting | Default | Description |
| --- | --- | --- |
| `kimi.alwaysExpandThinking` | `false` | Expand thinking/reasoning process by default |
### Advanced [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/configuration.html#advanced)
| Setting | Default | Description |
| --- | --- | --- |
| `kimi.executablePath` | `""` | Custom Kimi Code CLI path (empty value uses built-in) |
| `kimi.environmentVariables` | `{}` | Environment variables passed to Kimi Code CLI |
---
# Customization | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/customization.html#VPContent)
On this page
Customization [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/customization.html#customization)
===========================================================================================================
MCP Servers [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/customization.html#mcp-servers)
-------------------------------------------------------------------------------------------------------
MCP (Model Context Protocol) servers can extend Kimi with external tools and services. Manage them via the action menu (gear icon) → **MCP Servers**.
### Transport Types [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/customization.html#transport-types)
Two transport types are supported:
* **stdio**: Local command-line tools; requires specifying command, arguments, and environment variables
* **http**: Remote service; requires specifying URL, with optional OAuth
### Recommended Servers [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/customization.html#recommended-servers)

One-click installation of recommended servers is provided:
| Server | Purpose |
| --- | --- |
| Playwright | Browser automation |
| Context7 | Real-time documentation |
| GitHub | API access |
Some servers require OAuth authentication. Click the authorize button to open the flow, or reset credentials. You can test the connection before saving to verify server availability.
---
# Core Operations | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#VPContent)
On this page
Core Operations [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#core-operations)
=================================================================================================================
Opening the Panel [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#opening-the-panel)
---------------------------------------------------------------------------------------------------------------------

Click the Kimi icon in the activity bar, or execute the "Kimi Code" command via the command palette.
* * *
Input and Control [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#input-and-control)
=====================================================================================================================
File References [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#file-references)
-----------------------------------------------------------------------------------------------------------------
Type `@` and then select a file or folder name. For example: `@src/handlers/` references a folder, `@app.ts` references a file, `@src/app.ts:10-20` references a specific line range.
Press `Alt+K` to quickly insert the current file or selected code as a reference.
Slash Commands [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#slash-commands)
---------------------------------------------------------------------------------------------------------------
Type `/` to open the command menu. Use `/init` to scan the project and generate documentation, or `/compact` to compress overly long context.
Input History [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#input-history)
-------------------------------------------------------------------------------------------------------------
Press `↑` / `↓` in the input box to quickly browse recently sent message history, making it easy to repeat or modify questions.
Media File Input [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#media-file-input)
-------------------------------------------------------------------------------------------------------------------
Supports pasting, dragging and dropping, or selecting media files. Supported formats include: PNG, JPEG, GIF, WebP, HEIC and other image formats, as well as MP4, WebM, MOV and other video formats.
* **Paste / Drag and drop**: Single image original size must not exceed 5MB; the system will automatically compress (HEIC to JPEG, oversize scaling, quality compression to approx. 2MB).
* **File picker**: When selecting files via the "+" button in the input box or the `@` menu, images must not exceed 10MB, videos must not exceed 20MB.
* **General limit**: Each message can attach at most 9 files, totaling no more than 80MB. When media files are attached, models that do not support multimodality will be automatically filtered out.
Message Queue [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#message-queue)
-------------------------------------------------------------------------------------------------------------
While Kimi is responding, you can continue typing and sending in the input box. These messages are not lost, but instead enter the **message queue**. The bottom toolbar displays the queue count; click to expand the queue panel:
* View the list of pending messages
* Edit or delete messages in the queue
* Adjust message order
* During Kimi's response process, click the ⚡ icon on a queue item to immediately insert that message as a **Steer**, guiding Kimi to adjust the current response direction
Model Switching [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#model-switching)
-----------------------------------------------------------------------------------------------------------------
Switch models via the dropdown menu in the input bar.
**Using HighSpeed**: HighSpeed (`kimi-for-coding-highspeed`) delivers roughly 5–6× the output speed of Standard at about 3× the quota usage, and requires an [Allegretto / Pro or above](https://www.kimi.com/membership/pricing?from=kfc_membership_topbar&track_id=a7764d49-73ad-4d08-b2f3-a8d7433917f8)
plan. If HighSpeed doesn't appear in the model dropdown yet, **restart VS Code or reinstall the extension**; then pick `kimi-for-coding-highspeed` from the dropdown to use it.
Deep Thinking Mode [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#deep-thinking-mode)
-----------------------------------------------------------------------------------------------------------------------
Some models support extended reasoning capabilities. Thinking mode toggle has two states: hidden when the model doesn't support thinking mode, or manually enable/disable by the user.
> **Note**: **K2.8 Preview** supports adjustable thinking effort, with the same levels as K3; with Thinking mode off, requests are served by K2.8 Preview (no thinking).
After enabling, thinking steps are collapsed by default in the response; you can expand to view the reasoning process. Enable `kimi.alwaysExpandThinking` in settings to expand thinking by default.
* * *
Working Modes [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#working-modes)
=============================================================================================================
Operation Confirmation and Tool Execution [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#operation-confirmation-and-tool-execution)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
When Kimi proposes running a tool or writing to a file, a confirmation dialog is displayed with three options:
* **Yes**: Approve only the current operation
* **Yes, for this session**: Approve similar operations within the current session until a new session is started
* **No**: Reject the operation
Enable `kimi.yoloMode` in settings to automatically approve all tool calls. Suitable for scenarios where you trust the workflow and pursue efficiency.
### Question Dialog [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#question-dialog)
During execution, Kimi may ask you questions (for example, asking you to choose an implementation plan). At this point a Q&A card pops up at the bottom; you can directly click preset options, or select "Custom response..." to enter a custom reply. After answering, Kimi will continue execution.
Plan Mode [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#plan-mode)
-----------------------------------------------------------------------------------------------------
Click the 📋 icon to the left of the input box to enter plan mode. After enabling, Kimi will first output an expandable plan card before formal execution, listing the steps it intends to take. You can review the plan before letting it continue.
* The plan mode button retains the previous setting for each new session.
* If Kimi is already in a streaming response, exiting plan mode requires secondary confirmation to avoid interrupting the current task.
File Change Tracking [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#file-change-tracking)
---------------------------------------------------------------------------------------------------------------------------
After Kimi modifies files, all changes are tracked and displayed in the "File Changes" panel. You can view the list of modified files and their status (added, modified, or deleted), as well as line addition/deletion statistics.
For each file, you can view changes in VS Code's native diff view, restore to the original state, or keep changes to clear the tracking record. Bulk operations are supported, allowing you to keep or undo all changes at once. The baseline state is captured at the first modification in the session; rollback will restore to this baseline version.
* * *
Context Management [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#context-management)
=======================================================================================================================
Historical Sessions [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#historical-sessions)
-------------------------------------------------------------------------------------------------------------------------
Click the history dropdown menu at the top of the panel to browse past sessions. Session data is stored locally and supports keyword search. You can delete old sessions or load a session to continue a previous conversation.
The status bar displays context usage percentage and input/output token counts. When context usage is high, use the `/compact` command to compress.
Working Directory Switching [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#working-directory-switching)
-----------------------------------------------------------------------------------------------------------------------------------------
Click the gear icon (Action Menu) to the right of the input box → **Working Directory** to switch working directories among different subdirectories in the current Workspace. After switching, a new session is automatically started so that Kimi can work based on the new directory context. Supports directly selecting already-registered subdirectories, or browsing arbitrary subfolders via "Browse...".
* * *
Action Menu [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#action-menu)
=========================================================================================================
Action Menu [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/core-operations.html#action-menu-1)
-----------------------------------------------------------------------------------------------------------
The gear icon to the right of the input box is the action menu entry, containing the following functions:
* **Working Directory**: Switch the current working directory (see "Working Directory Switching" above)
* **MCP Servers**: Open the MCP server configuration panel
* **General Config**: Open the Kimi configuration page in VS Code settings
* **Show Logs**: Open the Kimi Code output log panel for troubleshooting
* **Reset Kimi**: Reset the Kimi Webview, suitable for cases where the interface is frozen or unresponsive
* **Sign out / Sign in**: Log out or log back in to your Kimi account
Additionally, you can execute "Kimi Code: Run CLI" in the VS Code command palette to directly launch Kimi Code CLI in the integrated terminal.
---
# Claude Code | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#VPContent)
On this page
Claude Code [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#claude-code)
==================================================================================================
> [Claude Code](https://docs.anthropic.com/en/docs/claude-code)
> is a programming agent product from Anthropic. Its interface, configuration options, and supported capabilities may change across versions. This guide describes a general integration approach: forwarding Claude Code model requests to the Kimi Code API through environment variables.
Before You Start [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#before-you-start)
------------------------------------------------------------------------------------------------------------
* Make sure you have subscribed to [Kimi membership](https://www.kimi.com/membership/pricing?from=)
and activated Kimi Code benefits.
* Obtain an API Key:
1. Go to the [Kimi Code Console](https://www.kimi.com/code/console)
;
2. Click "Create API Key", enter a name and confirm;
3. Copy the generated key and keep it safe (the full key cannot be viewed again after closing the dialog).

Configuration [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#configuration)
------------------------------------------------------------------------------------------------------
[Claude Code](https://docs.anthropic.com/en/docs/claude-code)
is a command-line programming assistant launched by Anthropic. By configuring environment variables to connect it to Kimi's API endpoint, you can directly call Kimi Code's AI capabilities within Claude Code and enjoy the Kimi Code programming experience in a familiar terminal interface.
① **Install Claude Code**
For installation instructions, please refer to the [Claude Code official documentation](https://docs.anthropic.com/en/docs/claude-code/getting-started)
.
│
② **Run Script to Skip Login**
After installation, do not start Claude directly. Execute the following script in the terminal first to skip Anthropic's default login flow and clean up historical configuration:
sh
node --eval "
// enable third party model support and fast mode
const claudeJsonFilePath = path.join(os.homedir(), '.claude.json');
if (fs.existsSync(claudeJsonFilePath)) {
const content = JSON.parse(fs.readFileSync(claudeJsonFilePath, 'utf-8'));
fs.writeFileSync(claudeJsonFilePath, JSON.stringify({ ...content, penguinModeOrgEnabled: true, hasCompletedOnboarding: true }, null, 2), 'utf-8');
} else {
fs.writeFileSync(claudeJsonFilePath, JSON.stringify({ penguinModeOrgEnabled: true, hasCompletedOnboarding: true }), 'utf-8');
}
// delete old endpoint, credential and model id
const claudeSettingsJsonFilePath = path.join(os.homedir(), '.claude', 'settings.json');
if (fs.existsSync(claudeSettingsJsonFilePath)) {
const content = JSON.parse(fs.readFileSync(claudeSettingsJsonFilePath, 'utf-8'));
if (typeof content === 'object' && typeof content.env === 'object') {
for (const element of [\
'ANTHROPIC_BASE_URL',\
'ANTHROPIC_API_KEY',\
'ANTHROPIC_AUTH_TOKEN',\
'ANTHROPIC_MODEL',\
'ANTHROPIC_SMALL_FAST_MODEL',\
'CLAUDE_CODE_SUBAGENT_MODEL',\
'ANTHROPIC_DEFAULT_FABLE_MODEL',\
'ANTHROPIC_DEFAULT_FABLE_MODEL_NAME',\
'ANTHROPIC_DEFAULT_OPUS_MODEL',\
'ANTHROPIC_DEFAULT_OPUS_MODEL_NAME',\
'ANTHROPIC_DEFAULT_SONNET_MODEL',\
'ANTHROPIC_DEFAULT_SONNET_MODEL_NAME',\
'ANTHROPIC_DEFAULT_HAIKU_MODEL',\
'ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME',\
'ENABLE_TOOL_SEARCH',\
'CLAUDE_CODE_AUTO_COMPACT_WINDOW',\
'CLAUDE_CODE_EFFORT_LEVEL',\
]) {
delete content.env[element];
}
fs.writeFileSync(claudeSettingsJsonFilePath, JSON.stringify(content, null, 2), 'utf-8');
}
}
"
The settings.json cleanup part only removes endpoint, credential, and model-related entries under `env` (leftovers there **override** environment variables exported in the terminal) — other settings are untouched. Also check `~/.zshrc`, `~/.bashrc`, and other shell config files for leftover `ANTHROPIC_*` exports (Windows users should check user environment variables) and remove them as well.
│
③ **Configure API Access**
Recommended model launch
**K2.8 Preview** is now fully rolled out in Kimi Code — `kimi-for-coding` is upgraded in place with no configuration changes: performance close to K3, with `low` / `high` / `max` thinking effort levels and up to 1M context. See [What's New](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html)
.
First check your membership tier to confirm which models and context windows you can use (see [Membership Benefits](https://www.kimi.com/code/docs/en/kimi-code/membership.html#plan-comparison)
for a comparison of the legacy and new plans):
| Plan | Available Models | Available Context Limit |
| --- | --- | --- |
| Go (new plans) | No coding quota | — |
| Andante (legacy plans) | `kimi-for-coding` | `1048576` |
| Plus / Moderato | `k3` `k3-256k` `kimi-for-coding` | `k3`: `262144` `k3-256k`: `262144` `kimi-for-coding`: `1048576` |
| Pro and above / Allegretto and above | `k3` `k3-256k` `kimi-for-coding` `kimi-for-coding-highspeed` | `k3`: `1048576` `k3-256k`: `262144` `kimi-for-coding`: `1048576` `kimi-for-coding-highspeed`: `262144` |
Two configuration methods are available — **pick one, do not mix them**: Method 1 writes to the settings.json config file and takes effect permanently regardless of how Claude Code is launched; Method 2 exports variables in the current terminal only, effective for that session.
**Method 1: Write to settings.json (recommended, persistent)**
The path of settings.json:
macOS / LinuxWindows
text
~/.claude/settings.json
text
C:\Users\\.claude\settings.json
Write the following into the `env` field of that file (create the file if it does not exist):
K3-256KK3 1M context
json
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.kimi.ai/coding/",
"ANTHROPIC_API_KEY": "Your API Key",
"ANTHROPIC_MODEL": "k3-256k",
"ANTHROPIC_DEFAULT_FABLE_MODEL": "k3-256k",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "k3-256k",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "k3-256k",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "k3-256k",
"CLAUDE_CODE_SUBAGENT_MODEL": "k3-256k",
"CLAUDE_CODE_EFFORT_LEVEL": "high",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "262144",
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "262144"
}
}
json
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.kimi.ai/coding/",
"ANTHROPIC_API_KEY": "Your API Key",
"ANTHROPIC_MODEL": "k3[1m]",
"ANTHROPIC_DEFAULT_FABLE_MODEL": "k3[1m]",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "k3[1m]",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "k3[1m]",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "k3[1m]",
"CLAUDE_CODE_SUBAGENT_MODEL": "k3[1m]",
"CLAUDE_CODE_EFFORT_LEVEL": "high",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1048576",
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "1048576"
}
}
Restart Claude Code after saving for the changes to take effect.
Plaintext key risk
The API Key in `settings.json` is stored in plaintext — do not commit this file to a version-control repository or share it publicly with dotfiles. The file's `env` field **overrides** same-named variables exported in the terminal.
**Method 2: Terminal environment variables (current session only)**
**K3-256K configuration:**
macOS / LinuxWindows
sh
export ANTHROPIC_BASE_URL=https://api.kimi.ai/coding/
export ANTHROPIC_API_KEY=Your API Key
export ANTHROPIC_MODEL="k3-256k"
export ANTHROPIC_DEFAULT_FABLE_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_OPUS_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_SONNET_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_HAIKU_MODEL=$ANTHROPIC_MODEL
export CLAUDE_CODE_SUBAGENT_MODEL=$ANTHROPIC_MODEL
export CLAUDE_CODE_EFFORT_LEVEL=high
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=262144
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=262144
claude
powershell
$env:ANTHROPIC_BASE_URL="https://api.kimi.ai/coding/"
$env:ANTHROPIC_API_KEY="Your API Key"
$env:ANTHROPIC_MODEL="k3-256k"
$env:ANTHROPIC_DEFAULT_FABLE_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_OPUS_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_SONNET_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL=$env:ANTHROPIC_MODEL
$env:CLAUDE_CODE_SUBAGENT_MODEL=$env:ANTHROPIC_MODEL
$env:CLAUDE_CODE_EFFORT_LEVEL="high"
$env:CLAUDE_CODE_AUTO_COMPACT_WINDOW="262144"
$env:CLAUDE_CODE_MAX_CONTEXT_TOKENS="262144"
claude
**K3 1M context** configuration:
The `k3[1m]` form is only needed for Claude Code env vars
`k3[1m]` (with the surrounding quotes) explicitly tells Claude Code to use a 1M context window. In any other scenario — API requests, the Model ID field of other third-party tools — just use `k3`.
macOS / LinuxWindows
sh
export ANTHROPIC_BASE_URL=https://api.kimi.ai/coding/
export ANTHROPIC_API_KEY=Your API Key
export ANTHROPIC_MODEL="k3[1m]"
export ANTHROPIC_DEFAULT_FABLE_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_OPUS_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_SONNET_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_HAIKU_MODEL=$ANTHROPIC_MODEL
export CLAUDE_CODE_SUBAGENT_MODEL=$ANTHROPIC_MODEL
export CLAUDE_CODE_EFFORT_LEVEL=high
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=1048576
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=1048576
claude
powershell
$env:ANTHROPIC_BASE_URL="https://api.kimi.ai/coding/"
$env:ANTHROPIC_API_KEY="Your API Key"
$env:ANTHROPIC_MODEL="k3[1m]"
$env:ANTHROPIC_DEFAULT_FABLE_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_OPUS_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_SONNET_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL=$env:ANTHROPIC_MODEL
$env:CLAUDE_CODE_SUBAGENT_MODEL=$env:ANTHROPIC_MODEL
$env:CLAUDE_CODE_EFFORT_LEVEL="high"
$env:CLAUDE_CODE_AUTO_COMPACT_WINDOW="1048576"
$env:CLAUDE_CODE_MAX_CONTEXT_TOKENS="1048576"
claude
### Configuration Reference [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#configuration-reference)
Claude Code internally uses different model tiers for different scenarios (main conversation, background summarization, sub-agents, etc.). Configuring only some of these variables will silently break the corresponding scenarios:
| Variable | Purpose | Impact if missing or misconfigured |
| --- | --- | --- |
| `ANTHROPIC_BASE_URL` | Routes model requests to the Kimi Code endpoint | Requests go to Anthropic's official endpoint and fail authentication |
| `ANTHROPIC_API_KEY` | Authenticates with your Kimi Code API Key | Returns a 401 authentication error |
| `ANTHROPIC_MODEL` | The model used for the main conversation | Falls back to Claude's default model name, which the Kimi Code endpoint does not recognize — model-not-found error |
| `ANTHROPIC_DEFAULT_OPUS_MODEL` / `ANTHROPIC_DEFAULT_SONNET_MODEL` / `ANTHROPIC_DEFAULT_HAIKU_MODEL` / `ANTHROPIC_DEFAULT_FABLE_MODEL` | Model names Claude Code picks for each task tier | Tasks on those tiers (e.g., haiku-tier background title generation and summarization) fail |
| `CLAUDE_CODE_SUBAGENT_MODEL` | The model used by sub-agents | Sub-agent tasks fail or degrade noticeably |
| `CLAUDE_CODE_AUTO_COMPACT_WINDOW` | Window size that triggers automatic context compaction | Must match the model's context: `1048576` for `k3[1m]`, `262144` for the others. Too small compacts too early and loses context; too large triggers context-overflow errors |
| `CLAUDE_CODE_MAX_CONTEXT_TOKENS` | Maximum context token budget | Same as above — must match the selected model's context window |
| `CLAUDE_CODE_EFFORT_LEVEL` | Default thinking effort level; `high` is recommended for K3 | Lower values may reduce quality on complex tasks |
When switching models, replace the value of every model variable in your configuration with the new model name.
### Switching thinking effort [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#switching-thinking-effort)
After starting, type `/effort` in a session to switch thinking effort levels — no environment variable needed. Both K3 and K2.8 Preview support `low` / `high` / `max` with identical levels; the mapping from Claude Code levels to actual levels is:
| Claude Code level | Actual level |
| --- | --- |
| `low` | `low` |
| `medium` | `high` (recommended) |
| `high` | `high` (recommended) |
| `xhigh` | `max` |
| `max` | `max` |
| Not set (default) | `high` (K3) / `max` (K2.8 Preview) |
Note
With thinking disabled, requests to the K3 series and K2.8 Preview are served by K2.8 Preview (no thinking); the thinking shortcut is `Option+T` on macOS and `Alt+T` on Windows / Linux.
> If prompted whether to use this API key, confirm to proceed. Afterwards, follow the prompts to select your trusted project folder to complete the authorization.
>
> 
│
④ **Verify After Starting**
After starting, enter `/status`. If the returned information shows Base URL as `https://api.kimi.ai/coding/`, the configuration is successful. Even if the model name still appears as a Claude model, the actual calls are still made to the Kimi Code API.

│
Using the VS Code Extension [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#using-the-vs-code-extension)
----------------------------------------------------------------------------------------------------------------------------------
The extension ships with its own Claude Code binary and shares the config files under `~/.claude` with the CLI. Follow these steps:
1. Complete the API setup in [Configuration](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#configuration)
above.
2. Open the extension and start a new session. When the login page appears, click **Run `claude` in terminal** at the bottom:

3. In the terminal that opens, complete two confirmations: choose **Yes, I trust this folder** for the workspace, then **1\. Yes** to confirm your API key:

4. **Quit VS Code completely** (`Cmd+Q` on macOS) and reopen it — the extension is ready to use.
Without this terminal confirmation, the extension lacks the API key confirmation record and the login page pops up repeatedly when you send a message.
FAQ [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#faq)
----------------------------------------------------------------------------------
### Changes to the configuration don't take effect [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#changes-to-the-configuration-don-t-take-effect)
Check whether `~/.claude/settings.json` has leftover entries under `env` (they override terminal environment variables) — you can run the cleanup script from Step ②. Also note that variables exported in a terminal only apply to that session and must be set again after opening a new terminal; if you wrote to `settings.json`, make sure you restarted Claude Code after editing.
### 401 authentication error [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#_401-authentication-error)
Check whether `ANTHROPIC_API_KEY` is a valid Kimi Code API Key — note that the full key is only shown once at creation time.
### Model not found [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#model-not-found)
Check the spelling of each model variable (e.g. `k3-256k`, `k3[1m]`), and make sure there are no extra spaces or quotes.
### Background tasks or sub-agents fail [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#background-tasks-or-sub-agents-fail)
Usually `ANTHROPIC_DEFAULT_HAIKU_MODEL`, `ANTHROPIC_DEFAULT_FABLE_MODEL`, or `CLAUDE_CODE_SUBAGENT_MODEL` is not configured — the corresponding scenario requested a model name the Kimi Code endpoint does not recognize. See the [Configuration Reference](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#configuration-reference)
and fill in the missing entries.
### The VS Code extension keeps showing the login page [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#the-vs-code-extension-keeps-showing-the-login-page)
The extension is missing the API key confirmation record. Click **Run `claude` in terminal** at the bottom of the login page, complete the trust-folder and API key confirmations in the terminal, then **quit VS Code completely** (`Cmd+Q` on macOS) and reopen. See [Using the VS Code Extension](https://www.kimi.com/code/docs/en/third-party-tools/claude-code.html#using-the-vs-code-extension)
.
---
# Changelog | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#VPContent)
On this page
Changelog [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#changelog)
========================================================================================
This page documents the changes in each Kimi Code CLI release.
2.1.0 (2026-09-23) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_2-1-0-2026-09-23)
---------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features)
* Add an experimental fullscreen mode toggle for the TUI. Enable it via the TUI mode setting in `/settings`, or set `tui_mode = "fullscreen"` in `~/.kimi-code/tui.toml`; it takes effect after restarting Kimi Code.
* In fullscreen, click a folded block to open or close it.
* Add a clickable "Jump to bottom" indicator to the fullscreen TUI.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish)
* Reduce the CLI's startup time and memory usage.
* Turn off filesystem watchers for config and workspace files by default. Set `[watch] enabled` to `true` or `KIMI_CODE_WATCH=1` to turn them back on. See [`watch`](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#watch)
for details.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes)
* Harden workspace security: block file tools from accessing files outside the working directory through symlinks, apply project-local configuration only after the workspace is trusted, block repository git configuration from executing commands during background git operations, and reject additional directories that resolve to the home directory or filesystem root.
* Fix several known issues and make various refinements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
2.0.2 (2026-09-19) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_2-0-2-2026-09-19)
---------------------------------------------------------------------------------------------------------
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-1)
* The agent no longer assumes the current working directory is the project root.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-1)
* Fix compaction failing after switching to a model with a smaller context window.
* Fix new messages occasionally landing at an old position in the conversation after resuming a session.
* Fix a message sent while the agent was running sometimes appearing twice in the chat.
* web: Improved interactions and fixed known bugs.
2.0.1 (2026-09-18) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_2-0-1-2026-09-18)
---------------------------------------------------------------------------------------------------------
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-2)
* Remove the system-prompt rule that forbade all file access outside the working directory.
* Providers can read their API key from a named environment variable via [`api_key_env`](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/providers.html)
in `config.toml`.
* Stop workspace file watchers from scanning an unbounded project root, and add `[watch] enabled` / `KIMI_CODE_WATCH` to disable watching entirely. See [`watch`](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#watch)
for details.
* Stop asking for approval of bash commands that cannot be statically analyzed in Ask When Needed permission mode.
* Rename the `kimi install-app` subcommand to `kimi install-desktop`; the old name keeps working as a hidden alias.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-2)
* Fix several known issues and make various refinements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
2.0.0 (2026-09-17) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_2-0-0-2026-09-17)
---------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-1)
* Add the `/desktop` slash command (alias `/install-desktop`) and the `kimi install-app` subcommand.
* Render mermaid code blocks as diagrams in the terminal; turn it off under `/settings` → Mermaid diagrams, or set `mermaid = "off"` in the `[markdown]` section of tui.toml.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-3)
* The built-in browser plugin now appears as "Kimi Browser Extension" in the plugins panel, marketplace catalog, and docs, matching the product rename.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-3)
* Fix several known issues and make various refinements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
0.43.1 (2026-09-15) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-43-1-2026-09-15)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-2)
* Add native clipboard support on Linux X11, so copying from the TUI no longer depends on the terminal's OSC 52 support.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-4)
* Reduce event-loop stalls and GC churn in sessions with many concurrent subagents.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-4)
* Fix pressing Ctrl+C while subagents are running exiting the whole CLI instead of just interrupting the subagents.
* Fix progressively slower rendering on each round of large agent swarm runs.
* Fix memory not being released when subagent scopes are disposed.
* Fix tower mode mistaking newly spawned agents for previous sessions' roster entries.
* Stop returning deleted sessions from global search before the search index catches up.
* Fix link colors in wrapped markdown tables and `@` file-completion ordering.
0.43.0 (2026-09-14) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-43-0-2026-09-14)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-3)
* web: AI session titles are now always on — a title is generated after the first turn and can be regenerated from the rename field, with no experimental flag required.
* Delete sessions from the session picker: press Ctrl+X on a session, then y to confirm.
* Add `-y, --yes` to `kimi upgrade` (alias `kimi update`) to skip the confirmation prompt and install the update directly.
* Add the `loop_control.compaction_max_attempts` config option to set the maximum total attempts for a failing compaction request (default 5). See [`loop_control`](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/config-files.html#loop-control)
for details.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-5)
* Skip the confirmation prompt for rm -rf commands that target only /tmp or /temp paths.
* Allow steering messages to interrupt waits for background tasks.
* Goal time budgets no longer count time spent with the session closed, and the 24-hour limit is removed.
* Add the `KIMI_CODE_PERMISSION_MODE_REMINDER` environment variable: set it to `0` to stop injecting the auto permission-mode reminders into the model context.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-5)
* Fix several known issues and make various refinements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
0.42.0 (2026-09-09) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-42-0-2026-09-09)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-4)
* Remote Control is now always on; the experimental `KIMI_CODE_EXPERIMENTAL_REMOTE_CONTROL` flag has been removed. See [Remote Control](https://moonshotai.github.io/kimi-code/guides/remote-control.html)
for details.
* web: Support permanently deleting sessions from the session row context menu, with a confirmation prompt.
* Add read-only tools to the `/btw` side agent.
* web: Preview images and videos in a reorderable media rail in the composer, mention them in the text on demand, and keep the previews after queueing and sending.
* Accept HEIC, HEIF, and BMP images in prompt attachments and `ReadMediaFile` when the model is served by Kimi.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-6)
* Collapse finished tool calls in the transcript to a header plus one marked outcome row: short output is shown whole, hidden output is counted (`N more lines`, `+N more`) and revealed by `Ctrl-O`, which the footer advertises while it is available.
* Upgrade the default thinking effort to the recommended level for eligible users.
* The subagent model pool (`[secondary_model]`) is now always on; the experimental secondary-model flag and the `KIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL` opt-out have been removed.
* Add configurable character limits and resumable long-line file reads without repeated output truncation; see [`read`](https://moonshotai.github.io/kimi-code/configuration/config-files.html#read)
for details.
* The minidb session-index read model and global search worker are now always on; the experimental flags have been replaced by the `[database]` config section and the `KIMI_CODE_PERSISTENCE_MINIDB_READMODEL` / `KIMI_CODE_SEARCH_WORKER` env vars; see [`database`](https://moonshotai.github.io/kimi-code/configuration/config-files.html#database)
for details.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-6)
* Fix several known issues and make various refinements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
0.41.0 (2026-09-04) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-41-0-2026-09-04)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-5)
* web: Add tower multi-agent collaboration mode (experimental), enabled via the `/tower` command or the composer plus menu; `/tower` supports specifying a base branch (e.g. `/tower add-new-feature`).
* web: Add selection annotation — select text in messages, file previews, the diff and per-turn changes panels, or the terminal to add a comment or quote it into the chat.
* CLI: Add a session rating prompt that invites you to rate the session at appropriate times above the input box.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-7)
* Auto permission mode no longer blocks dangerous commands and commands that cannot be statically analyzed.
* Remind the model of its context budget before automatic compaction, and after compaction point it at the session's event log for exact details.
* web: Rename the three permission modes to Always Ask / Ask When Needed / Never Ask and update their descriptions; switching to Ask When Needed or Never Ask permission mode now warns that files may be modified or deleted directly in that mode.
* web: Esc no longer closes the right detail panel.
* web: Restyle Bash commands in the right-side panel in terminal style.
* Deliver background question answers to the agent directly instead of via a saved output file.
* Subagent final messages under 200 characters are no longer bounced back for expansion.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-7)
* Fix print mode (`kimi -p`) losing session records when the run exits on an error or a termination signal.
* Fix print mode (`kimi -p`) ignoring the `KIMI_DISABLE_TELEMETRY` environment variable.
* Tower mode (experimental): fix tower mode never starting when enabled through `[experimental] tower = true` in config.toml instead of the environment variable, and make `/tower` work in directories that are not git repositories; enablement errors now name the actual blocker.
* Fix background questions being cancelled as soon as the agent finishes its turn.
* Fix resuming a subagent by its agent id after the session is reopened in a new process; the resumed subagent follows the current permission mode and is matched by its own profile in permission rules.
* web: Fix per-turn file change previews showing added/removed lines that never existed and inaccurate line counts when the same file is edited multiple times in one turn; change cards now show only exact line statistics.
* web: Fix the default thinking effort in settings not being settable to the highest level (Max).
* Fix several known issues and make various refinements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
0.40.1 (2026-09-02) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-40-1-2026-09-02)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-8)
* Fix the condition for showing the kimi-cli migration prompt.
0.40.0 (2026-09-02) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-40-0-2026-09-02)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-6)
* web: Add a Plugins panel to Settings for browsing the plugin marketplace and installing, enabling, disabling, and removing plugins.
* web: Support activating multiple skills from a single message.
* Add the `kimi session list` command to list sessions from the command line.
* Tower mode (experimental, `KIMI_CODE_EXPERIMENTAL_TOWER=1`): the agent no longer enters tower mode on its own — turn it on with `/tower on` or `/tower `.
* The subagent model setting (`[secondary_model]`) graduates from experimental to stable.
* Block dangerous shell commands such as shutdown, reboot, or rm -rf in Auto mode, and always ask before running them in Manual and YOLO modes; disable the guard with `[permission] dangerous_command_guard = false` or `KIMI_CODE_DANGEROUS_COMMAND_GUARD=false`.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-8)
* Preserve comments, key order, and formatting in config.toml when configuration values are updated.
* Remove the workspace restriction on the Bash tool's cwd parameter.
* Default the workspace trust prompt selection to "Trust this folder" instead of "Don't trust".
* The `kimi acp` subcommand no longer honors `KIMI_CODE_LEGACY_FLAG`; it always runs on the default agent engine.
* web: Add a code wrap toggle to the diff panel and streamline its header.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-9)
* Honor explicit `[experimental]` config entries over the `KIMI_CODE_EXPERIMENTAL_FLAG` master switch, so a flag set to `false` in config.toml stays off; per-feature `KIMI_CODE_EXPERIMENTAL_` variables still override both.
* Fix several known issues and make various refinements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
0.39.1 (2026-08-28) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-39-1-2026-08-28)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-10)
* web: Fix switching the permission mode in one session changing it for every session; the permission mode is now scoped per session.
* web: Fix signed-in users without a usable model being wrongly asked to sign in (and getting stuck there on web); the send gate now offers picking or configuring a model instead.
* web: Fix the first IME (or keyboard) character being silently swallowed after clicking the composer placeholder.
* web: Fix attachments in a newly created session still showing as uploading after the upload has finished.
* Fix several known issues and make various refinements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
0.39.0 (2026-08-27) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-39-0-2026-08-27)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-7)
* Add Remote Control as an experimental feature for accessing a local web session remotely. Enable it with `KIMI_CODE_EXPERIMENTAL_REMOTE_CONTROL=1`, then run `kimi rc`, `kimi web --remote-control`, or `/remote-control` to start it.
* Add experimental tower mode for multi-agent orchestration; set `KIMI_CODE_EXPERIMENTAL_TOWER=1`, then run `/tower on` and `/tower ` to start.
* Add an optional `fork` parameter to subagent and swarm tools that starts the subagent with a snapshot of the calling agent's conversation history; set `KIMI_CODE_EXPERIMENTAL_SUBAGENT_FORK=1` or `subagent_fork = true` under `[experimental]` in config.toml to enable it.
* web: Allow moving a running foreground Bash command or subagent to the background via the "Move to background" button on the running card.
* web: Add a flat/by-workspace tab to the mobile session list.
* Add the Tencent CloudBase plugin to the curated marketplace.
* Add a dedicated `[swarm] timeout_ms` config option (or the `KIMI_CODE_SWARM_TIMEOUT_MS` env var) for AgentSwarm subagent timeouts, which no longer follow `[subagent] timeout_ms`.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-9)
* web: Revamp the right sidebar as a multi-tab panel.
* web: Improve composer interaction, including the presentation of file, folder, and media attachments.
* web: Improve mobile UI styling.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-11)
* Fix file tools and shell working directories failing to resolve Git Bash paths such as /c/Users or /tmp on Windows.
* Fix several known issues and make various refinements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
0.38.0 (2026-08-20) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-38-0-2026-08-20)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-8)
* Support two OAuth login methods — kimi.ai and kimi.com.
* Add the WaitFor tool: the agent can now wait for a background task to finish within the current turn instead of ending the turn and being re-invoked.
* Add 13 data sources to the official Kimi Datasource plugin — Chinese government data (NDA/NBS) and standards (GB/HB/DB/TT), eight international organization datasets (WHO, FAO, UNSD, ECB, Eurostat, UNICEF, OECD, FRED), Xinhua Finance, and Caixin. Update the plugin from the Official tab in /plugins.
* web: Add a Pin action to the chat header more-menu.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-10)
* Edit and Write now require reading an existing file before modifying it.
* Collapse long `!` shell command output instead of flooding the transcript. Press ctrl+o to expand or collapse it together with tool output.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-12)
* Fix config.toml entries being lost when the file had a syntax error or was edited outside the app.
* Fix several known issues and make various refinements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
0.37.2 (2026-08-19) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-37-2-2026-08-19)
-----------------------------------------------------------------------------------------------------------
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-11)
* web: Settings gains a Lab tab with a new multi-tab sidebar toggle; when enabled, the sidebar shows the Open / Done / Workspaces tabs.
* Make several refinements and internal improvements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
0.37.1 (2026-08-18) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-37-1-2026-08-18)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-13)
* Fix pasted images and videos failing to reach the model.
0.37.0 (2026-08-18) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-37-0-2026-08-18)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-9)
* Activate multiple skills in a single prompt. Type `/` after whitespace to insert a skill token.
* The Windows native (single-binary) CLI now supports automatic updates.
* web: The sidebar gains Open / Done / Workspaces tabs, and sessions can be marked as done.
* web: Add a session management page.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-12)
* Queue slash skill commands entered while the agent is busy instead of rejecting them.
* web: @-mentioned files, folders, and skills in chat messages now render as icon pills.
* web: The browser tab title now shows the current workspace directory name.
* web: The search dialog now finds workspaces too, and picking a workspace or session result expands the sidebar and scrolls the item into view.
* web: Renamed the Subagent panel to "Background Agent".
* Warn when a typed `/goal` objective exceeds the 4000-character limit, and keep the input if it is rejected.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-14)
* Fix Gemini tool-calling sessions failing on follow-up requests.
* web: Fix Ctrl+K in the composer opening session search on macOS — session search now only answers to Cmd+K.
* web: Fix the Background Agent panel showing incorrect task counts and statuses.
* web: Fix pasting a copied folder into the composer failing the upload with a connection error — folders are now skipped instead.
* Fix several known issues and make various refinements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
0.36.1 (2026-08-14) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-36-1-2026-08-14)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-10)
* web: Generate session titles with AI (experimental). Off by default — set `KIMI_CODE_EXPERIMENTAL_AUTO_SESSION_TITLE=1` (or the master flag `KIMI_CODE_EXPERIMENTAL_FLAG=1`) to turn it on.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-13)
* web: Polish the Plan, Goal, and Swarm toggles in the composer, which now live in the + menu next to the input box.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-15)
* Fix several known issues and make various refinements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
0.36.0 (2026-08-13) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-36-0-2026-08-13)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-11)
* Upgrade the experimental subagent model setting to a model pool: the `[secondary_model]` section can now hold a set of candidate models with descriptions, and the main agent picks from them per spawn based on the task.
Set `KIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL=1` (or the master flag `KIMI_CODE_EXPERIMENTAL_FLAG=1`) before starting Kimi to enable it.
Recommended setups:
* Minimal: run `/secondary-model` in the TUI, or write a single `default_model` line in `config.toml`, to make every subagent run the same model by default; add `force = true` to pin that choice so the main agent cannot override it.
* Declare a named pool with a one-line scenario description for each alias — the descriptions are what the main agent sees when choosing:
toml
[secondary_model]
default_model = "kimi-code/kimi-for-coding-highspeed"
[secondary_model.models]
"kimi-code/kimi-for-coding-highspeed" = "Fast and cheap — good for daily refactoring, code explanation, and small edits."
"kimi-code/k3" = "Strong at complex reasoning and deep debugging — pick it for hard problems."
See the [subagent model pool docs](https://moonshotai.github.io/kimi-code/en/configuration/config-files.html#subagent-model-pool)
for details.
* Add an experimental fullscreen TUI mode. Set the `KIMI_CODE_TUI_FULL_SCREEN=1` environment variable to enable it.
* Support rendering LaTeX math formulas (`$…$` / `$$…$$`) in TUI messages as Unicode formulas.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-16)
* Show project MCP launch targets in the workspace trust prompt, default to declining trust, and resolve `fd` and `stty` binaries to absolute paths so untrusted workspaces cannot plant bare-name executables before confirmation.
* Fix sessions failing with a provider 400 error on every follow-up request after a turn is interrupted while the model is still thinking, on strict OpenAI-compatible providers (e.g. DeepSeek).
* Fix Ctrl+C being ignored during automatic retries of failed API requests.
* Fix several known issues and make various refinements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
0.35.0 (2026-08-12) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-35-0-2026-08-12)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-12)
* Add the Modern Web Guidance plugin to the bundled plugin marketplace. Run `/plugins` and select Modern Web Guidance to install it.
* Show the live work progress of background subagents in the `/tasks` panel.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-17)
* Fix coder subagents spawning further subagents by default.
* Fix the token counts reported after compaction reading far below the real context size; they now match the numbers shown while the session runs.
* Fix two binary-planting risks on Windows.
* Fix several known issues and make various refinements. See the [changelog on GitHub](https://github.com/MoonshotAI/kimi-code/blob/main/apps/kimi-code/CHANGELOG.md)
for more technical entries.
0.34.0 (2026-08-06) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-34-0-2026-08-06)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-13)
* web: Add a flat view to the sidebar session list.
* The Kimi Computer Use plugin now supports Windows x64 — install it from `/plugins`.
* Show a cache-expiry reminder when resuming or sending after a long idle. Set [`cache_expiry_hint`](https://moonshotai.github.io/kimi-code/en/configuration/config-files.html#tui-toml)
to `false` to disable it.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-14)
* web: Subagent tasks show their model and thinking level.
* web: Show a failure card with one-click resume when a model request fails.
* web: Show retry progress (attempt N of M) in the working status during automatic retries.
* Show browser extension links and activation steps after installing Kimi WebBridge.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-18)
* Fix UTF-16 LE/BE text files (with or without a BOM) failing to load.
* web: Fix attachments being dropped when sent with a skill command.
* web: Fix the model picker overflowing the screen when many models are available.
* web: Fix a file path with spaces opening the Documents folder instead of the file on Windows.
* web: Fix the thinking level resetting to the model default when a new session starts with a skill command.
* web: Fix manually cancelled sessions showing an error marker in the sidebar; it now appears only when the last turn failed.
* web: Fix IME composition while renaming a session — Enter and Esc no longer act mid-composition.
* web: Fix dragging to select text while renaming moving the whole list item.
* web: Fix the background-tasks and todos pills jumping to the top when the plan approval dialog expands.
* web: Fix the chevron direction on the "show less" button of the changed-files summary card.
* Fix `kimi -p` exiting before background tasks and subagents finish.
* `/feedback` now works for signed-in users on any model; signed-out users see the sign-up page and GitHub Issues links.
* Fix removing an MCP server breaking open sessions: its tools stay visible but calls fail with a removal notice.
* Fix the last turn's outcome being lost across server restarts — failed turns now stay flagged in session lists and resumed sessions.
* Fix resumed sessions showing background-task completion as raw protocol text instead of a status card.
0.33.0 (2026-08-05) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-33-0-2026-08-05)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-14)
* Add Kimi Computer Use and Kimi WebBridge as built-in official marketplace entries in the v2 CLI. Installing from `/plugins` sets up the latest managed runtime and plugin together, reports incomplete manual steps, and supports retrying interrupted setup.
* web: Add and manage custom providers in settings.
* web: Pin sessions to the top of the sidebar.
* web: Set an emoji for the session title.
* web: Show the signed-in account and plan usage.
* Add /bug as an alias for the /feedback slash command. Type /bug to submit feedback.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-15)
* Ask whether to trust the current folder on startup.
* `/fork` no longer switches to the forked session: the current session stays active and its background tasks keep running. Find the fork in `/sessions`.
* web: Overhaul the UI/UX and fix known issues.
* Start the interactive TUI without creating a session.
* Rename the partner plugin marketplace tab to Curated and clarify that it contains third-party plugins from Kimi partners.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-19)
* Fix all tool calls failing with spawn EBADF on macOS when a skill folder contains a very large file tree.
* Fix MCP OAuth re-authorization always failing with "Invalid redirect URI"; the stale client registration is now dropped and re-created with the current callback URI.
* Ensure the first request waits for MCP startup to finish while the interface still opens immediately.
* MCP tool results now surface the spec-defined `structuredContent` field and `_meta` server metadata to the model instead of silently dropping them, so servers that return their machine-readable contract in these fields work the same as on other MCP hosts.
* Fix built-in capability availability and installed status in `/plugins`, preserve legacy WebBridge skills as backups during updates, and prevent Computer Use updates from duplicating or disconnecting MCP servers.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors)
* Run the CLI surfaces (interactive TUI, `kimi -p`, `kimi acp`, `kimi export`, `kimi provider`) on the agent-core-v2 engine by default. Set `KIMI_CODE_LEGACY_FLAG=1` to fall back to the legacy engine.
0.32.0 (2026-08-04) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-32-0-2026-08-04)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-15)
* Add four hook events: `TurnStarted`, `UserPromptQueued`, `TaskStarted`, and `SessionHeartbeat`. Configure them under `[[hooks]]` in `config.toml` — see [Hooks](https://moonshotai.github.io/kimi-code/en/customization/hooks.html)
for details.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-16)
* Rename two `[loop_control]` keys: `max_retries_per_step` → `max_attempts_per_step` and `max_steps_per_run` → `max_steps_per_turn`; the old keys stop working with a rename warning at startup — see [loop\_control](https://moonshotai.github.io/kimi-code/en/configuration/config-files.html#loop-control)
.
* Add a `[token_counting]` config section: when a provider doesn't report token usage, switch the context-size display to local estimates — see [token\_counting](https://moonshotai.github.io/kimi-code/en/configuration/config-files.html#token-counting)
.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-20)
* Fix answers to interactive question prompts being rejected when the model provider returns tool call IDs containing colons (some OpenAI-compatible gateways).
* Fix automatic context compaction getting stuck retrying an oversized request until it fails.
* Fall back to the built-in models.dev catalog snapshot when the public catalog is unreachable, so importing a known provider still works offline or in blocked networks.
* Fix the context window limit showing as 0 when no model is configured; it now falls back to the default model.
* web: Fix dark-mode monochrome controls and align the chat composer corner radius with the design system.
* Fix the `/login` already-logged-in confirmation being hard to read; it now uses the success color.
0.31.1 (2026-07-31) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-31-1-2026-07-31)
-----------------------------------------------------------------------------------------------------------
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-17)
* Reduce frequent full-screen redraws in the TUI.
* Preserve the assistant's partial output when a turn is interrupted with Esc, and remind the model that the previous turn was deliberately interrupted.
* web: Order permission modes from safest to most permissive across settings surfaces, and fix the swapped yolo/auto risk colors in the status panel and mobile settings.
* web: Enable Monaco-based highlighting for code blocks, and fix line numbers overlapping or drifting out of alignment in fallback-rendered code blocks.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-21)
* Fix sporadic "model is not configured" errors when starting kimi web, caused by the background provider-model refresh transiently clearing the model catalog while the first session was being created.
* web: Fix new sessions showing the thinking level (e.g. Max) while the first message actually ran with thinking off.
* web: Make the @ file mention work in a new-session draft, before the first prompt creates the session.
* web: Fix chat code blocks rendering in the proportional UI font at the wrong size after the markdown renderer upgrade, and align the loading fallback with the highlighted block.
0.31.0 (2026-07-30) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-31-0-2026-07-30)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-16)
* Support Markdown-defined custom agents on agent-core.
* Add the /secondary\_model slash command to configure the secondary model used by subagents (experimental; enable it in /experiments first).
* Plugins can contribute custom agents, discovered automatically and available for sub-agent delegation.
* Plugins can contribute system prompt instructions through `systemPrompt` or `systemPromptPath` in `kimi.plugin.json`.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-22)
* Remove the blocking `block`/`timeout` wait from the TaskOutput tool so checking a background task can no longer stall the conversation; it now always returns an immediate snapshot, and completion still arrives via automatic notification.
* Fix sessions missing from the session picker when their cached metadata predates the archived flag.
* Fix request headers not being passed correctly on some requests.
0.30.0 (2026-07-29) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-30-0-2026-07-29)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-17)
* Add a customizable footer status line, configured via `[status_line]` in `tui.toml`.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-18)
* Show a quota note after installing official plugins that bill against plan quota (such as Kimi Datasource).
* Show a notice when an official plugin used in the session has an update available — run /plugins to update.
* Remove the 50 MB size limit on file uploads to the built-in server.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-23)
* Fail fast when account quota or balance is exhausted instead of silently retrying for ~3 minutes.
* Stop the turn after repeated invalid tool calls instead of retrying indefinitely.
* web: Fix garbled line numbers in code blocks.
0.29.2 (2026-07-27) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-29-2-2026-07-27)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-24)
* Fix goal pursuit pausing when a goal turn hits the per-turn step limit (`loop_control.max_steps_per_turn`).
* Fix messages sent during goal pursuit being rejected.
* Fix /undo to restore conversation history, todo lists, plan mode, and task notifications consistently.
* web: Fix copying selected chat text over plain HTTP overwriting the clipboard with an event placeholder.
0.29.1 (2026-07-24) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-29-1-2026-07-24)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-18)
* Add global default MCP server timeouts in `config.toml` and env vars.
* Add environment variables to configure the web search and web fetch services without OAuth login.
* Add experimental secondary-model bindings for newly spawned subagents, including per-agent model preferences and subagent-only model overrides.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-25)
* Fix loss of thinking content with OpenAI-compatible endpoints that return reasoning under a different field name (e.g. newer vLLM).
0.29.0 (2026-07-22) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-29-0-2026-07-22)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-19)
* web: Support defining agents in Markdown files, declaring system prompt, name, description, and tool permissions. [Details](https://moonshotai.github.io/kimi-code/en/customization/agents.html#agent-file-format)
* web: Permanently override the main agent's system prompt with SYSTEM.md. [Details](https://moonshotai.github.io/kimi-code/en/customization/agents.html#overriding-the-main-agent-s-system-prompt-with-system-md)
* web: Globally enable or disable tools across all sessions via config.toml. [Details](https://moonshotai.github.io/kimi-code/en/configuration/config-files.html#tools)
* Videos attached to a prompt now reach the model together with the prompt, with no extra tool round trip.
* Support selecting a thinking effort level from ACP clients.
* Add environment variable overrides for agent loop and background task limits.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-19)
* Import many more providers from the models.dev catalog.
* Improve TUI performance and resume speed for long-running sessions.
* Reconnect a dropped MCP server connection automatically when one of its tools is called, and retry the call once.
* Remove red coloring from syntax highlighting in code previews and markdown code blocks.
* Add a reminder for third-party install sources to use the official installer in the update prompt.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-26)
* Fix sessions getting stuck with a provider "message must not be empty" error after a content-filtered response.
* Fix cancelled model requests being wrapped as retryable provider errors.
* Fix thinking levels being offered for models that do not support them.
* Fix config environment overrides being persisted into config.toml while the env var is set.
* Send the session prompt cache key to OpenAI and OpenAI Responses providers.
* Fix ReadMediaFile failing on videos when the provider has no file upload channel.
* Fix goal mode continuation prompts leaking into the transcript when resuming a session.
* web: Show transparent images over a checkerboard canvas.
* Remove references to the non-existent `kimi resume` command from the scheduled-task tool descriptions.
0.28.1 (2026-07-20) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-28-1-2026-07-20)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-20)
* Allow ACP sessions to start with configured non-OAuth model credentials instead of requiring terminal login.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-20)
* Run web servers foreground-only end to end: the /web slash command now always starts a new server, and the `kimi web kill` / `kimi web ps` subcommands are removed — foreground servers stop with Ctrl+C. `kimi server kill` remains as a deprecated fallback that only stops servers started by a version before 0.28.0.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-27)
* Fix running subagents not observing permission mode switches made after they started.
0.28.0 (2026-07-20) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-28-0-2026-07-20)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-21)
* **Breaking:**
* The `kimi server` command tree is deprecated; use `kimi web` instead.
* `kimi web` now runs in the foreground of the current terminal and opens the browser; stop it with Ctrl+C.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-21)
* Thinking effort persists only levels below the model's top tier (max).
* web: Add a note in the model switcher that switching models or thinking effort invalidates the existing prompt cache.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-28)
* Correct the YOLO and Auto permission mode descriptions: YOLO auto-approves tool actions but the agent may still ask questions, while Auto is fully autonomous and never asks.
* Fix the web backend ignoring symbolic links when loading AGENTS.md files and reading files.
0.27.0 (2026-07-17) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-27-0-2026-07-17)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-22)
* Add the /copy slash command to copy the last assistant message to the clipboard.
* Using an API key for Kimi coding models now also fetches the latest model list automatically.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-22)
* OAuth connection errors now include the underlying network cause (DNS, refused connection, TLS, or timeout) instead of a bare "fetch failed".
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-29)
* Fix repeated request rejections after an interrupted model response.
* Fix the built-in URL fetch tool's network safeguards: crafted domains and redirect chains can no longer reach loopback or internal network services.
* web: Fix LaTeX formulas rendering as garbled overlapping text when the web UI is accessed over the network.
* web: Fix queued messages silently re-sending previously uploaded files when a session is reopened.
* web: Remember the thinking level per model, fixing an empty, unresponsive thinking picker when the model doesn't support the stored level.
* web: Fix duplicate workspace groups on Windows when the same folder is opened with different path spellings; its sessions now list under one merged group.
* Fix AGENTS.md files installed as symbolic links being ignored by the web backend.
* Fix Esc and Ctrl+C cancelling compaction instead of closing an open /btw panel.
* Fix whitespace-only thinking content rendering as a blank line in the transcript.
* Fix `/export-debug-zip` and `kimi export` overwriting the previous ZIP on repeated runs for the same session; the default filename now includes a timestamp.
0.26.0 (2026-07-16) Say hi to the BIIIG DAY! [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-26-0-2026-07-16-say-hi-to-the-biiig-day)
------------------------------------------------------------------------------------------------------------------------------------------------------------
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-23)
* Expand the coder subagent tool set to include background tasks, todo lists, plan mode, skill invocation, and nested agents, mirroring the main agent's capabilities.
* Warn in the `/model` and `/effort` pickers that switching invalidates the existing prompt cache, and hint to use `/new` to avoid extra token costs.
* web: Refresh the model catalog for all providers when opening the model picker, so newly available models always show up.
* Optimize the unit formatting of the context usage display.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-30)
* Fix a resumed session being marked as just updated and jumping to the top of the session list without any new activity.
* Fix the context size indicator under-reporting the model's actual context usage.
* Fix Kimi-provider models routed through the Anthropic protocol incorrectly showing reasoning effort options.
* Honor an explicit thinking "off" on OpenAI-compatible (chat completions) providers.
* Report when users stop tasks and preserve other stop reasons in model context.
* Fix a race where resuming a background subagent right after it was manually stopped could fail with an "already running" error.
* Replay empty thinking content verbatim instead of substituting a placeholder space on Anthropic-compatible and Kimi preserved-thinking endpoints.
* Keep legacy migrations idempotent across multiple Kimi homes and report damaged or unmapped sessions instead of silently skipping them.
* web: Fix the sidebar resize handle being covered by the chat composer background.
0.25.0 (2026-07-16) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-25-0-2026-07-16)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-23)
* web: Attach any file type in chat — files can be dropped anywhere in the window, and sent files, images, and videos show as chips in the message bubble.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-24)
* web: Show full diagnostics for model request failures.
* Apply official Anthropic effort profiles and a 128k output fallback for unknown models.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-31)
* Fix the web server bearer-token check being bypassed by percent-encoded API paths, which allowed unauthenticated access to every API route.
* Fix the session filesystem API following symlinks that point outside the workspace, which allowed accessing host files beyond the session directory.
* web: Keep session activity indicators in sync with agent work and prevent duplicate streamed content after session activation races or LLM retries.
* Fix custom-named models on Anthropic-compatible providers starting new sessions with thinking effort off and not showing the thinking control in ACP clients.
* Honor adaptive\_thinking = false on Anthropic-compatible models by omitting the effort parameter from requests.
* web: Fix the Content-Security-Policy on non-loopback server binds blocking the web UI's theme bootstrap script and bundled fonts.
* Fix sessions failing to be created when the workspace directory is given through a symlink.
* Fix the CLI exiting unexpectedly when reading an image from the clipboard fails; it now falls back to pasting text.
* web: Fix completed background subagents losing their final output after a session reload.
* web: Fix Enter not confirming modal confirmation dialogs in dev builds.
* web: Fix a background subagent showing up as two identical rows in the agents dock panel during streaming.
* Fix the diagnostic log missing the actual error when the CLI exits unexpectedly.
0.24.2 (2026-07-15) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-24-2-2026-07-15)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-24)
* Add a builtin `/check-kimi-code-docs` skill that automatically answers Kimi Code product questions with official-docs sources.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-25)
* Align `kimi -p` behavior across engines: `print_background_mode` and `print_max_turns` now apply, and `/goal` runs stay alive until the goal finishes.
* `kimi -p` now stays alive by default while background tasks are pending, with no effective wait or turn limit, and feeds each completion back to the agent. Set `print_background_mode = "exit"` or `"drain"` to restore the old exit-after-one-turn behavior.
* `kimi -p` background tasks and subagents no longer time out by default (interactive mode is unchanged); restore limits with `[background] bash_task_timeout_s` or `[subagent] timeout_ms`.
* Subagent timeout now defaults to 2 hours everywhere; override with `[subagent] timeout_ms` or `KIMI_SUBAGENT_TIMEOUT_MS`.
* The per-step LLM retry limit is raised from 3 to 10 attempts, so transient provider failures (429 / overload) are retried before a turn fails; tune with `loop_control.max_retries_per_step`.
* Workspaces now stay in sync: new sessions register automatically, missing workspaces are restored at startup, and removed ones stay removed.
* `kimi web` now logs failed requests and key operations so daemon issues are easier to diagnose.
* web: AgentSwarm cards now stay expanded while subagents are still running.
* web: Minimized plan review and question cards now use an upward chevron for expand.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-32)
* web: Fix mobile layout on iOS, including the composer, safe areas, and toasts.
* Fix new sessions not opening in older CLI versions.
* Fix completion notifications firing early when a subagent finished while the main turn was still running.
* Fix the web UI showing the wrong CLI version.
* Fix Gemini tool call IDs colliding across turns and merging swarm runs into one card.
* web: Show server error details when actions like stopping or archiving a session fail.
* web: Fix long responses stalling after the tab was backgrounded.
* web: Fix code block copy buttons over plain HTTP.
* web: Keep loaded sessions visible when the session list fails to reload.
* web: Restore the AgentSwarm member list after a page refresh.
* web: Fix session titles not generating when the first message is a slash command.
* web: Show each message's actual send time after reloading a session.
* Fix several goal-mode issues around budgets and turn limits, pausing and resuming, crash recovery, final status messages, and invalid persisted goal records.
* Fix replaced goals being able to affect the new goal's budget, and reject subagent goals consistently.
* Correct the guidance shown when a goal cannot be paused or resumed.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-1)
* Rename the dynamic tool loading capability from `select_tools` to `dynamically_loaded_tools`; behavior is unchanged.
0.24.1 (2026-07-14) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-24-1-2026-07-14)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-33)
* Fix Kimi sessions getting stuck when preserved-thinking history contains an empty reasoning step.
* Fix built-in tools being unavailable when the model provider becomes ready after the session starts.
* Fix Thinking effort routing: non-Kimi providers now preserve configured values, while Kimi models validate runtime selections and fall back safely during model resolution.
* web: Align thinking-level handling with the CLI: submit the selected level verbatim instead of silently downgrading it, fall back to the model's own default when nothing was chosen or the model switches, and persist explicit picks as the default for new sessions.
* Preserve goal completion summaries and show untyped LLM errors without an internal error-code prefix in step interruption events.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-26)
* web: Show just the level name (e.g. Max) in the model pill instead of "thinking: max".
0.24.0 (2026-07-14) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-24-0-2026-07-14)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-25)
* web: Add session export: run `/export` or pick Export session from a session's more menu to download the session and troubleshooting logs as a ZIP (limited to 64 MiB).
* Move foreground Bash commands that hit their timeout to the background instead of killing them, so long-running commands survive the timeout and report back on completion. Set `bash_auto_background_on_timeout = false` under `[background]` in config.toml to restore the kill-on-timeout behavior.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-27)
* web: Refine goal mode controls with animated strip interactions, budget-aware progress, and design-system cancellation confirmation.
* On session close, background tasks are now asked to stop and given a grace period before being force-stopped.
* Rewrite repeated-tool-call reminders to redirect the agent toward a different action instead of prohibiting the call.
* Optimize the TaskOutput tool prompts to discourage blocking waits on background tasks.
* Send the kimi-code-cli User-Agent on provider registry (api.json) and model catalog fetches, so registries can identify the client version.
* Log a warning when a skill fails to parse instead of silently dropping it, and fix skill scan results not being reported.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-34)
* Prevent oversized image reads from poisoning sessions; sessions that already failed with request-too-large errors now recover automatically.
* Fix session fork losing everything except the conversation log: forked sessions now carry over media attachments, plan files, background task output, and cron tasks, and a failed fork no longer leaves a broken copy behind.
* web: Fix several session rendering glitches when reopening, reconnecting, or resyncing a session, including the context usage indicator dropping to 0, duplicate user message bubbles, and duplicated text in multi-step turns.
* web: Fix uploaded images failing to display when connecting to the server over a non-localhost address.
* web: Continue blocked goals after the user resumes them from the goal controls.
* web: Fix the AgentSwarm member list disappearing after a page refresh while subagents are still running.
* web: Fix the goal card disappearing after a page refresh while a session goal is active.
* web: Fix the workspace picker menu sizing too narrowly for its content.
* web: Recover transient subagent rate limits without surfacing them as session errors.
* Fix Bash auto-detection on Windows failing when git comes from a native MSYS2 toolchain (ucrt64/clang64/clangarm64).
* Fix OAuth login hanging after browser authorization when the provider configuration changes during sign-in.
* Show the provider's actual rejection message instead of a misleading re-login prompt when an OAuth-managed model keeps returning 401 after a token refresh.
* Fix providers without a configured `base_url` being rejected: anthropic/openai and other protocol providers now fall back to their official default endpoints again.
* Fix MCP tools being unavailable on the first turn after session startup.
* Fix pasted media and images being dropped from `/skill` and plugin command arguments, and when steering with `Ctrl-S`.
* Fix empty reasoning blocks being dropped across providers, which broke multi-step tool calls.
* In auto permission mode, plan exits are now marked as auto-approved instead of user-reviewed, so the agent no longer mistakes the approval for a user signal to start executing.
* Fix background tasks being lost or wrongly marked as lost when resuming sessions.
* Fix server shutdown sometimes leaving a stale instance file behind.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-2)
* `kimi web` now runs on the reworked agent engine by default.
0.23.6 (2026-07-12) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-23-6-2026-07-12)
-----------------------------------------------------------------------------------------------------------
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-28)
* web: Let wide Markdown tables grow beyond the reading column up to 1040px, scrolling horizontally inside the table when wider.
* web: Keep the server access token for up to 7 days across tab close and browser restarts, instead of asking for it again with every new tab.
* web: Add workspaces by typing an absolute path directly in the workspace picker's search box, with live validation and completion suggestions.
* web: Auto-enable the default thinking effort when switching to a model that supports effort levels in the web UI.
* Recognize the `support_efforts` and `default_effort` fields when importing a custom registry, so thinking effort levels are available for those models.
* Update the WebBridge install page link opened from the `/plugins` panel.
* Add a `subagent.timeout_ms` config option (or the `KIMI_SUBAGENT_TIMEOUT_MS` env var) to control how long a single subagent may run before timing out; the default is raised from 30 minutes to 2 hours.
* Add a print-mode background policy: set `[background].print_background_mode = "steer"` to keep `kimi -p` alive across background-task completions, so the main agent can be steered into follow-up turns.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-35)
* web: Fix sessions getting stuck in a sending state after a reconnect; turns that finish while the connection is down now stop the spinner and let the next message send normally.
* web: Fix the first visit after starting or updating the web UI bouncing to the login page when the initial auth check fails; the connecting screen now stays up, shows the connection error, and retries.
* Keep `kimi -p` runs alive after a turn ends while a goal is still active or a cron task is pending, so goal continuations and cron fires run their turns instead of being cut off when the main turn finishes.
* Treat a dismissed question prompt as the user choosing not to answer, instead of implicitly selecting the recommended option.
* web: Fix ReadMediaFile results rendering as plain tool cards instead of images after resuming or reloading a session.
* web: Fix the chat view jumping downward while scrolling through conversation history.
* web: Fix the model dropdown showing checkmarks on same-named models from other providers; the current model is now matched by its unique model id.
* web: Fix sidebar lag with many sessions by removing repeated session list scans during rendering.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-3)
* Rename the dynamic tool loading model capability from `select_tools` to `dynamically_loaded_tools`.
0.23.5 (2026-07-10) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-23-5-2026-07-10)
-----------------------------------------------------------------------------------------------------------
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-29)
* Retry provider 429, overload, and other transient errors more reliably, honoring the server Retry-After delay, and surface retries in `-p --output-format stream-json`.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-36)
* Stop unsupported image formats (AVIF, BMP, TIFF, ICO, …) from breaking sessions at every entry point — including remote image URLs and images mislabeled by a tool — and recover an already-stuck session by dropping the offending image and retrying, so one such image can no longer make every later request fail.
* web: Fix the "Turn finished" desktop notification and completion sound firing twice per turn.
* web: Hide the internal image-compression note so it no longer renders as user message text.
0.23.4 (2026-07-10) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-23-4-2026-07-10)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-26)
* web: Add notifications when a tool needs approval, and improve notification reliability.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-30)
* web: Polish the chat UI with Inter typography, localized labels, and tighter composer and menu styling.
* web: Polish the session sidebar layout, colors, icons, and typography.
* Display the Extra Usage (fuel pack) balance in the `/usage` and `/status` commands.
* Add a Kimi WebBridge entry to the Official tab of the `/plugins` panel that opens the WebBridge install page in your browser.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-37)
* Keep image-heavy sessions within provider request-size limits: oversized images (model-read and pasted, including WebP) are downscaled and compressed, HEIC/HEIF reads are refused with a platform-matched conversion command instead of poisoning the session, and an HTTP 413 request-too-large now recovers automatically — the request and `/compact` retry with older media replaced by text markers. The limits are configurable via `[image]` in `config.toml` (or `KIMI_IMAGE_*` env vars), and each core keeps its own settings so reloading one client's config no longer changes another client's compression.
* Fix resuming sessions whose original working directory no longer exists.
* Fix prompt-mode goals so they run until completion and report invalid goal commands before sending prompts.
* web: Fix an occasional "another turn is active" error when sending the first message of a new conversation, and show a starting state while it is being sent.
0.23.3 (2026-07-08) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-23-3-2026-07-08)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-38)
* Fix a misleading "OAuth login expired" message shown when a model is not available for the current account.
0.23.2 (2026-07-08) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-23-2-2026-07-08)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-27)
* Add the Vercel plugin to the bundled plugin marketplace. Run `/plugins` and select Vercel Plugin to install it.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-39)
* Fix `kimi -p` runs exiting with code 0 when a turn fails.
* Prevent autonomous goals from being paused by model-reported status updates.
* Count the turn that starts an autonomous goal toward its turn budget.
* Raise the image downscale cap from 2000px to 3000px, and fix swapped width/height for EXIF-rotated (portrait) photos in compression captions and media read notes so region readback coordinates map correctly.
* web: Fix the connection error toast lingering after the WebSocket reconnects when returning from the background.
* Fix console windows flashing on Windows each time a hook runs.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-31)
* web: Redesign the scheduled reminder UI.
* web: Show session skills in the slash menu as `/skill:` so they are distinguishable from built-in commands; typing the bare skill name still works.
* web: The composer model switcher switches the active session's model as before and additionally bumps the global default model, so new sessions inherit the choice.
* web: Press Enter to confirm in archive and other confirmation dialogs.
* Tighten goal-mode guidance for blocked and complete status updates.
* Progressive tool disclosure (`select_tools`, experimental): compaction now discards the loaded tool schemas instead of re-injecting them, and the model re-selects the tools it still needs afterward. A from-memory call to a no-longer-loaded tool is rejected with guidance to select it first. No effect unless the `tool-select` experimental flag and a `select_tools`\-capable model are active.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-4)
* web: Compile icons at build time so the bundled web UI only carries the icons it renders.
0.23.1 (2026-07-07) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-23-1-2026-07-07)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-40)
* Fix `kimi -p` abandoning background subagents that start late or run long, so their results reach the main agent.
* web: Recover chat streaming after a stale background-tab WebSocket instead of requiring a page refresh.
* Fix some third-party models (e.g. Opus 4.8) falling back to the family default max output tokens; an unrecognized minor now reuses the nearest earlier known version's limit.
* Honor explicit Anthropic `max_output_size` settings instead of clamping them to built-in ceilings.
* Stop showing tool-produced `` metadata in tool outputs; failed tools now show their own error text.
* Fix goal completion and blocked updates to produce one final user-facing outcome summary from the tool result.
* Fix goal startup and queue handling so failed starts restore permission mode and queued goals wait behind new user messages.
* Fix goal token budgets to count model completion tokens and stop without extra continuation steps when the budget is exhausted.
* Fix goal tools being unavailable to the main agent, and return clear messages for invalid goal-control calls.
* Respect the `--skills-dir` flag in interactive mode.
* web: Fix several slash commands and skills not working on the new-session screen: `/goal ` and slash skill activations (for example `/pre-changelog`) silently did nothing, and `/btw []` opened an empty side chat.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-32)
* Preserve prior turns' thinking by default on the Anthropic provider (Claude and Kimi's Anthropic-compatible mode), matching the Kimi default. Disable with `[thinking] keep = "off"` or `KIMI_MODEL_THINKING_KEEP=off`.
* Clarify the permission mode descriptions shown by `/permission`, `/auto`, and `/yolo`, and reorder `/auto` and `/yolo` in the command list.
* Show long-running goal wall-clock budget reminders in hours.
* Tighten goal-mode guidance so agents continue reasonable work across turns instead of ending goals prematurely.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-5)
* Record a per-request trace in the session wire log, so model requests can be reconstructed for debugging.
0.23.0 (2026-07-06) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-23-0-2026-07-06)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-28)
* web: Add an Archived sessions page in Settings to browse and restore archived sessions. Open Settings → Archived to find it.
* Add experimental on-demand tool loading (`select_tools`) under the `tool-select` flag: a supporting model loads MCP tools only when needed instead of sending all of them in every request, preserving the provider prompt cache. Off by default and only active on models that declare the `select_tools` capability.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-41)
* Fix sessions that exist on disk but were missing from the session list or returned 404 on direct access, by rebuilding the session index at server startup.
* Fix the Bash and Edit tool cards collapsing, jumping, or flickering in height when results stream in or finish with short output, and visually separate the Bash command from its output.
* Fix the input box shifting upward after the slash command menu closes.
* Fix the edit approval preview shown by Ctrl+E to include surrounding context lines, matching the summary panel.
* Fix `@` file completion missing deeply nested files in large projects after adding extra workspace directories.
* web: Fix several web layout and animation glitches: the collapsed sidebar now hides correctly, the chat history no longer replays its entrance animation when opening a session, and tool components no longer jump the conversation when expanded or collapsed.
* web: Fix scheduled-reminder (cron) fires being hidden; they now show as notice cards in the chat.
* web: Fix the end of a reply staying missing after reopening a session.
* web: Fix queued media messages not loading back into the composer and keep attachments when undoing a message.
* web: Keep the composer toolbar from clipping its controls on narrow windows and phones, with the context ring staying visible at every width.
* web: Fix the font size setting so chat text, composer text, and sidebar text follow the selected size.
* web: Fix an almost-invisible composer input caret and a washed-out strikethrough on completed todos.
* web: Show the correct session search shortcut on Windows.
* Fix tool calling with Google Gemini models, including Gemini 3 thinking-signature round-trips across turns.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-33)
* web: Replace the swarm footer with a single inline tool card that shows live subagent progress and the aggregated result, and keep the swarm progress bar stable after refresh.
* Show compaction summaries in the TUI after compaction. Press Ctrl+O to show or hide the summary.
* web: Render AskUserQuestion answers as a readable option list with the chosen option(s) highlighted, instead of raw JSON.
* web: Show available skills in the composer before a session is created.
* web: Add an Archived sessions entry to the mobile settings sheet and clarify the archive confirmation to mention restoring from Settings.
* web: Show the Kimi icon and clearer titles in desktop notifications.
* web: Align the markdown diff code block with the design system: code text keeps the normal ink colour while the sign and a soft row background carry the change, matching the `~/diff` panel.
* web: Prevent chat text from hyphenating at line breaks and render code without font ligatures.
* web: Drop the stray left indent in the tool-call card body so expanded content aligns with the header.
* Feed AskUserQuestion answers back to the model as question text and option labels instead of positional ids, so the model no longer has to map them back. Question texts must now be unique per call and option labels unique per question; existing clients keep answering with option ids, so no client change is required.
* Keep prior reasoning across turns for Kimi models by default when Thinking is on. Set `[thinking] keep = "off"` to disable.
0.22.3 (2026-07-04) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-22-3-2026-07-04)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-42)
* Wait for background subagents to finish and respond to their results before exiting in `kimi -p`, instead of ending the turn early.
* web: Fix uploaded videos failing to play in the web chat.
* Revert the recent TUI transcript rendering changes to the original upstream behavior and fix related rendering issues.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-34)
* Add `--dangerous-bypass-auth` and `--keep-alive` flags to `kimi server run`, so the server can run without a token on trusted networks and stay alive past the idle timeout.
* web: Add click-to-enlarge for images uploaded in the web chat. Click an image in a message to open it.
0.22.2 (2026-07-03) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-22-2-2026-07-03)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-43)
* Fix sessions silently dropping later user messages after a turn was interrupted between a tool call and its result.
* Fix requests being rejected by strict providers when the model emits duplicate tool call ids.
* Fix `kimi upgrade` failing on Windows with a spawn error when installing the new version.
* Fix duplicated transcript content appearing in scrollback during streaming.
* Fix compressed-image prompts leaking an internal `` compression note into the visible message and the session title.
* Keep automatic background updates from flashing a console window on Windows.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-35)
* Have context-compaction notes capture a forward plan for the remaining work — upcoming steps, settled decisions, and foreseeable obstacles — instead of only the immediate next step, so the agent continues more coherently after auto-compaction.
* Enrich PATH from the user's login shell at startup, so shell commands find user-installed tools (e.g. Homebrew's `gh`) even when kimi-code was launched without the full profile PATH.
* Promote the language-matching rule to a dedicated section in the system prompt, so replies and reasoning consistently follow the user's language through long English tool output, while repository artifacts keep project conventions.
* Add a TUI preference to keep rapid multi-line pastes from submitting line by line when bracketed paste is unavailable. Set `disable_paste_burst = true` in `tui.toml` to turn it off.
* Keep subagent cards at a stable height and show a live status spinner with a compact two-row activity window.
* In `kimi -p` runs, wait for background subagents to finish before exiting when `background.keep_alive_on_exit` is enabled. Set `keep_alive_on_exit = true` to let concurrent background subagents complete.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-6)
* Record model response ids in session wire logs to make individual model requests easier to trace.
0.22.1 (2026-07-02) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-22-1-2026-07-02)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-44)
* Fix TUI rendering bugs that caused the screen to go blank and the input box to disappear.
* Fix the TUI crashing when the terminal is resized to a very narrow width while the input contains CJK or emoji text.
* Fix the web UI becoming sluggish after opening many sessions.
* Clear the screen fully when starting a new session via /new, /clear, or a session switch.
* Fix web tooltips that could get stuck on screen when their trigger element is removed while open.
* Fix the sidebar session row shifting its title and status badges when hovered.
* Fix the session search dialog showing a horizontal scrollbar for long session titles or snippets.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-36)
* Improve compaction handoff summaries for more reliable resumed sessions. They now keep the latest intent, key tool results, decisions, open questions, and context to re-check.
* Save shell commands to input history and recall them in bash mode. Press Up on an empty `!` prompt to browse previous shell commands.
* When large images are compressed, tell the model the original and delivered image details. Keep the original image available, and support cropped or full-resolution reads for fine details.
* Refresh the web UI icon set and unify the message copy and undo button hover states and tooltips.
* Let the web sidebar collapse an expanded workspace session list back to its first page.
* Trim redundant and incorrect tooltips in the web UI.
* Show an up arrow on the web composer send button.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-7)
* Remove the experimental micro compaction feature and its toggle from the experiments panel.
* Remove duplicate newline-shortcut handling from the prompt editor.
0.22.0 (2026-07-02) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-22-0-2026-07-02)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-29)
* Automatically compress oversized images before they reach the model, downsampling and re-encoding them to cut vision-token cost and avoid provider image-size errors.
* Add model alias overrides, letting you set model metadata under `[models."".overrides]` to override provider catalog refresh results.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-45)
* Fix plan, swarm, and goal modes being shared across sessions in the web UI; each session now keeps its own toggles.
* Fix the transcript jumping to the top when scrolling up through history during streaming output.
* Release pasted images and streaming timers once they are no longer shown, so memory stops growing in long sessions.
* Fix the terminal being left in raw mode with a hidden cursor and disabled flow control after a crash or abrupt exit.
* Fix an active workspace showing only its five most recent sessions on load, so it now keeps loading older sessions from the last 12 hours.
* Fix the Thinking-by-default setting not taking effect, so new sessions correctly start with thinking enabled.
* Fix spurious errors from the web question, approval, and task actions when the action was already complete, and add loading feedback so each click is acknowledged immediately.
* Show draft pull requests with a distinct draft status instead of displaying them as open.
* Hide the conversation outline when there is not enough room to expand its labels, so it no longer clips against the window edge.
* Hide the unsupported Off option in the /model thinking switcher for always-on models that already expose multiple effort levels.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-37)
* Refresh the web UI with a new design system, including updated colors, typography, spacing, light and dark palettes, restyled tooltips, and subtle enter/exit and expand/collapse animations.
* Group consecutive tool calls into a collapsible stack with per-tool renderers, including diff line-count chips for edits and inline previews for image, video, and audio results.
* Improve session search with a Cmd/Ctrl+K palette that filters by title, workspace, and last prompt with highlighted matches. Press Cmd+K or Ctrl+K to open it.
* Show queued prompts inline below the running turn in the web chat, and split Stop into its own button so Send no longer interrupts.
* Show the conversation outline as one entry per user query that expands into a labeled list on hover.
* Replace the Explore and Native theme options with a single chat layout and a Blue or Black accent-color setting.
* Add workspace sorting by manual order or last-edited time, plus collapse-all and expand-all controls, to the sidebar.
* Show time, duration, connection, and stack details in web error and warning toasts.
* Use one consistent modal dialog for confirmations in the web UI (archive session, delete workspace, delete provider, undo message, and mode toggles).
* Reduce the default TUI transcript window to keep long sessions responsive.
* Reduce the web composer's default height for a more compact empty state, and fix ArrowUp recalling the previous message while editing a multi-line draft; ArrowUp now recalls only from the very start of the text and is disabled in the expanded editor.
* Remove the fade-out animation when undoing a message in the web chat.
0.21.1 (2026-07-01) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-21-1-2026-07-01)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-46)
* Keep the waiting spinner visible while encrypted reasoning streams, fixing a blank spinner-less gap before the first response text appears.
0.21.0 (2026-07-01) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-21-0-2026-07-01)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-30)
* Plugins can now provide slash commands via a `commands` field in their manifest, registered as `:` and invoked with `$ARGUMENTS` expansion.
* Add Mermaid diagram rendering to the web chat. Fenced `mermaid` blocks in assistant responses now render as diagrams. KaTeX math and Mermaid diagram parsing also run in Web Workers to keep the UI responsive during live streaming.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-47)
* Stop a malformed message history from permanently bricking a session on strict providers (Anthropic). The request is repaired before sending — orphaned tool calls are closed and empty/whitespace-only text blocks dropped — and if the provider still rejects its structure, it is resent once with a wire-compliant rebuild.
* Force-exit headless runs (`kimi -p`) so a stray ref'd handle left over from the run can't keep a completed run alive until an external timeout, and bound prompt cleanup so a wedged shutdown step can't hang shutdown.
* Fix @ file mentions not opening when typed inside a slash command argument.
* Fix adding a workspace by path in the web UI failing silently when the daemon rejects the path; it now shows an error instead of a broken workspace.
* Fix duplicate workspaces showing in the web sidebar when the same folder is registered more than once.
* Fix the web workspace rename not persisting after a page refresh.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-38)
* Add a double-Esc shortcut to open the undo selector. Press Esc twice while idle to undo.
* Show file path completions when typing `/` in shell mode (`!`).
* Always show the usage-data opt-out toggle in the web settings with a clearer label and description.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-8)
* Rework conversation compaction:
* Keep only recent user prompts plus a single user-role summary; drop assistant and tool messages.
* Repair tool\_use/tool\_result adjacency before sending, fixing a strict-provider HTTP 400 when a tool call and its result became non-adjacent.
* Merge consecutive user turns for strict providers (Gemini/Vertex), fixing an HTTP 400 ("roles must alternate") after compaction or when a turn is steered in right after a tool result.
* Micro-compaction now defaults off.
* Refactor the thinking effort system
* Add a server-side key-value store API for persisting web UI preferences to the user's data directory.
0.20.3 (2026-06-30) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-20-3-2026-06-30)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-48)
* Fix provider error messages rendering as blank lines in the TUI when the server returns an HTML error page.
* Fix the web composer being hidden behind the mobile Safari toolbar and the page auto-zooming when the composer is focused.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-39)
* Refresh provider model lists automatically in the background instead of only at startup, so newly available models appear without restarting.
* Glob now uses ripgrep, so it respects .gitignore by default, supports brace patterns, returns only files, and keeps partial results with a warning when some directories are unreadable.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-9)
* Align malformed tool call argument handling with schema validation fallback.
0.20.2 (2026-06-29) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-20-2-2026-06-29)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-31)
* Support the Anthropic-compatible protocol for Kimi Code, including video input.
* Add a completion sound and question notifications to the web UI, with separate Settings toggles for completion notifications, question notifications, and sound. Question notifications default off so question text only reaches your desktop after you opt in.
* Add `KIMI_CODE_CUSTOM_HEADERS` for custom outbound LLM request headers, and send the `User-Agent` header to non-Kimi providers. Set `KIMI_CODE_CUSTOM_HEADERS` to newline-separated `Name: Value` lines.
* Add an optional `exclude_empty` parameter to the session list API to omit sessions that have no messages.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-49)
* Recover from provider 413 context overflows by compacting before retrying.
* Cap compaction output at 128k tokens by default to avoid provider `max_tokens` errors.
* Fix compaction ignoring the configured max output size.
* Fix unnecessary full-screen redraws when typing in the input box or toggling the slash panel.
* Keep unsent composer attachments scoped to their session in the web UI, so switching sessions no longer leaks them into another session's next message.
* Fix the web composer occasionally keeping typed text after sending the first message of a new session.
* Fix debug timing output lingering after undoing a turn.
* Fix working tips getting squeezed against the agent swarm progress bar.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-40)
* Rework the web ask-user-question card into a step-by-step wizard so multi-question navigation and the final Submit action are easier to see.
* In the bundled web UI, a new session is now created only when the first message is sent, so `+ New` without a workspace opens the composer instead of making an empty session.
* Restore each session's scroll position when switching back to it in the web UI.
* Keep the open side panel when switching between sessions in the web UI.
* Scope the web composer's up/down input history to the current session instead of sharing it across all sessions.
* In the bundled web UI, `/new` and `/clear` are now aliases that open the session onboarding composer and focus the input. iOS auto-zoom is prevented by keeping text inputs at 16px instead of disabling viewport scaling.
* Hide unused "New Session" entries from the web session list by default.
* Remove the `/sessions` slash command from the web UI; the sidebar already covers session browsing.
* Show the first five sessions per workspace in the web sidebar instead of ten.
* Replace the web composer attach button's plus icon with an image icon.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-10)
* Route Kimi Code models on the Anthropic-compatible protocol through the beta Messages API.
* Upgrade web markdown renderer dependencies (katex, markstream-vue, shiki) for bug fixes and performance improvements.
* Add provider type and protocol attributes to turn and API error telemetry.
0.20.1 (2026-06-26) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-20-1-2026-06-26)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-32)
* Plugins now support declaring lifecycle hooks in `kimi.plugin.json` to run scripts at specific stages. See [Hooks in Plugins](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/plugins.html#hooks-in-plugins)
.
* `/feedback` now supports attaching diagnostic logs and codebase context.
* Add the `kimi update` command, equivalent to `kimi upgrade`, for upgrading to the latest version.
* `kimi web` adds the `--allowed-host ` option to add a specified Host to the DNS-rebinding allowlist; 403 errors now explain how to allow it via `--allowed-host` or `KIMI_CODE_ALLOWED_HOSTS`, e.g. `kimi web --allowed-host example.com`.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-50)
* Fix kimi server failing to start on Windows after the first run.
* Fix the Web UI opened by the `/web` command not signing in automatically; the terminal now prints the access token.
* Cap chat-completions providers' `max_tokens` to the remaining context window, avoiding context overflow and invalid parameter errors.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-41)
* Optimize the default system prompt and built-in tool descriptions to stop the agent from blocking background tasks, unify tool guidance across profiles, and surface previously missing tool-result details (fetched-page mode, Grep match totals).
* Cache rendered message lines to keep the terminal responsive in long conversations.
* Retain only recent turns in the transcript and collapse older steps within each turn to keep long sessions responsive.
* Make the web chat input grow with its content and add an expandable editor for longer messages.
* Show the done / in progress / pending breakdown of hidden todos in the collapsed todo panel.
0.20.0 (2026-06-26) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-20-0-2026-06-26)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-33)
* Add shell mode to the TUI. Type `!` in the input box to enable it. For long-running commands, press Ctrl+B to move them to the background. For example, you can run `!gh auth login` to sign in to the GitHub CLI without opening a new terminal.
* Add a `--host` CLI option so `kimi web --host` can expose the server to the internet, with hardened token authentication, rate limiting, and other security measures.
* Render LaTeX display math (`$$…$$`) in the web UI.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-51)
* Fix a startup crash on Linux caused by an unhandled native clipboard error.
* Fix `kimi web` and `/web` failing to start the background server daemon on Windows with `spawn EFTYPE` when the CLI is installed via npm/pnpm or run from source. The official single-binary install script was not affected.
* Fix the terminal window repeatedly losing focus on Linux Wayland, which broke IME input.
* Stop auto-dismissing questions in the web UI after 60 seconds so they wait for the user's answer.
* Fix explore subagents silently losing git context when git commands time out or the directory is not a repository.
* Fix Ctrl-C during compaction so it clears a pending editor draft first instead of cancelling immediately.
* Fix MCP server working directories when sessions are hosted by the web server.
* Fix duplicate session snapshot reloads in the bundled web UI during resync.
* Fix truncated skill descriptions missing an ellipsis in the model's skill listing.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-42)
* Redesign `/plugins` as a single tabbed panel: **Installed** (manage installed plugins — toggle, remove, MCP, details, reload), **Official** (Kimi-maintained marketplace plugins), **Third-party** (marketplace plugins from other publishers), and **Custom** (install straight from a GitHub URL, zip URL, or local path). Use `Tab` / `Shift-Tab` to switch tabs.
* Show a line-by-line diff when the agent edits or writes a file in the web chat.
* Show the plan body and approach choices in the plan review card when exiting plan mode in the web UI.
* Show the full accumulated progress of a subagent in its detail panel, with concise tool-call summaries instead of raw JSON.
* `/reload` now refreshes the assistant's view of plugin skills, so plugin changes take effect in the current session instead of requiring a new one.
* Replace silent AGENTS.md truncation with a visible warning in the TUI status bar and web UI.
* Add a confirmation prompt before installing third-party plugins.
* Show update badges on the `/plugins` Installed tab, where Enter now installs the available update and I opens plugin details.
* Add a copy button to user messages in the web chat.
* Preserve full tool output logs when previews are truncated and link background task completion notifications to saved output.
* Sync session title changes across all connected clients in server mode.
* Add Ctrl+U and Ctrl+D as page up and page down shortcuts in the task output viewer.
* Add a hint to the per-turn step limit error pointing users to the `loop_control.max_steps_per_turn` config option.
* Reduce streaming redraw cost for long assistant messages with code blocks.
* Page the web session list per workspace so the first screen no longer fetches every session up front.
* Keep the web session sidebar from re-rendering on every streaming token to improve rendering performance.
* Create missing parent directories automatically when writing a file.
* Improve the image paste hint.
0.19.2 (2026-06-24) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-19-2-2026-06-24)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-34)
* Keep drag-and-drop workspace reordering in the web sidebar, with sort order persisted locally; sessions now also float to the top of their group as soon as a new message arrives.
* Add an Alt+S shortcut in the model picker to switch the model for the current session only, without saving it as the default.
* Add a Ctrl+T shortcut to expand and collapse a truncated todo list.
* Add `-c` as a shorthand for `--continue`.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-52)
* Fix yolo mode in the web app auto-approving plan reviews and sensitive file access.
* Fix resume not realigning a tool call that was interrupted mid-history.
* Fix the composer's ↑/↓ input-history recall doing nothing right after the first message of a new session.
* Fix stale rows occasionally leaving duplicate input boxes after tall content shrinks.
* Fix inline images being rendered as broken escape sequences in the transcript.
* Fix code blocks nested inside list items rendering blank in the web chat after a turn finishes generating.
* Fix the Tab key unexpectedly opening the file completion list.
* Fix clipboard copy actions in the web UI when served over plain HTTP.
* Fix the web question prompt missing the free-text Other option.
* Fix web chat stop actions so stale prompt ids fall back to cancelling the active session.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-43)
* Read large text files in bounded memory and read tail lines without scanning whole files.
* Show the command in running Bash tool cards and allow expanding it with Ctrl+O before the result arrives.
* Allow the web sidebar and detail panel to be resized up to the available viewport width, keeping their resize handles reachable on narrow windows.
* Show subcommand suggestions after Tab-completing a slash command name.
* Show a transient footer hint when an image is detected in the clipboard, displaying the platform-appropriate paste shortcut.
* Persist the collapsed state of workspace groups in the web sidebar across page reloads.
* Add a development-mode indicator to the web sidebar for local development.
* Optimize the loading tips display.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-11)
* Reorganize the web app's components into area subdirectories (chat/settings/dialogs/mobile) and refresh the component path comments.
* Extract several composer pieces into reusable composables.
* Extract pure turn-rendering helpers out of the chat pane into their own module.
* Extract the beta conversation outline (table of contents) into its own component.
* Extract the workspace group rendering out of the sidebar into its own component.
0.19.1 (2026-06-23) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-19-1-2026-06-23)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-53)
* Fix ACP editors such as Zed failing to start a new thread.
* Fix the web sidebar's unread dots getting out of sync across browser tabs.
* Clear all per-session state when a session is archived or removed, so archived sessions no longer leave orphaned data behind.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-12)
* Consolidate web client localStorage access and split the root state store and app shell into focused composables.
0.19.0 (2026-06-22) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-19-0-2026-06-22)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-35)
* Added the ability to add extra workspace directories:
* Use the `/add-dir ` command to add extra working directories to the current session, or remember them for the project.
* Use `kimi --add-dir ` to add them on startup.
* Project-level local config is now managed in `.kimi-code/local.toml`; we recommend adding it to your `.gitignore`.
* Allow long-running foreground commands and subagents to be moved into background tasks with `Ctrl+B`, and inspect them via the `/tasks` panel.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-54)
* Surface provider safety-policy blocks instead of silently treating them as completed turns, and prevent the context token count from dropping to zero after a filtered response.
* Fix provider requests failing when restored conversation history contains empty text content blocks.
* Detect the real image format from file contents when reading media, so a mismatched filename extension no longer produces a data URL the model API rejects.
* Fix commands flashing an empty console window on Windows.
* Stop showing unread dots on cancelled or failed sessions in the web sidebar.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-44)
* Speed up session snapshot loading with a direct disk reader and a request timeout safeguard, keeping the previous path as a legacy fallback.
* Show longer branch names in the web chat header and expose the full name on hover.
* Keep the web page title fixed instead of changing with the session or workspace name.
* Polish file mention UX.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-13)
* Unify image format detection when sniffing fails.
* Consolidate web client localStorage access and decouple appearance/notification state into dedicated modules.
0.18.0 (2026-06-18) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-18-0-2026-06-18)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-36)
* Add session filtering to the web sidebar, filtering by title and the last user prompt.
* Add scroll-up lazy loading for older messages in the web chat session view.
* Add an environment variable to cap AgentSwarm concurrency during the initial ramp, so large swarms do not trip provider rate limits as easily.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-55)
* Fix the web app only loading the 20 most recent sessions.
* Fix web slash skill selection sending immediately and allow slash search to match skill names by substring.
* Fix the highlighted web slash command not staying visible while navigating a long slash menu.
* Fix incorrect display after archiving the last session.
* Fix the web login slash command description to match the browser authorization flow.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-45)
* Redesign the web OAuth login dialog so the order of steps is unambiguous.
* Show the current version in web settings.
* Allow long web slash command names and descriptions to wrap without overflowing the slash menu.
* Add `/reload` suggestion in plugin-change hints.
0.17.1 (2026-06-17) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-17-1-2026-06-17)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-56)
* Fix the `kimi web` command failing to start in the background.
* Stop the background local server from locking the directory it was started in.
* Prevent the web login dialog from closing when clicking the backdrop.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-46)
* Group the default model dropdown in web settings by provider.
0.17.0 (2026-06-17) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-17-0-2026-06-17)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-37)
* Add Kimi Code Web mode, which you can start with `kimi web` or `/web` in the CLI, and continue sessions in a browser chat interface.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-57)
* Show the underlying connection error when OAuth token refresh fails after internal retries, instead of prompting for login. Token refresh failures are no longer re-retried at the agent loop level.
* Restore the turn counter from persisted loop events on resume so post-resume turns no longer reuse turn ids that already appear in history.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-47)
* Skip debug TPS when the output stream is too short to measure reliably.
0.16.0 (2026-06-16) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-16-0-2026-06-16)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-38)
* Add a built-in `kimi vis` command that launches the session visualizer in your browser, pointed at your local sessions. Supports `--port`/`--host`, `--no-open`, and `kimi vis ` deep-links.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-58)
* Stop Anthropic-compatible providers from reading ambient Anthropic shell credentials and custom headers.
* Fix repeated compaction handling when context remains over the blocking threshold.
* Prevent session shutdown from resuming the agent when stopping background tasks.
* Project session replay ranges over rendered replay records instead of raw persisted records.
* Close wrapped output streams when buffered readers are destroyed.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-48)
* Reduce the maximum height of the `/btw` side panel from half to one-third of the terminal.
* Polish queue pane styling.
* Add configurable banner display frequencies with local display state.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-14)
* Remove redundant LLM request logging context plumbing.
0.15.0 (2026-06-15) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-15-0-2026-06-15)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-39)
* Add an all-sessions picker view with name search, paginated browsing, and clipboard-ready resume commands for sessions in other working directories.
* Add support for legacy SSE MCP servers alongside stdio and streamable HTTP transports.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-59)
* Recover resumed sessions when an interrupted tool call result was not recorded.
* Stop writing resume version markers into persisted agent metadata.
* Do not carry obsolete legacy loop, background, plan, yolo, or unknown experimental flags into migrated config files.
* Repair mismatched JSON Schema types emitted by Xcode 26.5 MCP server for Moonshot compatibility.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-49)
* Keep TUI components within narrow terminal widths by wrapping, compacting, or truncating lines that could exceed the render width.
* Prompt the CLI to show one brief same-language status sentence before non-trivial tool calls.
* Extend the same-language rule to the model's reasoning, so thinking follows the user's language while keeping code and technical terms in their original form.
* Read media files using header-detected types before falling back to media extensions.
* Prioritize clearing draft editor text before Ctrl-C cancels an active stream.
* Collapse hidden directories in the workspace prompt and explain how to inspect them.
* Include the skill's directory on the loaded-skill context block so the agent can locate a skill's bundled resources (scripts, templates) after it is invoked.
* Show the all-sessions toggle hint when the current working directory has no sessions.
* Clarify that compaction summaries must be emitted in the final answer.
* Clarify AGENTS.md prompt guidance and mark truncated instruction files.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-15)
* Resolve model capabilities through a static lookup instead of instantiating a temporary provider.
* Decouple agent skill access from session-specific registry implementations.
* Optimize the npm packaging system.
0.14.3 (2026-06-14) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-14-3-2026-06-14)
-----------------------------------------------------------------------------------------------------------
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-50)
* Refresh provider model metadata before opening the model picker.
0.14.2 (2026-06-12) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-14-2-2026-06-12)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-60)
* Fix endless desktop notifications in iTerm2 by only sending terminal progress sequences to terminals that support them.
* Show completed and cancelled compaction records correctly when resuming a session.
* Drop invalid config.toml sections with a warning instead of failing to start.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-51)
* Stream foreground Bash stdout and stderr while commands are still running.
* Allow `--auto`, `--yolo`, and `--plan` to be combined with `--session` or `--continue` by applying the requested mode to the resumed session.
* Qualify sub-skill names with their parent prefix and expose sub-skills as dotted slash commands in the TUI.
* Sync custom registry provider additions, removals, and rotated registry keys during startup refresh.
0.14.1 (2026-06-12) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-14-1-2026-06-12)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-61)
* Cancel active turns during session shutdown so foreground shell commands do not outlive prompt-mode exits.
* Stop background tasks by default when sessions close.
* Prevent overlapping interactive agent requests from using the wrong active agent.
* Fix premature stream close errors when shell processes time out or are killed.
* Degrade unsupported audio/video to placeholder text and reattach tool result media instead of silently dropping them.
* Send OpenAI Responses system prompts as request instructions.
* Propagate configured execution environment overrides across spawned processes.
* Fix ACP file reads and edits for Windows workspaces opened through IDE clients.
* Require AgentSwarm tool calls to run alone in a model response.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-52)
* Add runtime support for dynamic MCP server updates, reference skills, replay timestamps, and Node file uploads.
* Add a YOLO choice when starting swarm tasks from Manual mode.
* Polish builtin skills.
* Find slash commands by their aliases in autocomplete — typing `/clear` now suggests `new (clear)`.
* Wrap long command and skill descriptions in the autocomplete menu onto a second line instead of cutting them off.
* Display a tips banner below the welcome panel on startup.
0.14.0 (2026-06-10) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-14-0-2026-06-10)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-40)
* Add an `Interrupt` hook event that fires when the user interrupts a turn (e.g. pressing Esc), letting hooks observe the turn stopping instead of getting stuck on a working state.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-62)
* Preserve image outputs from tools when using OpenAI-compatible chat completions.
0.13.1 (2026-06-10) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-13-1-2026-06-10)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-63)
* Prevent forking sessions during active turns and consolidate wire protocol definitions into a shared internal package.
* Fix Kimi Datasource to use the matching OAuth credentials and service endpoint for the active Kimi Code environment.
* Fix goal marker text overflowing terminal width.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-53)
* Add Claude Fable 5 support to the Anthropic provider.
* Add an interactive undo selector and clearer undo-limit messages.
* YOLO mode no longer asks before writing or editing files outside the working directory.
* Clarify active skill prompts so loaded skills are no longer represented as system reminders.
* Tighten file tool guidance to route incremental edits through Edit.
0.13.0 (2026-06-10) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-13-0-2026-06-10)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-41)
* Add custom color themes. Define your own palette as a JSON file in `~/.kimi-code/themes/`, or generate one with the built-in `/custom-theme` skill command.
* Add `/import-from-cc-codex` to import selected Claude Code and Codex instructions, Skills, and MCP settings.
* Show available plugin updates in the marketplace.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-64)
* Fix Windows builds and development launches that could fail when package binaries resolve to command shims.
* Fix device login to keep the URL and code visible when the browser cannot be opened.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-54)
* Clarify grouped subagent progress with active status breakdowns and elapsed time.
* Truncate queued message display to a single line with ellipsis when it exceeds terminal width.
0.12.1 (2026-06-09) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-12-1-2026-06-09)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-65)
* Allow obsolete experimental config entries to remain without blocking startup.
* Pass through xhigh reasoning effort for OpenAI-compatible chat completions requests.
0.12.0 (2026-06-09) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-12-0-2026-06-09)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-42)
* Add the `/swarm` command for running agent swarms with live progress and rate-limit-aware retries.
* Make goals, background questions, and sub-skill discovery available without experimental opt-ins.
* Honor the standard `HTTP_PROXY` / `HTTPS_PROXY` / `ALL_PROXY` / `NO_PROXY` environment variables, including SOCKS proxies, for all outbound traffic.
* Support Homebrew installations.
* Enable micro compaction by default. Disable via `/experiments`.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-66)
* Fix ACP slash skill routing, bootstrap context reads, file and permission edge cases, subagent event handling, and stale-file edit messaging.
* Fix goal resume behavior by restoring goal state from agent records.
* Fix thinking text and tool output display for subagents.
* Fix session workdir mismatch on Windows caused by inconsistent path separators.
* Fix the `/mcp` status panel border being broken by multi-line MCP server errors, which are now folded onto a single row.
* Detect Git Bash installed through Scoop and other Git shims on Windows.
* Show the underlying error when migration fails.
* Allow the startup session picker to exit with repeated Ctrl-C or Ctrl-D.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-55)
* Remove the per-turn auto-compaction limit so long conversations can keep compacting instead of failing early.
* Improve goal mode outcome handling with follow-up messages, safer error pauses, and clearer TUI transcript display.
* Show full plan cards directly and remove the Plan card keyboard shortcut.
* Wrap long single-line shell commands in approval prompts so the full command remains visible.
* Rework file reference completion in the TUI.
* Load Kimi-specific user Skills and global agent instructions from `KIMI_CODE_HOME` when it is set.
0.11.0 (2026-06-05) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-11-0-2026-06-05)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-43)
* Add experimental sub-skill discovery gated by the `KIMI_CODE_EXPERIMENTAL_SUB_SKILL` environment variable. Ships the `sub-skill` builtin bundle (`sub-skill.review`, `sub-skill.consolidate`) for inventorying and consolidating skills into hierarchical groups.
* Add the following environment variables:
* `KIMI_MODEL_TEMPERATURE`, `KIMI_MODEL_TOP_P` — sampling parameters applied globally to any `kimi` provider (not tied to `KIMI_MODEL_NAME`).
* `KIMI_MODEL_THINKING_KEEP` — Moonshot preserved-thinking passthrough (`thinking.keep`), injected only while Thinking is on.
* `KIMI_CODE_NO_AUTO_UPDATE` (legacy alias `KIMI_CLI_NO_AUTO_UPDATE`) — fully disables the update preflight (no check, background install, or prompt).
* Show built-in skills as direct slash commands and group them ahead of external skill commands.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-67)
* Fix slash command autocomplete so goal text can be submitted when the cursor is before existing text.
* Fix queued goals so failed promotion attempts do not lose or duplicate queued work.
* Fix upcoming-goal queue handling while editing or pasting queued goals.
* Ask before starting goals in YOLO mode so users can switch to Auto for unattended work.
* Show concise provider filtering errors when responses are blocked before visible output.
* Show "unknown command" instead of "too many arguments" when an invalid subcommand is entered.
* Clamp OpenAI Chat Completions `xhigh` and `max` thinking effort to `high` unless the model supports `xhigh` on `v1/chat/completions`.
* Preserve thinking effort when compacting long conversations.
* Refresh provider model metadata when capabilities change without model ID changes.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-56)
* Show the upcoming-goal confirmation with the same accent treatment as goal lifecycle messages.
* Start upcoming goals immediately when there is no active goal to wait for. Support multiline edits when managing upcoming goals.
* Use a fixed 30-minute timeout for subagents and show concise resume instructions when they time out.
* Highlight goal queue subcommands while typing slash commands.
0.10.1 (2026-06-05) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-10-1-2026-06-05)
-----------------------------------------------------------------------------------------------------------
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-68)
* Fix a crash when starting a goal in the TUI.
0.10.0 (2026-06-04) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-10-0-2026-06-04)
-----------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-44)
* Users now can prepare several goals for the agent to work on sequentially. The agent will pick up the next goal from the queue once the current goal is completed. Use `/goal next ` to queue a goal and `/goal next manage` to review and change the queue interactively.
* Add the built-in `update-config` skill — you can now have Kimi edit its own config files.
* Add persistent experimental feature toggles and a TUI panel that applies confirmed changes by reloading the current session.
* Add `/reload` to reload the current session and apply updated config files, plus `/reload-tui` to reload only TUI preferences.
* Add a doctor command for validating Kimi Code configuration files.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-69)
* Normalize malformed Responses stream rate limit errors as provider rate limit failures.
* Keep managed OAuth credentials scoped to their configured authentication and API endpoints.
* Stop carrying active and queued goals into forked sessions.
* Fail early when Git Bash is missing on Windows before starting CLI sessions.
* Refresh the update target before showing foreground update prompts so the displayed version matches the install.
* Point session error diagnostics to the `/export-debug-zip` command.
* Set terminal tab titles without renaming the running process.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-57)
* Start automatic background updates as soon as startup's fresh update check finds a newer version.
* Set the CLI process title to kimi-code during startup.
* Lowercase the stale file content message in edit tool errors.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-16)
* Ensure Nix-packaged CLI builds can find ripgrep and fd.
### Other [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#other)
* Document the Git Bash prerequisite for Windows installs.
0.9.0 (2026-06-03) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-9-0-2026-06-03)
---------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-45)
* Add the `kimi acp` subcommand: kimi-code now speaks [Agent Client Protocol 0.23](https://agentclientprotocol.com/)
over stdio so IDEs (Zed, JetBrains AI Chat, custom clients) can drive sessions directly — coverage matrix, Zed configuration and breaking pre-release notes are in [kimi acp Subcommand Page](https://moonshotai.github.io/kimi-code/en/reference/kimi-acp.html)
.
* Add `/btw` for side-channel conversations without steering the active main turn, and allow `/btw` to open the side-channel panel before entering a question.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-70)
* Fix external editor (Ctrl+G) on Windows by removing `/bin/sh` dependency and using platform-aware shell quoting for temp file paths.
* Use the OpenAI completion token field required by newer Chat Completions models.
* Use configured model output limits for completion token caps.
* Fix goal budget tool schemas for OpenAI-compatible providers.
* Resume saved subagents lazily when they are accessed.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-58)
* Unify the interaction and visuals across TUI dialogs and selectors.
* Log enabled experimental flags at startup.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-17)
* Allow SDK runtime creation to use a separate RPC client while preserving local CLI startup.
0.8.0 (2026-06-02) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-8-0-2026-06-02)
---------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-46)
* Add experimental goal mode for longer tasks that need more than one turn. Turn it on with `KIMI_CODE_EXPERIMENTAL_GOAL_COMMAND=1` before you start Kimi.
Use `/goal ` in the TUI when you want Kimi to keep working on one task across turns. For example:
text
/goal Fix the failing checkout test
Kimi shows the goal in the TUI and keeps progress visible while it works. Use `/goal status`, `/goal pause`, `/goal resume`, `/goal cancel`, and `/goal replace ` to manage the goal. This feature is still experimental. Try it and tell us what would make it more useful.
* Add `kimi provider` CLI subcommand with `add`, `remove`, `list`, and `catalog list` / `catalog add` actions, so providers from a custom registry (api.json) or the public models.dev catalog can be imported and managed without launching the TUI.
* Add background structured questions so agents can continue while waiting for user answers.
* Add background automatic upgrades, which can be disabled in tui.toml.
* Add `/undo` slash command to withdraw the last prompt from conversation history, and keep replay records in sync when a prompt is undone.
* Add a `kimi upgrade` command for manually checking and upgrade Kimi Code CLI.
* Add approval lifecycle hook events for observing pending and completed permission prompts.
* Allow subagents to use custom tools registered on their parent agent.
* Allow glob searches to target explicit absolute paths outside the workspace.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-71)
* Fix cross-provider replay failures from incompatible tool call IDs and unsigned Claude thinking history.
* Fix custom registry provider handling during re-import. Prevent loss of multi-provider entries and remove stale providers along with their model aliases and default model references.
* Fix tool output preview rendering: trim trailing empty lines, append ellipsis to multi-line Bash command headers, and truncate long single-line output by visual wrapped lines instead of raw newline count.
* Fix slash-activated skills not being recognized by the model due to missing system reminder wrapper.
* Fix a crash in the `/sessions` picker on very narrow terminals by clamping every rendered line to the terminal width.
* Normalize glob patterns before brace expansion to prevent incorrect path matching.
* Prevent modified keyboard release sequences from appearing after exiting the CLI.
* Fix Git Bash path detection on Windows by also searching `usr\bin\bash.exe` locations, which is where bash lives in many Git for Windows installations where `bin\bash.exe` does not exist.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-59)
* Show MCP server summary in the welcome panel and add configuration hints in the /mcp command output.
* Point users to `/provider` instead of the removed `/connect` command in the welcome screen and the no-models-configured hint.
* Append the current todo list as markdown to compaction summaries before writing them to history.
* Show the full model name in the footer status bar instead of truncating the provider prefix.
* Remind the model to refresh TodoList during long-running tasks and strengthen TodoList progress-tracking guidance.
* Replace chalk named color with theme-aware hex in session-directory warning.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-18)
* Consolidate background task management under the agent background runtime.
0.7.0 (2026-06-02) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-7-0-2026-06-02)
---------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-47)
* Add `/provider` command for managing AI providers, support custom registry imports, and introduce a tabbed model selector. It replaces the deprecated `/connect` command — use `/provider` instead.
* Render scheduled reminders distinctly in the TUI, expose cron fired events to SDK clients, and report cron fire times with local timezone offsets.
* Add `KIMI_MODEL_ADAPTIVE_THINKING` (and a matching `adaptive_thinking` model-alias field) to force adaptive thinking (`thinking: { type: 'adaptive' }`) on or off, overriding the Anthropic model-name version inference. This lets custom-named compatible endpoints that back an adaptive-capable model opt in even when the model name does not encode a parseable Claude version.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-72)
* Report truncated compaction summaries clearly and apply valid completion token budgets across supported providers.
* Fix glob pattern backslash escaping and include match count in truncation messages.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-60)
* Clarify Kimi Platform API key login labels and prompt details.
* Polish a small TUI visual interaction.
0.6.0 (2026-05-29) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-6-0-2026-05-29)
---------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-48)
* Add a `KIMI_MODEL_*` environment-variable channel that lets you run Kimi Code against a specific model (provider type, base URL, API key, context size, capabilities, and thinking settings) without editing `config.toml`.
* Install plugins directly from GitHub repository URLs, and surface each install's origin and trust level (kimi-official, curated, third-party) in the plugin manager.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-73)
* Show the real terminal status of background agents in the transcript so lost, failed, and killed ones no longer appear as completed, and include the resume agent id and recovery instructions in the failure notification so the model can resume reliably.
* Recover from provider model token limit errors during long conversations.
* Automatically retry when a model response stream is dropped mid-flight (a `terminated` error) instead of failing the turn.
* Handle context overflow errors consistently across provider responses.
* Back off failed compaction retries by a fixed slice of the model context window.
* Fix the native self-updater reporting a successful update when the install command actually failed.
* Project persisted hook and blocked prompt messages into model context.
* Keep blocked prompt hook conversations available to subsequent model turns.
* Fix footer leaking onto the terminal when resuming a non-existent session.
* Fix automatic ripgrep installation when temporary files are on another filesystem.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-61)
* Remove the default per-turn step limit of 1000. Users can still set `max_steps_per_turn` in config to enforce a custom limit.
* Support querying sessions by sessionId or workDir in listSessions, and show a helpful cd command when resuming a session from a different working directory.
* Expand the footer's rotating tips to surface more commands and shortcuts, featuring newer and important ones more prominently.
* Improve the usage information display in the TUI.
* Restrict plugin trust badges to Kimi-hosted plugin CDN URL patterns.
* Clarify subagent and background task stop messages as user-initiated.
* Align the datasource plugin with the generic two-tool workflow.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-19)
* Introduce `ModelProvider` interface and `SingleModelProvider` to decouple `Agent` from `ProviderManager`.
* Split `RuntimeConfig` into `Kaos` and `ToolServices` and update all references accordingly.
* Slim the LLM diagnostic logs with fewer, more compact fields.
* Relocate shared tool service typing to the tool support layer.
0.5.0 (2026-05-28) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-5-0-2026-05-28)
---------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-49)
* Add scheduled tasks:
You can now ask the agent to remind you at a specific time, run a task on a recurring cron schedule (for example, check a deploy every 5 minutes or run a daily report every weekday at 9am), or come back on its own in a few minutes to continue what it was doing.
Schedules use the standard 5-field cron syntax.
* Add `/auto` slash command and `--auto` CLI flag for auto permission mode.
* Show file content and diff in Write and Edit approval prompts, and open them in a dedicated full-screen viewer on ctrl+e instead of expanding inline.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-74)
* Fix compaction to handle edge cases where no messages are compactable and improve retry logic.
* Fix official datasource tools to preserve complete responses and write returned result files.
* Fix migration mapping the legacy `default_yolo` key to the dead `yolo` field instead of `default_permission_mode`.
### Polish [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#polish-62)
* Add a clickable changelog link to the update prompt.
* Show the full Bash command when expanding a Bash tool card with `ctrl+o`. The header still truncates long commands at 60 chars, but the expanded view now reveals the complete multi-line command above the output.
* Shorten the session title written to the terminal window/tab from 80 to 32 characters so long first messages and pasted content no longer stretch the tab bar past readable width.
* Cap the inline todo panel at five rows and show a `+N more` indicator so long task lists no longer fill the screen.
* Clarify plugin manager keyboard shortcuts and show plugin state changes inline.
* Report discovered plugin skills in plugin manager summaries.
* Offload large base64 media payloads from `wire.jsonl` into external blob files to reduce wire size and memory pressure during session replay. Includes an in-memory read-through cache on `BlobStore` so repeated rehydration avoids redundant disk reads.
* Wrap long question, body, and option text in the AskUserQuestion dialog instead of truncating with an ellipsis. The question prompt, body description, option label, option description, and submit-tab review entries now flow onto multiple lines with a hanging indent.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-20)
* Refactor TUI code structure.
0.4.0 (2026-05-27) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-4-0-2026-05-27)
---------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-50)
* Add user-global plugin installation, interactive plugin management, plugin-provided skills, and plugin-owned MCP servers.
* Expand folded paste markers on second paste.
* Rework tool permissions: reads outside cwd no longer prompt, session approvals match the exact call, and path-based rules are case-insensitive.
* Add `/export-debug-zip` slash command to export the current session as a debug ZIP archive directly from the TUI.
* Add `/export-md` slash command to export the current session as a Markdown file.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-75)
* Prevent the TUI from crashing when pull request lookup fails during startup.
* Fix thinking spinner leaking past turn end when an empty thinking delta creates an orphaned thinking component.
* Show the original session resume command after forking a session.
* Restrict plugin zip installs to manifests at the archive root or a single wrapper directory.
* Route session-tagged log entries exclusively to the session sink instead of duplicating them to the global sink. Consistently omit stable main-agent context keys from all session log lines that carry `agentId=main`.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-21)
* Refactor TUI resume replay logic.
* Use one retry classification for transient LLM failures across regular turns and compaction.
### Other [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#other-1)
* Enhance `kimi export` to include more diagnostic information in the manifest.
0.3.0 (2026-05-26) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-3-0-2026-05-26)
---------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-51)
* `/logout` now opens a picker so you can choose which provider to log out of, instead of always logging out the one tied to the current model. The current provider is highlighted by default, so pressing Enter matches the previous behavior. The command is also available as `/disconnect`.
* The `openai` provider now works out of the box for OpenAI-compatible reasoner models: it auto-detects thinking fields in responses (`reasoning_content` / `reasoning_details` / `reasoning`) and auto-injects `reasoning_effort` when history contains prior thinking. DeepSeek, Qwen, One API and other gateway-fronted services no longer need a hand-set `reasoning_key`, which remains available as an explicit override for non-standard gateways.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-76)
* Prevent running the `/model` and `/sessions` slash commands while streaming or compacting context.
* Preserve catalog-declared interleaved reasoning fields for OpenAI-compatible models configured through `/connect`.
* Fix API key input dialog showing a masked dot in empty state.
* Fix user skills in `~/.agents/` not being loaded.
* Restore real-time token display for running subagents in the TUI.
* Hide the todo panel on resume when all todos are already completed.
* Always emit a paired tool result when a tool returns a malformed or missing result, preventing the next request from failing with a missing tool\_call\_id error.
* Fix Plan mode session resets so new sessions no longer fail after plan review rejection and continue receiving events after setup errors.
* Exit promptly when the controlling terminal goes away. The TUI now handles `SIGHUP` / `SIGTERM` and stdout/stderr `EIO` / `EPIPE` / `ENOTCONN` errors, preventing leftover `kimi` processes that pin a CPU core after the parent shell or multiplexer dies unexpectedly.
* Avoid overly small local completion caps that can truncate reasoning before summaries are produced.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-22)
* Make `AgentRecords` hold the `Agent` instance directly and inline the restore dispatch logic.
### Other [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#other-2)
* Improve the Write tool UX.
0.2.0 (2026-05-26) [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#_0-2-0-2026-05-26)
---------------------------------------------------------------------------------------------------------
### Features [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#features-52)
* Add a `/connect` command that configures a provider and model from a model catalog.
* The `/connect` provider and model pickers now support type-to-search filtering, and long lists are paginated. The `/model` picker is also paginated when many models are configured.
* Add `Ctrl-J` as an additional shortcut for inserting new lines in the TUI prompt.
* Add wire record migration handling during session replay.
* Migrate user skills from `~/.kimi/skills/` to `~/.kimi-code/skills/` during the first-launch migration; existing target skills are kept.
* Emit session resume hint as a structured meta message in stream-json output format.
### Bug Fixes [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#bug-fixes-77)
* Report the macOS product version in OAuth device information instead of the Darwin kernel version.
* Correct the `X-Msh-Platform` header value to `kimi_code_cli`.
* Clarify the prompt-mode error when no model is configured by pointing users to the login flow.
* Hide the empty current session from the sessions picker while keeping other empty sessions visible.
* Stop mentioning OAuth credentials in the migration UI — they are never migrated, so the previous "needs /login" notice misread as a failure. OAuth-only installs no longer trigger the migration screen.
* Surface API-provided error messages during feedback, usage, login, and model setup failures.
* Persist model selections from the terminal UI to the default configuration, and honor the configured default thinking state for new sessions.
* Retry compaction responses that do not contain a summary before updating conversation history.
* Avoid CPU spikes from large streamed tool arguments and coalesce high-frequency streaming UI updates.
* Resume sessions with a newer wire protocol version instead of failing. A warning is now shown in the TUI and records are replayed without migration.
* Warn tmux users when extended key settings may prevent modified Enter shortcuts from working.
* Let Kimi requests use the remaining context window for completion tokens by default while keeping explicit environment limits as hard caps.
### Refactors [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#refactors-23)
* Flatten tool call data by inlining tool names and arguments at the top level, and limit legacy record migration so it only rewrites matching tool call payloads.
* Move wire metadata handling into the record layer and keep persistence backends limited to storage operations.
### Other [](https://www.kimi.com/code/docs/en/kimi-code-cli/changelog.html#other-3)
* When no models are configured, `/model` and the welcome panel now point users to `/login` (for Kimi) and `/connect` (for other providers).
---
# Using Kimi in OpenCode | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/third-party-tools/opencode.html#VPContent)
On this page
Using Kimi in OpenCode [](https://www.kimi.com/code/docs/en/third-party-tools/opencode.html#using-kimi-in-opencode)
=====================================================================================================================
[OpenCode](https://opencode.ai/)
is a terminal-based coding agent. This guide shows how to forward OpenCode model requests to Kimi For Coding via built-in authentication, with K3 or K2.8 Preview providing the model inference.
Install OpenCode [](https://www.kimi.com/code/docs/en/third-party-tools/opencode.html#install-opencode)
---------------------------------------------------------------------------------------------------------
The easiest way to install OpenCode is through the installation script:
bash
curl -fsSL https://opencode.ai/install | bash
Or install via npm:
bash
npm install -g opencode-ai
Configure API key [](https://www.kimi.com/code/docs/en/third-party-tools/opencode.html#configure-api-key)
-----------------------------------------------------------------------------------------------------------
Run `opencode auth login` and select **Kimi For Coding** from the provider list:
bash
$ opencode auth login
┌ Add credentials
│
◆ Select provider
│ ● Kimi For Coding
│ ...
└
Enter your Kimi For Coding API Key:
bash
$ opencode auth login
┌ Add credentials
│
◇ Select provider
│ Kimi For Coding
│
◇ Enter your API key
│ _
└
> API Keys can be created and managed in the [Kimi Code Console](https://www.kimi.com/code/console)
> (up to 5 keys; each key is shown only once at creation).
Launch and use [](https://www.kimi.com/code/docs/en/third-party-tools/opencode.html#launch-and-use)
-----------------------------------------------------------------------------------------------------
After configuring, start OpenCode:
bash
$ opencode
Type `/models` in a session:
bash
/models
Pick a model under the **Kimi For Coding** list.
Recommended model launch
**K2.8 Preview** is now fully rolled out in Kimi Code — `kimi-for-coding` is upgraded in place with no configuration changes: performance close to K3, with `low` / `high` / `max` thinking effort levels and up to 1M context. See [What's New](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html)
.
Before you start, check your membership tier and what it entitles you to (see [Membership Benefits](https://www.kimi.com/code/docs/en/kimi-code/membership.html#plan-comparison)
for a comparison of the legacy and new plans) — calling models or context windows beyond your plan will fail with an error:
| Tier | Available models | Context window |
| --- | --- | --- |
| Go (new plans) | No coding quota | — |
| Andante (legacy plans) | K2.8 Preview | `1048576` |
| Plus / Moderato | K3 K3-256K K2.8 Preview | K3: `262144` K3-256K: `262144` K2.8 Preview: `1048576` |
| Pro and above / Allegretto and above | K3 K3-256K K2.8 Preview K2.7 Code HighSpeed | K3: `1048576` K3-256K: `262144` K2.8 Preview: `1048576` K2.7 Code HighSpeed: `262144` |
With K3 or K2.8 Preview selected, type `/variants` to switch the thinking effort:
bash
/variants
Thinking effort mapping
OpenCode offers the variants `Default` / `low` / `high` / `max`, mapped to K3's actual effort levels as follows (full mapping table in [Model configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html#switch-model)
):
| OpenCode variant | K3 actual effort |
| --- | --- |
| `Default` | `high` (K3) / `max` (K2.8 Preview) |
| `low` | `low` |
| `high` | `high` (recommended) |
| `max` | `max` |
Both K3 and K2.8 Preview support `low` / `high` / `max`; K2.7 Code HighSpeed does not require this setting.
See [Model configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html)
for model capabilities and setup details.
Next steps [](https://www.kimi.com/code/docs/en/third-party-tools/opencode.html#next-steps)
---------------------------------------------------------------------------------------------
* [Model configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html)
— Compare the models and see the full effort mapping table
* [Membership Benefits](https://www.kimi.com/code/docs/en/kimi-code/membership.html)
— Confirm which models are available for your plan
---
# Quick Start | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/getting-started.html#VPContent)
On this page
Quick Start [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/getting-started.html#quick-start)
=========================================================================================================
Kimi Code for VS Code is an extension integrated into Visual Studio Code. After installation, you can ask questions directly within the editor, review code diffs, and quickly commit changes. The extension can read the content of files you reference and display modification suggestions through a visual interface, executing them after your confirmation. The entire workflow is under your control while significantly improving development efficiency.

This extension provides a native chat panel in VS Code, supporting referencing files or folders via the `@` symbol, executing project scans and context management via `/` commands, diff views showing file changes with rollback support, and integrating MCP servers to call external tools. The chat panel can be placed in the activity bar, sidebar, or as a standalone tab.
Before Installation [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/getting-started.html#before-installation)
-------------------------------------------------------------------------------------------------------------------------
You need a Kimi account subscription or a Kimi API key.
Installation [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/getting-started.html#installation)
-----------------------------------------------------------------------------------------------------------
Install via [VS Code Marketplace](vscode:extension/moonshot-ai.kimi-code)
.
If the extension doesn't appear after installation, please restart VS Code or execute "Developer: Reload Window" in the command palette (Mac: Cmd+Shift+P, Windows/Linux: Ctrl+Shift+P).
Authentication [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/getting-started.html#authentication)
---------------------------------------------------------------------------------------------------------------
Kimi Code supports two authentication modes:
**Kimi Account Mode**: Click the login button, and the browser will open the authorization page. After completing the authorization flow, return to VS Code.
**API Key Mode**: If you have already configured an API key, you can click to skip login. The extension will run in this mode.

You can switch authentication modes at any time via the gear icon. After logging out, you will return to the login screen.
Typical Workflows [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/getting-started.html#typical-workflows)
---------------------------------------------------------------------------------------------------------------------
**Code Reading**: Type `@` to select a file or folder, request an explanation of the code flow, and continue asking follow-up questions.
**Refactoring**: Reference target code such as `@src/feature/`, request a refactoring plan, review the diff and selectively approve, using rollback when necessary.
**Debugging**: Paste error messages or stack traces, reference related files, request diagnosis and fixes, then approve the proposed changes.
**Project Overview**: Reference a folder such as `@src/services/`, request a module map or architecture summary, and continue asking about dependencies or weak points.
Commands and Shortcuts [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/getting-started.html#commands-and-shortcuts)
-------------------------------------------------------------------------------------------------------------------------------
| Shortcut | Function |
| --- | --- |
| `Ctrl+Shift+K` / `Cmd+Shift+K` | Focus Kimi input box |
| `Alt+K` | Insert current file reference |
| `Ctrl+N` / `Cmd+N` | New conversation (requires `kimi.enableNewConversationShortcut` to be enabled; enabling this will occupy the system's default "New File" shortcut) |
| `↑` / `↓` | Browse input history in the input box |
Type "Kimi Code" in the command palette to access more commands: open in new tab, open in sidebar, new conversation, etc.
Next Steps [](https://www.kimi.com/code/docs/en/kimi-code-for-vscode/getting-started.html#next-steps)
-------------------------------------------------------------------------------------------------------
* [Core Operations](https://www.kimi.com/code/docs/kimi-code-for-vscode/core-operations.html)
– Learn chat panel usage, context management, and diff review
* [Customization](https://www.kimi.com/code/docs/kimi-code-for-vscode/customization.html)
– Explore Skills, Hooks, and MCP extensions
* [Configuration](https://www.kimi.com/code/docs/kimi-code-for-vscode/configuration.html)
– Customize authentication, models, and behavior settings
---
# Claude Code | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#VPContent)
On this page
Claude Code [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#claude-code)
=============================================================================================
> [Claude Code](https://docs.anthropic.com/en/docs/claude-code)
> is a programming agent product from Anthropic. Its interface, configuration options, and supported capabilities may change across versions. This guide describes a general integration approach: forwarding Claude Code model requests to the Kimi Code API through environment variables.
Before You Start [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#before-you-start)
-------------------------------------------------------------------------------------------------------
* Make sure you have subscribed to [Kimi membership](https://www.kimi.com/membership/pricing?from=)
and activated Kimi Code benefits.
* Obtain an API Key:
1. Go to the [Kimi Code Console](https://www.kimi.com/code/console)
;
2. Click "Create API Key", enter a name and confirm;
3. Copy the generated key and keep it safe (the full key cannot be viewed again after closing the dialog).

Configuration [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#configuration)
-------------------------------------------------------------------------------------------------
[Claude Code](https://docs.anthropic.com/en/docs/claude-code)
is a command-line programming assistant launched by Anthropic. By configuring environment variables to connect it to Kimi's API endpoint, you can directly call Kimi Code's AI capabilities within Claude Code and enjoy the Kimi Code programming experience in a familiar terminal interface.
① **Install Claude Code**
For installation instructions, please refer to the [Claude Code official documentation](https://docs.anthropic.com/en/docs/claude-code/getting-started)
.
│
② **Run Script to Skip Login**
After installation, do not start Claude directly. Execute the following script in the terminal first to skip Anthropic's default login flow and clean up historical configuration:
sh
node --eval "
// enable third party model support and fast mode
const claudeJsonFilePath = path.join(os.homedir(), '.claude.json');
if (fs.existsSync(claudeJsonFilePath)) {
const content = JSON.parse(fs.readFileSync(claudeJsonFilePath, 'utf-8'));
fs.writeFileSync(claudeJsonFilePath, JSON.stringify({ ...content, penguinModeOrgEnabled: true, hasCompletedOnboarding: true }, null, 2), 'utf-8');
} else {
fs.writeFileSync(claudeJsonFilePath, JSON.stringify({ penguinModeOrgEnabled: true, hasCompletedOnboarding: true }), 'utf-8');
}
// delete old endpoint, credential and model id
const claudeSettingsJsonFilePath = path.join(os.homedir(), '.claude', 'settings.json');
if (fs.existsSync(claudeSettingsJsonFilePath)) {
const content = JSON.parse(fs.readFileSync(claudeSettingsJsonFilePath, 'utf-8'));
if (typeof content === 'object' && typeof content.env === 'object') {
for (const element of [\
'ANTHROPIC_BASE_URL',\
'ANTHROPIC_API_KEY',\
'ANTHROPIC_AUTH_TOKEN',\
'ANTHROPIC_MODEL',\
'ANTHROPIC_SMALL_FAST_MODEL',\
'CLAUDE_CODE_SUBAGENT_MODEL',\
'ANTHROPIC_DEFAULT_FABLE_MODEL',\
'ANTHROPIC_DEFAULT_FABLE_MODEL_NAME',\
'ANTHROPIC_DEFAULT_OPUS_MODEL',\
'ANTHROPIC_DEFAULT_OPUS_MODEL_NAME',\
'ANTHROPIC_DEFAULT_SONNET_MODEL',\
'ANTHROPIC_DEFAULT_SONNET_MODEL_NAME',\
'ANTHROPIC_DEFAULT_HAIKU_MODEL',\
'ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME',\
'ENABLE_TOOL_SEARCH',\
'CLAUDE_CODE_AUTO_COMPACT_WINDOW',\
'CLAUDE_CODE_EFFORT_LEVEL',\
]) {
delete content.env[element];
}
fs.writeFileSync(claudeSettingsJsonFilePath, JSON.stringify(content, null, 2), 'utf-8');
}
}
"
The settings.json cleanup part only removes endpoint, credential, and model-related entries under `env` (leftovers there **override** environment variables exported in the terminal) — other settings are untouched. Also check `~/.zshrc`, `~/.bashrc`, and other shell config files for leftover `ANTHROPIC_*` exports (Windows users should check user environment variables) and remove them as well.
│
③ **Configure API Access**
Recommended model launch
**K2.8 Preview** is now fully rolled out in Kimi Code — `kimi-for-coding` is upgraded in place with no configuration changes: performance close to K3, with `low` / `high` / `max` thinking effort levels and up to 1M context. See [What's New](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html)
.
First check your membership tier to confirm which models and context windows you can use (see [Membership Benefits](https://www.kimi.com/code/docs/en/kimi-code/membership.html#plan-comparison)
for a comparison of the legacy and new plans):
| Plan | Available Models | Available Context Limit |
| --- | --- | --- |
| Go (new plans) | No coding quota | — |
| Andante (legacy plans) | `kimi-for-coding` | `1048576` |
| Plus / Moderato | `k3` `k3-256k` `kimi-for-coding` | `k3`: `262144` `k3-256k`: `262144` `kimi-for-coding`: `1048576` |
| Pro and above / Allegretto and above | `k3` `k3-256k` `kimi-for-coding` `kimi-for-coding-highspeed` | `k3`: `1048576` `k3-256k`: `262144` `kimi-for-coding`: `1048576` `kimi-for-coding-highspeed`: `262144` |
Two configuration methods are available — **pick one, do not mix them**: Method 1 writes to the settings.json config file and takes effect permanently regardless of how Claude Code is launched; Method 2 exports variables in the current terminal only, effective for that session.
**Method 1: Write to settings.json (recommended, persistent)**
The path of settings.json:
macOS / LinuxWindows
text
~/.claude/settings.json
text
C:\Users\\.claude\settings.json
Write the following into the `env` field of that file (create the file if it does not exist):
K3-256KK3 1M context
json
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.kimi.ai/coding/",
"ANTHROPIC_API_KEY": "Your API Key",
"ANTHROPIC_MODEL": "k3-256k",
"ANTHROPIC_DEFAULT_FABLE_MODEL": "k3-256k",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "k3-256k",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "k3-256k",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "k3-256k",
"CLAUDE_CODE_SUBAGENT_MODEL": "k3-256k",
"CLAUDE_CODE_EFFORT_LEVEL": "high",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "262144",
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "262144"
}
}
json
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.kimi.ai/coding/",
"ANTHROPIC_API_KEY": "Your API Key",
"ANTHROPIC_MODEL": "k3[1m]",
"ANTHROPIC_DEFAULT_FABLE_MODEL": "k3[1m]",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "k3[1m]",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "k3[1m]",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "k3[1m]",
"CLAUDE_CODE_SUBAGENT_MODEL": "k3[1m]",
"CLAUDE_CODE_EFFORT_LEVEL": "high",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1048576",
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "1048576"
}
}
Restart Claude Code after saving for the changes to take effect.
Plaintext key risk
The API Key in `settings.json` is stored in plaintext — do not commit this file to a version-control repository or share it publicly with dotfiles. The file's `env` field **overrides** same-named variables exported in the terminal.
**Method 2: Terminal environment variables (current session only)**
**K3-256K configuration:**
macOS / LinuxWindows
sh
export ANTHROPIC_BASE_URL=https://api.kimi.ai/coding/
export ANTHROPIC_API_KEY=Your API Key
export ANTHROPIC_MODEL="k3-256k"
export ANTHROPIC_DEFAULT_FABLE_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_OPUS_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_SONNET_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_HAIKU_MODEL=$ANTHROPIC_MODEL
export CLAUDE_CODE_SUBAGENT_MODEL=$ANTHROPIC_MODEL
export CLAUDE_CODE_EFFORT_LEVEL=high
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=262144
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=262144
claude
powershell
$env:ANTHROPIC_BASE_URL="https://api.kimi.ai/coding/"
$env:ANTHROPIC_API_KEY="Your API Key"
$env:ANTHROPIC_MODEL="k3-256k"
$env:ANTHROPIC_DEFAULT_FABLE_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_OPUS_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_SONNET_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL=$env:ANTHROPIC_MODEL
$env:CLAUDE_CODE_SUBAGENT_MODEL=$env:ANTHROPIC_MODEL
$env:CLAUDE_CODE_EFFORT_LEVEL="high"
$env:CLAUDE_CODE_AUTO_COMPACT_WINDOW="262144"
$env:CLAUDE_CODE_MAX_CONTEXT_TOKENS="262144"
claude
**K3 1M context** configuration:
The `k3[1m]` form is only needed for Claude Code env vars
`k3[1m]` (with the surrounding quotes) explicitly tells Claude Code to use a 1M context window. In any other scenario — API requests, the Model ID field of other third-party tools — just use `k3`.
macOS / LinuxWindows
sh
export ANTHROPIC_BASE_URL=https://api.kimi.ai/coding/
export ANTHROPIC_API_KEY=Your API Key
export ANTHROPIC_MODEL="k3[1m]"
export ANTHROPIC_DEFAULT_FABLE_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_OPUS_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_SONNET_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_HAIKU_MODEL=$ANTHROPIC_MODEL
export CLAUDE_CODE_SUBAGENT_MODEL=$ANTHROPIC_MODEL
export CLAUDE_CODE_EFFORT_LEVEL=high
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=1048576
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=1048576
claude
powershell
$env:ANTHROPIC_BASE_URL="https://api.kimi.ai/coding/"
$env:ANTHROPIC_API_KEY="Your API Key"
$env:ANTHROPIC_MODEL="k3[1m]"
$env:ANTHROPIC_DEFAULT_FABLE_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_OPUS_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_SONNET_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL=$env:ANTHROPIC_MODEL
$env:CLAUDE_CODE_SUBAGENT_MODEL=$env:ANTHROPIC_MODEL
$env:CLAUDE_CODE_EFFORT_LEVEL="high"
$env:CLAUDE_CODE_AUTO_COMPACT_WINDOW="1048576"
$env:CLAUDE_CODE_MAX_CONTEXT_TOKENS="1048576"
claude
### Configuration Reference [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#configuration-reference)
Claude Code internally uses different model tiers for different scenarios (main conversation, background summarization, sub-agents, etc.). Configuring only some of these variables will silently break the corresponding scenarios:
| Variable | Purpose | Impact if missing or misconfigured |
| --- | --- | --- |
| `ANTHROPIC_BASE_URL` | Routes model requests to the Kimi Code endpoint | Requests go to Anthropic's official endpoint and fail authentication |
| `ANTHROPIC_API_KEY` | Authenticates with your Kimi Code API Key | Returns a 401 authentication error |
| `ANTHROPIC_MODEL` | The model used for the main conversation | Falls back to Claude's default model name, which the Kimi Code endpoint does not recognize — model-not-found error |
| `ANTHROPIC_DEFAULT_OPUS_MODEL` / `ANTHROPIC_DEFAULT_SONNET_MODEL` / `ANTHROPIC_DEFAULT_HAIKU_MODEL` / `ANTHROPIC_DEFAULT_FABLE_MODEL` | Model names Claude Code picks for each task tier | Tasks on those tiers (e.g., haiku-tier background title generation and summarization) fail |
| `CLAUDE_CODE_SUBAGENT_MODEL` | The model used by sub-agents | Sub-agent tasks fail or degrade noticeably |
| `CLAUDE_CODE_AUTO_COMPACT_WINDOW` | Window size that triggers automatic context compaction | Must match the model's context: `1048576` for `k3[1m]`, `262144` for the others. Too small compacts too early and loses context; too large triggers context-overflow errors |
| `CLAUDE_CODE_MAX_CONTEXT_TOKENS` | Maximum context token budget | Same as above — must match the selected model's context window |
| `CLAUDE_CODE_EFFORT_LEVEL` | Default thinking effort level; `high` is recommended for K3 | Lower values may reduce quality on complex tasks |
When switching models, replace the value of every model variable in your configuration with the new model name.
### Switching thinking effort [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#switching-thinking-effort)
After starting, type `/effort` in a session to switch thinking effort levels — no environment variable needed. Both K3 and K2.8 Preview support `low` / `high` / `max` with identical levels; the mapping from Claude Code levels to actual levels is:
| Claude Code level | Actual level |
| --- | --- |
| `low` | `low` |
| `medium` | `high` (recommended) |
| `high` | `high` (recommended) |
| `xhigh` | `max` |
| `max` | `max` |
| Not set (default) | `high` (K3) / `max` (K2.8 Preview) |
Note
With thinking disabled, requests to the K3 series and K2.8 Preview are served by K2.8 Preview (no thinking); the thinking shortcut is `Option+T` on macOS and `Alt+T` on Windows / Linux.
> If prompted whether to use this API key, confirm to proceed. Afterwards, follow the prompts to select your trusted project folder to complete the authorization.
>
> 
│
④ **Verify After Starting**
After starting, enter `/status`. If the returned information shows Base URL as `https://api.kimi.ai/coding/`, the configuration is successful. Even if the model name still appears as a Claude model, the actual calls are still made to the Kimi Code API.

│
Using the VS Code Extension [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#using-the-vs-code-extension)
-----------------------------------------------------------------------------------------------------------------------------
The extension ships with its own Claude Code binary and shares the config files under `~/.claude` with the CLI. Follow these steps:
1. Complete the API setup in [Configuration](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#configuration)
above.
2. Open the extension and start a new session. When the login page appears, click **Run `claude` in terminal** at the bottom:

3. In the terminal that opens, complete two confirmations: choose **Yes, I trust this folder** for the workspace, then **1\. Yes** to confirm your API key:

4. **Quit VS Code completely** (`Cmd+Q` on macOS) and reopen it — the extension is ready to use.
Without this terminal confirmation, the extension lacks the API key confirmation record and the login page pops up repeatedly when you send a message.
FAQ [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#faq)
-----------------------------------------------------------------------------
### Changes to the configuration don't take effect [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#changes-to-the-configuration-don-t-take-effect)
Check whether `~/.claude/settings.json` has leftover entries under `env` (they override terminal environment variables) — you can run the cleanup script from Step ②. Also note that variables exported in a terminal only apply to that session and must be set again after opening a new terminal; if you wrote to `settings.json`, make sure you restarted Claude Code after editing.
### 401 authentication error [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#_401-authentication-error)
Check whether `ANTHROPIC_API_KEY` is a valid Kimi Code API Key — note that the full key is only shown once at creation time.
### Model not found [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#model-not-found)
Check the spelling of each model variable (e.g. `k3-256k`, `k3[1m]`), and make sure there are no extra spaces or quotes.
### Background tasks or sub-agents fail [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#background-tasks-or-sub-agents-fail)
Usually `ANTHROPIC_DEFAULT_HAIKU_MODEL`, `ANTHROPIC_DEFAULT_FABLE_MODEL`, or `CLAUDE_CODE_SUBAGENT_MODEL` is not configured — the corresponding scenario requested a model name the Kimi Code endpoint does not recognize. See the [Configuration Reference](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#configuration-reference)
and fill in the missing entries.
### The VS Code extension keeps showing the login page [](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#the-vs-code-extension-keeps-showing-the-login-page)
The extension is missing the API key confirmation record. Click **Run `claude` in terminal** at the bottom of the login page, complete the trust-folder and API key confirmations in the terminal, then **quit VS Code completely** (`Cmd+Q` on macOS) and reopen. See [Using the VS Code Extension](https://www.kimi.com/code/docs/en/third-party-tools/claude-code#using-the-vs-code-extension)
.
---
# 在 IDE 中使用 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-cli/guides/ides.html#VPContent)
On this page
在 IDE 中使用 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/ides.html#%E5%9C%A8-ide-%E4%B8%AD%E4%BD%BF%E7%94%A8)
=======================================================================================================================
Kimi Code CLI 支持通过 [Agent Client Protocol (ACP)](https://agentclientprotocol.com/)
集成到 IDE 中,让你在编辑器内直接使用 AI 辅助编程。
前置准备 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/ides.html#%E5%89%8D%E7%BD%AE%E5%87%86%E5%A4%87)
-------------------------------------------------------------------------------------------------------------
在配置 IDE 之前,请确保已安装 Kimi Code CLI 并完成登录配置。
ACP server 以子命令 `kimi acp` 暴露,IDE 通过子进程方式启动它,并在标准输入/输出上跑 JSON-RPC。每次 IDE 创建会话时,CLI 会复用它的鉴权状态——不需要重复登录。
路径提示
macOS 下从 IDE GUI 启动的子进程通常**不会**继承终端 shell 的 `PATH`,所以如果 `kimi` 不在 `/usr/local/bin` 这类系统目录里,IDE 配置中要使用绝对路径。终端里运行 `which kimi` 可以查到当前生效的路径。
在 Zed 中使用 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/ides.html#%E5%9C%A8-zed-%E4%B8%AD%E4%BD%BF%E7%94%A8)
-----------------------------------------------------------------------------------------------------------------------
[Zed](https://zed.dev/)
是一个原生支持 ACP 的现代编辑器。
在 Zed 的配置文件 `~/.config/zed/settings.json` 中添加:
json
{
"agent_servers": {
"Kimi Code CLI": {
"type": "custom",
"command": "kimi",
"args": ["acp"],
"env": {}
}
}
}
配置说明:
* `type`:固定值 `"custom"`
* `command`:Kimi Code CLI 的可执行路径。如果 `kimi` 不在 PATH 中,请使用完整路径(例如 `/Users/you/.local/bin/kimi`)。
* `args`:启动参数。`acp` 子命令切换到 ACP 模式。
* `env`:附加环境变量,通常留空即可。Zed 会自动注入一份默认环境。
保存配置后,在 Zed 的 Agent 面板里新建一次对话,就会以你刚才配置的 `Kimi Code CLI` 启动一个 ACP 子进程。Zed 在 `agent_servers` 这层声明的 MCP 服务也会通过 ACP 协议转发到 kimi 这一侧。
在 JetBrains IDE 中使用 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/ides.html#%E5%9C%A8-jetbrains-ide-%E4%B8%AD%E4%BD%BF%E7%94%A8)
-------------------------------------------------------------------------------------------------------------------------------------------
JetBrains 系列 IDE(IntelliJ IDEA、PyCharm、WebStorm 等)通过 AI 聊天插件支持 ACP。
如果没有 JetBrains AI 订阅,可以在注册表中启用 `llm.enable.mock.response`,便于在仅使用 ACP 的场景里访问 AI 聊天面板。连按两次 Shift 搜索 "Registry / 注册表" 即可打开。
在 AI 聊天面板的菜单中点击 "Configure ACP agents",添加以下配置:
json
{
"agent_servers": {
"Kimi Code CLI": {
"command": "~/.local/bin/kimi",
"args": ["acp"],
"env": {}
}
}
}
JetBrains 这一侧对 `command` 字段处理较严格——务必填写**绝对路径**,可以在终端执行 `which kimi` 拿到。保存后,AI 聊天的 Agent 选择器里就会出现 `Kimi Code CLI`。
在 Paseo 中使用 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/ides.html#%E5%9C%A8-paseo-%E4%B8%AD%E4%BD%BF%E7%94%A8)
---------------------------------------------------------------------------------------------------------------------------
[Paseo](https://paseo.sh/)
是一个自托管的编排器,能在桌面、网页和手机上统一启动并接管各类 agent 的 CLI。它和 IDE 一样,通过 ACP 接入 Kimi Code CLI。
在 Paseo 内置的 ACP provider 目录里选择 **Kimi Code CLI**,或在 `~/.paseo/config.json` 里添加一个自定义 provider:
json
{
"agents": {
"providers": {
"kimi": {
"extends": "acp",
"label": "Kimi Code CLI",
"command": ["kimi", "acp"]
}
}
}
}
Paseo 的通用 ACP 适配层不会帮你走登录流程,所以请先完成终端登录(见[前置准备](https://www.kimi.com/code/docs/kimi-code-cli/guides/ides.html#%E5%89%8D%E7%BD%AE%E5%87%86%E5%A4%87)
)——否则创建会话会以 `Authentication required` 失败。
故障排查 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/ides.html#%E6%95%85%E9%9A%9C%E6%8E%92%E6%9F%A5)
-------------------------------------------------------------------------------------------------------------
* **会话立刻被中断 / IDE 提示 "agent exited"**:通常是 `command` 路径不对或 kimi 没登录。先在终端跑一次 `kimi acp` 验证:如果阻塞等待标准输入则说明 CLI 本身没问题,问题在 IDE 配置;如果立刻报错则按报错提示处理(多数是没 `/login`)。
* **IDE 显示 "auth required"**:表示 CLI 没有可用的鉴权令牌。退出 IDE,在终端执行 `kimi` 完成登录后再启动 IDE 即可。
* **MCP 工具看不到**:参考 [`kimi acp`](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-acp.html)
中的能力表确认 IDE 配的 MCP 传输类型是否被支持。当前 Kimi Code CLI 的 ACP server 支持 `http`、`stdio` 与 `sse` 三种传输方式;`acp` 传输的 MCP server 会被静默丢弃并在日志中给出 warn。
下一步 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/ides.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
---------------------------------------------------------------------------------------------------
* [kimi acp 参考](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-acp.html)
— ACP 能力矩阵和方法覆盖详情
* [kimi 命令参考](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html)
— 完整子命令列表
---
# Using Kimi in OpenCode | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/third-party-tools/opencode#VPContent)
On this page
Using Kimi in OpenCode [](https://www.kimi.com/code/docs/en/third-party-tools/opencode#using-kimi-in-opencode)
================================================================================================================
[OpenCode](https://opencode.ai/)
is a terminal-based coding agent. This guide shows how to forward OpenCode model requests to Kimi For Coding via built-in authentication, with K3 or K2.8 Preview providing the model inference.
Install OpenCode [](https://www.kimi.com/code/docs/en/third-party-tools/opencode#install-opencode)
----------------------------------------------------------------------------------------------------
The easiest way to install OpenCode is through the installation script:
bash
curl -fsSL https://opencode.ai/install | bash
Or install via npm:
bash
npm install -g opencode-ai
Configure API key [](https://www.kimi.com/code/docs/en/third-party-tools/opencode#configure-api-key)
------------------------------------------------------------------------------------------------------
Run `opencode auth login` and select **Kimi For Coding** from the provider list:
bash
$ opencode auth login
┌ Add credentials
│
◆ Select provider
│ ● Kimi For Coding
│ ...
└
Enter your Kimi For Coding API Key:
bash
$ opencode auth login
┌ Add credentials
│
◇ Select provider
│ Kimi For Coding
│
◇ Enter your API key
│ _
└
> API Keys can be created and managed in the [Kimi Code Console](https://www.kimi.com/code/console)
> (up to 5 keys; each key is shown only once at creation).
Launch and use [](https://www.kimi.com/code/docs/en/third-party-tools/opencode#launch-and-use)
------------------------------------------------------------------------------------------------
After configuring, start OpenCode:
bash
$ opencode
Type `/models` in a session:
bash
/models
Pick a model under the **Kimi For Coding** list.
Recommended model launch
**K2.8 Preview** is now fully rolled out in Kimi Code — `kimi-for-coding` is upgraded in place with no configuration changes: performance close to K3, with `low` / `high` / `max` thinking effort levels and up to 1M context. See [What's New](https://www.kimi.com/code/docs/en/kimi-code/whats-new.html)
.
Before you start, check your membership tier and what it entitles you to (see [Membership Benefits](https://www.kimi.com/code/docs/en/kimi-code/membership.html#plan-comparison)
for a comparison of the legacy and new plans) — calling models or context windows beyond your plan will fail with an error:
| Tier | Available models | Context window |
| --- | --- | --- |
| Go (new plans) | No coding quota | — |
| Andante (legacy plans) | K2.8 Preview | `1048576` |
| Plus / Moderato | K3 K3-256K K2.8 Preview | K3: `262144` K3-256K: `262144` K2.8 Preview: `1048576` |
| Pro and above / Allegretto and above | K3 K3-256K K2.8 Preview K2.7 Code HighSpeed | K3: `1048576` K3-256K: `262144` K2.8 Preview: `1048576` K2.7 Code HighSpeed: `262144` |
With K3 or K2.8 Preview selected, type `/variants` to switch the thinking effort:
bash
/variants
Thinking effort mapping
OpenCode offers the variants `Default` / `low` / `high` / `max`, mapped to K3's actual effort levels as follows (full mapping table in [Model configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html#switch-model)
):
| OpenCode variant | K3 actual effort |
| --- | --- |
| `Default` | `high` (K3) / `max` (K2.8 Preview) |
| `low` | `low` |
| `high` | `high` (recommended) |
| `max` | `max` |
Both K3 and K2.8 Preview support `low` / `high` / `max`; K2.7 Code HighSpeed does not require this setting.
See [Model configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html)
for model capabilities and setup details.
Next steps [](https://www.kimi.com/code/docs/en/third-party-tools/opencode#next-steps)
----------------------------------------------------------------------------------------
* [Model configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html)
— Compare the models and see the full effort mapping table
* [Membership Benefits](https://www.kimi.com/code/docs/en/kimi-code/membership.html)
— Confirm which models are available for your plan
---
# Using Kimi in Codex | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/third-party-tools/codex#VPContent)
On this page
Using Kimi in Codex [](https://www.kimi.com/code/docs/en/third-party-tools/codex#using-kimi-in-codex)
=======================================================================================================
[Codex](https://openai.com/codex/)
is OpenAI's coding agent. The Kimi Code server natively supports the OpenAI Responses API (streaming and non-streaming, reasoning, and function calling all work), so Codex CLI and the Codex desktop app can connect directly with a custom model provider — no local routing or protocol-translation tool is needed. This guide covers the configuration.
> The OpenAI Responses API supports text and image input, but not video input. To analyze video, extract key frames with ffmpeg first.
Membership [](https://www.kimi.com/code/docs/en/third-party-tools/codex#membership)
-------------------------------------------------------------------------------------
Before configuring, check your membership tier (see [Membership Benefits](https://www.kimi.com/code/docs/en/kimi-code/membership.html#plan-comparison)
for a comparison of the legacy and new plans) and pick a model from the table below:
| Tier | Available models | Context window |
| --- | --- | --- |
| Go (new plans) | No coding quota | — |
| Andante (legacy plans) | `kimi-for-coding` | `1048576` |
| Plus / Moderato | `k3` `k3-256k` `kimi-for-coding` | `k3`: `262144` `k3-256k`: `262144` `kimi-for-coding`: `1048576` |
| Pro and above / Allegretto and above | `k3` `k3-256k` `kimi-for-coding` `kimi-for-coding-highspeed` | `k3`: `1048576` `k3-256k`: `262144` `kimi-for-coding`: `1048576` `kimi-for-coding-highspeed`: `262144` |
Prerequisites [](https://www.kimi.com/code/docs/en/third-party-tools/codex#prerequisites)
-------------------------------------------------------------------------------------------
1. Create and save an API Key in the [Kimi Code Console](https://www.kimi.com/code/console)
.
2. Install Codex CLI:
bash
npm install -g @openai/codex
Step 1: Create the model catalog models.json [](https://www.kimi.com/code/docs/en/third-party-tools/codex#step-1-create-the-model-catalog-models-json)
--------------------------------------------------------------------------------------------------------------------------------------------------------
Create `models.json` in the Codex config directory:
macOS / LinuxWindows
text
~/.codex/models.json
text
C:\Users\\.codex\models.json
Write the following content (K3 series models shown as an example):
json
{
"models": [\
{\
"slug": "k3",\
"display_name": "K3",\
"description": "K3, 1M context",\
"default_reasoning_level": "high",\
"supported_reasoning_levels": [\
{ "effort": "low", "description": "Light reasoning" },\
{ "effort": "high", "description": "Enhanced reasoning" },\
{ "effort": "max", "description": "Deep reasoning" }\
],\
"shell_type": "shell_command",\
"visibility": "list",\
"supported_in_api": true,\
"priority": 0,\
"base_instructions": "",\
"supports_reasoning_summaries": true,\
"default_reasoning_summary": "none",\
"support_verbosity": false,\
"truncation_policy": { "mode": "bytes", "limit": 10000 },\
"context_window": 1048576,\
"max_context_window": 1048576,\
"effective_context_window_percent": 95,\
"supports_parallel_tool_calls": true,\
"experimental_supported_tools": [],\
"input_modalities": ["text", "image"]\
},\
{\
"slug": "k3-256k",\
"display_name": "K3 256K",\
"description": "K3 256K context",\
"default_reasoning_level": "high",\
"supported_reasoning_levels": [\
{ "effort": "low", "description": "Light reasoning" },\
{ "effort": "high", "description": "Enhanced reasoning" },\
{ "effort": "max", "description": "Deep reasoning" }\
],\
"shell_type": "shell_command",\
"visibility": "list",\
"supported_in_api": true,\
"priority": 1,\
"base_instructions": "",\
"supports_reasoning_summaries": true,\
"default_reasoning_summary": "none",\
"support_verbosity": false,\
"truncation_policy": { "mode": "bytes", "limit": 10000 },\
"context_window": 262144,\
"max_context_window": 262144,\
"effective_context_window_percent": 95,\
"supports_parallel_tool_calls": true,\
"experimental_supported_tools": [],\
"input_modalities": ["text", "image"]\
}\
]
}
Step 2: Write config.toml [](https://www.kimi.com/code/docs/en/third-party-tools/codex#step-2-write-config-toml)
------------------------------------------------------------------------------------------------------------------
Path of the Codex CLI config file:
macOS / LinuxWindows
text
~/.codex/config.toml
text
C:\Users\\.codex\config.toml
Write the following content (create the file if it does not exist):
toml
model = "k3-256k"
model_provider = "kimi"
web_search = "live"
model_catalog_json = "~/.codex/models.json"
[model_providers.kimi]
name = "Kimi"
base_url = "https://api.kimi.ai/coding/v1"
env_key = "KIMI_API_KEY"
wire_api = "responses"
[desktop]
enabled-reasoning-efforts = ["low", "high", "max"]
Field reference:
| Field | Description |
| --- | --- |
| `model` | Default model. `k3-256k` is recommended (more quota-friendly); use `k3` when you need the 1M context window |
| `model_provider` | Default provider, matching the `[model_providers.kimi]` table below |
| `web_search` | Web search switch. The Kimi Code endpoint supports web search; set to `"live"` to enable real-time search |
| `model_catalog_json` | Path of the model catalog created in the previous step, declaring each model's context window and image input support |
| `base_url` | Kimi Code API address — China `https://api.kimi.com/coding/v1`, Overseas `https://api.kimi.ai/coding/v1` |
| `env_key` | The **name** of the environment variable holding the API Key (`KIMI_API_KEY` here — the Key itself goes elsewhere). Codex reads the secret from this variable at startup; you set its value in the next step |
| `wire_api` | Wire protocol, must be `"responses"` to use the Responses API |
| `enabled-reasoning-efforts` | Reasoning levels shown in the desktop model picker; desktop only — the CLI does not need this |
Step 3: Set the API Key [](https://www.kimi.com/code/docs/en/third-party-tools/codex#step-3-set-the-api-key)
--------------------------------------------------------------------------------------------------------------
The recommended approach is an environment variable (the `env_key` above): the config file contains no plaintext secret, so it can be shared and backed up safely. This is also the officially recommended approach by Codex.
Pick the command for your operating system:
macOSLinuxWindows
sh
echo 'export KIMI_API_KEY="sk-kimi-your-key"' >> ~/.zshrc
source ~/.zshrc
sh
echo 'export KIMI_API_KEY="sk-kimi-your-key"' >> ~/.bashrc
source ~/.bashrc
powershell
setx KIMI_API_KEY "sk-kimi-your-key"
One more step is required for the Codex desktop app: apps launched from the Dock or Finder do not inherit environment variables from your terminal, so the Key must be injected into the current user session. Run in a terminal:
sh
launchctl setenv KIMI_API_KEY "sk-kimi-your-key"
After running it, **fully quit** the desktop app (Cmd+Q) and reopen it for the change to take effect. Note: the variable does not survive a reboot — run the command again after restarting. Windows does not need this step: `setx` writes a system environment variable, and restarting the app is enough.
### Alternative: write the Key into the config (experimental\_bearer\_token) [](https://www.kimi.com/code/docs/en/third-party-tools/codex#alternative-write-the-key-into-the-config-experimental-bearer-token)
If environment variables do not take effect (for example, GUI apps cannot read them, or CI environments make injection inconvenient), use `experimental_bearer_token` to write the Key directly into the provider config, replacing `env_key`:
toml
[model_providers.kimi]
name = "Kimi"
base_url = "https://api.kimi.ai/coding/v1"
wire_api = "responses"
experimental_bearer_token = "sk-kimi-your-key"
Plaintext secret risk
With this approach the Key is stored in **plaintext** in the config file. Do not commit the file to a version-control repository or share it publicly in dotfiles — weigh the trade-off yourself. Do not configure `env_key` and `experimental_bearer_token` at the same time.
Step 4: Launch and verify [](https://www.kimi.com/code/docs/en/third-party-tools/codex#step-4-launch-and-verify)
------------------------------------------------------------------------------------------------------------------
Open a new terminal, switch to the project directory, and start Codex:
bash
cd /path/to/your/project
codex
Send a `hello` message in the session — a normal reply means the configuration works.
Signs of a successful setup:
* The startup banner shows `model: k3-256k` (or your chosen model) and `provider: kimi`;
* The `Model metadata not found` warning no longer appears (models.json is in effect).
Using the Codex desktop app [](https://www.kimi.com/code/docs/en/third-party-tools/codex#using-the-codex-desktop-app)
-----------------------------------------------------------------------------------------------------------------------
The desktop app reads the same `~/.codex/models.json` and `~/.codex/config.toml` as the CLI. Follow the CLI configuration above through Step 3, then:
1. **(macOS only) Inject the environment variable**: GUI apps cannot read variables set in your terminal, so run the following command first to inject `KIMI_API_KEY` into the user session. On Windows, `setx` writes a system environment variable, so this step is not needed.
sh
launchctl setenv KIMI_API_KEY "sk-kimi-your-key"
2. **Restart the desktop app**: fully quit (Cmd+Q on macOS) and reopen it for the new configuration to load.
3. **Pick a model and start chatting**: select a Kimi model from the model picker in a new thread.
TIP
The desktop app automatically appends managed blocks (plugins, MCP servers, etc.) to `config.toml`. This is expected — your manually added Kimi Code configuration is preserved intact, and these auto-generated blocks should not be deleted.
Switching reasoning effort [](https://www.kimi.com/code/docs/en/third-party-tools/codex#switching-reasoning-effort)
---------------------------------------------------------------------------------------------------------------------
K3 supports three effort levels: `low` / `high` / `max`. In a Codex CLI session, type `/model` to re-select the current model, then choose a level from the **Select Reasoning Level** menu.
After switching, start a new session to avoid extra cost from stale context caches.
FAQ [](https://www.kimi.com/code/docs/en/third-party-tools/codex#faq)
-----------------------------------------------------------------------
### Error: Missing environment variable: KIMI\_API\_KEY [](https://www.kimi.com/code/docs/en/third-party-tools/codex#error-missing-environment-variable-kimi-api-key)
The current process cannot read the environment variable. Make sure it is written to the correct shell config file and open a new terminal; on macOS for the desktop app, use the `launchctl` method from Step 3. If it still fails, switch to `experimental_bearer_token`.
### codex exec cannot run tool commands [](https://www.kimi.com/code/docs/en/third-party-tools/codex#codex-exec-cannot-run-tool-commands)
In environments with a restricted user namespace (for example, bwrap reporting ENOSPC), Codex's default sandbox does not work. Add `--sandbox danger-full-access` to run tool commands: `codex exec --sandbox danger-full-access "your task"`. Note that this disables sandbox isolation — commands run directly in your real environment, so only use it with tasks from trusted sources.
Next steps [](https://www.kimi.com/code/docs/en/third-party-tools/codex#next-steps)
-------------------------------------------------------------------------------------
* [Model configuration](https://www.kimi.com/code/docs/kimi-code/models.html)
— compare model capabilities and see the full effort mapping table
* [Membership](https://www.kimi.com/code/docs/kimi-code/membership.html)
— check model availability and tier requirements
---
# Using Kimi in Codex | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#VPContent)
Return to top
Using Kimi in Codex [](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#using-kimi-in-codex)
============================================================================================================
[Codex](https://openai.com/codex/)
is OpenAI's coding agent. The Kimi Code server natively supports the OpenAI Responses API (streaming and non-streaming, reasoning, and function calling all work), so Codex CLI and the Codex desktop app can connect directly with a custom model provider — no local routing or protocol-translation tool is needed. This guide covers the configuration.
> The OpenAI Responses API supports text and image input, but not video input. To analyze video, extract key frames with ffmpeg first.
Membership [](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#membership)
------------------------------------------------------------------------------------------
Before configuring, check your membership tier (see [Membership Benefits](https://www.kimi.com/code/docs/en/kimi-code/membership.html#plan-comparison)
for a comparison of the legacy and new plans) and pick a model from the table below:
| Tier | Available models | Context window |
| --- | --- | --- |
| Go (new plans) | No coding quota | — |
| Andante (legacy plans) | `kimi-for-coding` | `1048576` |
| Plus / Moderato | `k3` `k3-256k` `kimi-for-coding` | `k3`: `262144` `k3-256k`: `262144` `kimi-for-coding`: `1048576` |
| Pro and above / Allegretto and above | `k3` `k3-256k` `kimi-for-coding` `kimi-for-coding-highspeed` | `k3`: `1048576` `k3-256k`: `262144` `kimi-for-coding`: `1048576` `kimi-for-coding-highspeed`: `262144` |
Prerequisites [](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#prerequisites)
------------------------------------------------------------------------------------------------
1. Create and save an API Key in the [Kimi Code Console](https://www.kimi.com/code/console)
.
2. Install Codex CLI:
bash
npm install -g @openai/codex
Step 1: Create the model catalog models.json [](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#step-1-create-the-model-catalog-models-json)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Create `models.json` in the Codex config directory:
macOS / LinuxWindows
text
~/.codex/models.json
text
C:\Users\\.codex\models.json
Write the following content (K3 series models shown as an example):
json
{
"models": [\
{\
"slug": "k3",\
"display_name": "K3",\
"description": "K3, 1M context",\
"default_reasoning_level": "high",\
"supported_reasoning_levels": [\
{ "effort": "low", "description": "Light reasoning" },\
{ "effort": "high", "description": "Enhanced reasoning" },\
{ "effort": "max", "description": "Deep reasoning" }\
],\
"shell_type": "shell_command",\
"visibility": "list",\
"supported_in_api": true,\
"priority": 0,\
"base_instructions": "",\
"supports_reasoning_summaries": true,\
"default_reasoning_summary": "none",\
"support_verbosity": false,\
"truncation_policy": { "mode": "bytes", "limit": 10000 },\
"context_window": 1048576,\
"max_context_window": 1048576,\
"effective_context_window_percent": 95,\
"supports_parallel_tool_calls": true,\
"experimental_supported_tools": [],\
"input_modalities": ["text", "image"]\
},\
{\
"slug": "k3-256k",\
"display_name": "K3 256K",\
"description": "K3 256K context",\
"default_reasoning_level": "high",\
"supported_reasoning_levels": [\
{ "effort": "low", "description": "Light reasoning" },\
{ "effort": "high", "description": "Enhanced reasoning" },\
{ "effort": "max", "description": "Deep reasoning" }\
],\
"shell_type": "shell_command",\
"visibility": "list",\
"supported_in_api": true,\
"priority": 1,\
"base_instructions": "",\
"supports_reasoning_summaries": true,\
"default_reasoning_summary": "none",\
"support_verbosity": false,\
"truncation_policy": { "mode": "bytes", "limit": 10000 },\
"context_window": 262144,\
"max_context_window": 262144,\
"effective_context_window_percent": 95,\
"supports_parallel_tool_calls": true,\
"experimental_supported_tools": [],\
"input_modalities": ["text", "image"]\
}\
]
}
Step 2: Write config.toml [](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#step-2-write-config-toml)
-----------------------------------------------------------------------------------------------------------------------
Path of the Codex CLI config file:
macOS / LinuxWindows
text
~/.codex/config.toml
text
C:\Users\\.codex\config.toml
Write the following content (create the file if it does not exist):
toml
model = "k3-256k"
model_provider = "kimi"
web_search = "live"
model_catalog_json = "~/.codex/models.json"
[model_providers.kimi]
name = "Kimi"
base_url = "https://api.kimi.ai/coding/v1"
env_key = "KIMI_API_KEY"
wire_api = "responses"
[desktop]
enabled-reasoning-efforts = ["low", "high", "max"]
Field reference:
| Field | Description |
| --- | --- |
| `model` | Default model. `k3-256k` is recommended (more quota-friendly); use `k3` when you need the 1M context window |
| `model_provider` | Default provider, matching the `[model_providers.kimi]` table below |
| `web_search` | Web search switch. The Kimi Code endpoint supports web search; set to `"live"` to enable real-time search |
| `model_catalog_json` | Path of the model catalog created in the previous step, declaring each model's context window and image input support |
| `base_url` | Kimi Code API address — China `https://api.kimi.com/coding/v1`, Overseas `https://api.kimi.ai/coding/v1` |
| `env_key` | The **name** of the environment variable holding the API Key (`KIMI_API_KEY` here — the Key itself goes elsewhere). Codex reads the secret from this variable at startup; you set its value in the next step |
| `wire_api` | Wire protocol, must be `"responses"` to use the Responses API |
| `enabled-reasoning-efforts` | Reasoning levels shown in the desktop model picker; desktop only — the CLI does not need this |
Step 3: Set the API Key [](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#step-3-set-the-api-key)
-------------------------------------------------------------------------------------------------------------------
The recommended approach is an environment variable (the `env_key` above): the config file contains no plaintext secret, so it can be shared and backed up safely. This is also the officially recommended approach by Codex.
Pick the command for your operating system:
macOSLinuxWindows
sh
echo 'export KIMI_API_KEY="sk-kimi-your-key"' >> ~/.zshrc
source ~/.zshrc
sh
echo 'export KIMI_API_KEY="sk-kimi-your-key"' >> ~/.bashrc
source ~/.bashrc
powershell
setx KIMI_API_KEY "sk-kimi-your-key"
One more step is required for the Codex desktop app: apps launched from the Dock or Finder do not inherit environment variables from your terminal, so the Key must be injected into the current user session. Run in a terminal:
sh
launchctl setenv KIMI_API_KEY "sk-kimi-your-key"
After running it, **fully quit** the desktop app (Cmd+Q) and reopen it for the change to take effect. Note: the variable does not survive a reboot — run the command again after restarting. Windows does not need this step: `setx` writes a system environment variable, and restarting the app is enough.
### Alternative: write the Key into the config (experimental\_bearer\_token) [](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#alternative-write-the-key-into-the-config-experimental-bearer-token)
If environment variables do not take effect (for example, GUI apps cannot read them, or CI environments make injection inconvenient), use `experimental_bearer_token` to write the Key directly into the provider config, replacing `env_key`:
toml
[model_providers.kimi]
name = "Kimi"
base_url = "https://api.kimi.ai/coding/v1"
wire_api = "responses"
experimental_bearer_token = "sk-kimi-your-key"
Plaintext secret risk
With this approach the Key is stored in **plaintext** in the config file. Do not commit the file to a version-control repository or share it publicly in dotfiles — weigh the trade-off yourself. Do not configure `env_key` and `experimental_bearer_token` at the same time.
Step 4: Launch and verify [](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#step-4-launch-and-verify)
-----------------------------------------------------------------------------------------------------------------------
Open a new terminal, switch to the project directory, and start Codex:
bash
cd /path/to/your/project
codex
Send a `hello` message in the session — a normal reply means the configuration works.
Signs of a successful setup:
* The startup banner shows `model: k3-256k` (or your chosen model) and `provider: kimi`;
* The `Model metadata not found` warning no longer appears (models.json is in effect).
Using the Codex desktop app [](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#using-the-codex-desktop-app)
----------------------------------------------------------------------------------------------------------------------------
The desktop app reads the same `~/.codex/models.json` and `~/.codex/config.toml` as the CLI. Follow the CLI configuration above through Step 3, then:
1. **(macOS only) Inject the environment variable**: GUI apps cannot read variables set in your terminal, so run the following command first to inject `KIMI_API_KEY` into the user session. On Windows, `setx` writes a system environment variable, so this step is not needed.
sh
launchctl setenv KIMI_API_KEY "sk-kimi-your-key"
2. **Restart the desktop app**: fully quit (Cmd+Q on macOS) and reopen it for the new configuration to load.
3. **Pick a model and start chatting**: select a Kimi model from the model picker in a new thread.
TIP
The desktop app automatically appends managed blocks (plugins, MCP servers, etc.) to `config.toml`. This is expected — your manually added Kimi Code configuration is preserved intact, and these auto-generated blocks should not be deleted.
Switching reasoning effort [](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#switching-reasoning-effort)
--------------------------------------------------------------------------------------------------------------------------
K3 supports three effort levels: `low` / `high` / `max`. In a Codex CLI session, type `/model` to re-select the current model, then choose a level from the **Select Reasoning Level** menu.
After switching, start a new session to avoid extra cost from stale context caches.
FAQ [](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#faq)
----------------------------------------------------------------------------
### Error: Missing environment variable: KIMI\_API\_KEY [](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#error-missing-environment-variable-kimi-api-key)
The current process cannot read the environment variable. Make sure it is written to the correct shell config file and open a new terminal; on macOS for the desktop app, use the `launchctl` method from Step 3. If it still fails, switch to `experimental_bearer_token`.
### codex exec cannot run tool commands [](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#codex-exec-cannot-run-tool-commands)
In environments with a restricted user namespace (for example, bwrap reporting ENOSPC), Codex's default sandbox does not work. Add `--sandbox danger-full-access` to run tool commands: `codex exec --sandbox danger-full-access "your task"`. Note that this disables sandbox isolation — commands run directly in your real environment, so only use it with tasks from trusted sources.
Next steps [](https://www.kimi.com/code/docs/en/third-party-tools/codex.html#next-steps)
------------------------------------------------------------------------------------------
* [Model configuration](https://www.kimi.com/code/docs/kimi-code/models.html)
— compare model capabilities and see the full effort mapping table
* [Membership](https://www.kimi.com/code/docs/kimi-code/membership.html)
— check model availability and tier requirements
---
# Using Kimi in Hermes Agent | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#VPContent)
Return to top
Using Kimi in Hermes Agent [](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#using-kimi-in-hermes-agent)
===========================================================================================================================
[Hermes Agent](https://github.com/NousResearch/hermes-agent)
is Nous Research's open-source self-improving AI agent with a built-in learning loop, accessible from the terminal, Telegram, Discord, and more. This guide shows how to connect it to the Kimi Code membership (Coding Plan), with K3 or K2.8 Preview providing the model inference.
Prerequisites [](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#prerequisites)
-------------------------------------------------------------------------------------------------
Complete these preparations before you start. Follow the linked official guides for installation and account setup; they are not repeated here.
[Install Hermes AgentInstall or update Hermes Agent with the official installation docs.](https://hermes-agent.nousresearch.com/docs/getting-started/installation)
[Create an API keyCreate and safely store a membership API key in the Kimi Code Console.](https://www.kimi.com/code/console)
[Check your membership tierSee the available models and quota rules for your tier on the Membership Benefits page.](https://www.kimi.com/code/docs/en/kimi-code/membership)
Step 1: Select Kimi Coding Plan and a model [](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#step-1-select-kimi-coding-plan-and-a-model)
------------------------------------------------------------------------------------------------------------------------------------------------------------
Run the model configuration wizard:
sh
hermes model
Select **Kimi / Moonshot** in the top-level menu.

Select **Kimi / Kimi Coding Plan** in the submenu, then paste your membership API key into the masked input. Hermes detects the `sk-kimi-` prefix and automatically uses the Kimi Code endpoint (`https://api.kimi.ai/coding`) — no manual Base URL configuration needed.

When picking the default model, the wizard lists the models available to your key:

Check your membership tier first, then pick a model from the table below — see [Membership Benefits](https://www.kimi.com/code/docs/en/kimi-code/membership.html#plan-comparison)
:
| Membership tier | Available models | Context window |
| --- | --- | --- |
| Go (new plans) | No coding quota | — |
| Andante (legacy plans) | `kimi-for-coding` | `1048576` |
| Plus / Moderato | `k3` `k3-256k` `kimi-for-coding` | `k3`: `262144` `k3-256k`: `262144` `kimi-for-coding`: `1048576` |
| Pro and above / Allegretto and above | `k3` `k3-256k` `kimi-for-coding` `kimi-for-coding-highspeed` | `k3`: `1048576` `k3-256k`: `262144` `kimi-for-coding`: `1048576` `kimi-for-coding-highspeed`: `262144` |
Using models or context windows beyond your tier's allowance will trigger an error. Note that `k3-256k` is not in the wizard's list — to use it, choose **Enter custom model name** and type `k3-256k` without any prefix.
Also, `kimi-k3` in the wizard list and `k3` in the config file are the same model — `kimi-` is only a display prefix in the wizard. When typing a model name manually or editing the config file, always use the ID without the prefix (`k3`, `k3-256k`).

New model recommendation
`k3-256k` is newly released: identical quality within a 256K context, while `k3` (1M) costs about twice as much. It suits everyday Q&A, code completion, regular feature development, and single-file or few-file edits, and does not support video input. When switching from `k3` (1M) to `k3-256k`, compact the context first.
Step 2: Write the complete K3 configuration [](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#step-2-write-the-complete-k3-configuration)
------------------------------------------------------------------------------------------------------------------------------------------------------------
Run:
sh
hermes config edit
> `hermes config edit` simply opens `~/.hermes/config.yaml` in the default terminal editor. If you are not comfortable with nano/vim, you can open the same file in any editor you like, such as VS Code — the result is identical.
With the file open, merge the complete configuration below into it: the `model` and `agent` sections already exist — only change the fields shown (you can replace the whole `model` section outright); the `custom_providers` and `auxiliary` sections usually do not exist — paste them at the end of the file. Keep any other existing custom providers.
yaml
custom_providers:
- name: kimi-coding-plan
base_url: https://api.kimi.ai/coding/v1
key_env: KIMI_API_KEY
api_mode: chat_completions
model: k3-256k
extra_body:
reasoning_effort: high
models:
k3-256k:
context_length: 262144
supports_vision: true
model:
provider: custom:kimi-coding-plan
default: k3-256k
context_length: 262144
supports_vision: true
agent:
reasoning_effort: high
auxiliary:
vision:
provider: main
model: k3-256k
extra_body:
reasoning_effort: high
Save and exit when done (nano: `Ctrl+O` then Enter to save, `Ctrl+X` to exit; vim: `:wq`; VS Code: just save the file).
What the key fields in the block do:
* `reasoning_effort`: reasoning effort, explicitly set to `high` here. Accepts `low` / `high` / `max`, default `high` — see the effort mapping table in [Model configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html)
* `context_length` and `supports_vision`: enable the 256K context window and native image understanding; the `auxiliary` section routes image analysis through the same main provider
* `key_env`: the referenced `KIMI_API_KEY` is the membership key you pasted in Step 1 — no extra setup needed
* `base_url`: only goes up to `/coding/v1`; Hermes appends `/chat/completions` automatically, so do not put the full request endpoint in
Note
To use the 1M-context `k3` (available on Allegretto / Pro or above), replace every `k3-256k` in the configuration above with `k3` and change both `context_length` values to `1048576`. On Moderato / Plus, `k3` is also capped at 256K, so no change is needed.
Step 3: Enable video analysis (optional) [](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#step-3-enable-video-analysis-optional)
----------------------------------------------------------------------------------------------------------------------------------------------------
Hermes Agent ships an official video analysis tool — enable it once:
sh
hermes tools enable video
Once enabled, Hermes can call the official `video_analyze` tool. For local videos, the tool reads the full file, encodes it as `data:video/...;base64,...`, and sends it to the model as a `video_url` content block — it does not extract frames locally with FFmpeg first.
Then, in a chat, provide the absolute video path and explicitly ask it to call `video_analyze` — no `/video` command needed:
text
Call video_analyze on /absolute/path/to/demo.mp4, summarize the video, and list three details that can be confirmed from the visuals.
Common formats including MP4, WebM, MOV, AVI, MKV, and MPEG are supported, with an approximately 50 MB Base64-encoded payload limit — a hard-coded cap of the Hermes client video tool, not a Kimi API limit. Trim or compress larger videos first. You can also provide a directly accessible HTTP/HTTPS video URL.
> Video analysis depends on the model's multimodal capability, and `k3-256k` does not support video input. If you configured `k3-256k` in Step 2, switch the default model to `k3` before analyzing videos.
Step 4: Use images (optional) [](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#step-4-use-images-optional)
------------------------------------------------------------------------------------------------------------------------------
Reference a local image by its absolute path in a chat:
text
/image /absolute/path/to/example.png
You can also copy an image to the clipboard, type `/paste`, and then ask your question. The image is sent as native vision content to the model configured in Step 2.
Step 5: Launch and verify [](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#step-5-launch-and-verify)
------------------------------------------------------------------------------------------------------------------------
Start a new session so the provider and model settings take effect:
sh
hermes
After startup, confirm the status bar shows the expected model and context window (e.g. `k3-256k` with `256K`), then send a simple request to verify connectivity.

Troubleshooting [](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#troubleshooting)
-----------------------------------------------------------------------------------------------------
### `k3-256k` is missing from the model list [](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#k3-256k-is-missing-from-the-model-list)
`k3-256k` is not in the wizard's default model list. Run `hermes model` again, select **Kimi / Moonshot > Kimi / Kimi Coding Plan**, then choose **Enter custom model name** and type `k3-256k` manually.
### 401 error or key rejected [](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#_401-error-or-key-rejected)
Confirm you are using an `sk-kimi-` membership key created in the [Kimi Code Console](https://www.kimi.com/code/console)
, and that your membership tier supports the selected model (see the tier table in [Step 1](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#step-1-select-kimi-coding-plan-and-a-model)
). If the error persists, regenerate a key and run `hermes model` again.
### 403 error [](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#_403-error)
You've hit a quota or rate limit. Note the rolling 5-hour rate window; for existing members on legacy plans, the subscription quota also refreshes every 7 days (new members are not subject to the weekly limit) — both recover automatically when their windows reset. You can check your quota usage in the [Kimi Code Console](https://www.kimi.com/code/console)
. For the exact error messages and how to handle them, see the [error reference](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html#quota-account-limits)
.
### The video tool is not called [](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#the-video-tool-is-not-called)
Confirm you ran `hermes tools enable video`, explicitly asked for `video_analyze` in your prompt, and used an absolute local path. The encoded payload must stay below approximately 50 MB.
Next steps [](https://www.kimi.com/code/docs/en/third-party-tools/hermes.html#next-steps)
-------------------------------------------------------------------------------------------
* [Model configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html)
— model capability comparison and the full effort mapping table
* [Membership Benefits](https://www.kimi.com/code/docs/en/kimi-code/membership.html)
— available models, quota refresh rules, and tier requirements
---
# 开始使用 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html#VPContent)
On this page
开始使用 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html#%E5%BC%80%E5%A7%8B%E4%BD%BF%E7%94%A8)
========================================================================================================================
Kimi Code CLI 是什么 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html#kimi-code-cli-%E6%98%AF%E4%BB%80%E4%B9%88)
------------------------------------------------------------------------------------------------------------------------------------------
Kimi Code CLI 是一个运行在终端中的 AI Agent,帮助你完成软件开发任务和日常的终端操作——阅读和修改代码、执行 Shell 命令、搜索文件、抓取网页,并在执行过程中根据反馈自主规划和调整下一步行动。
它适用于以下场景:
* **编写和修改代码**:实现新功能、修复 bug、完成重构
* **理解项目**:探索陌生的代码库,解答架构和实现层面的问题
* **自动化任务**:批量处理文件、运行构建与测试、串联多个脚本
整套 CLI 以 TypeScript 编写,通过 npm 分发,运行在 Node.js 之上。
安装 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html#%E5%AE%89%E8%A3%85)
----------------------------------------------------------------------------------------------------
提供两种安装方式:官方安装脚本(推荐,无需预装 Node.js)和 npm 全局安装。
安装之前
Kimi Code CLI 为全交互式 TUI 应用,推荐在支持真彩色与连字的现代终端中运行以获得最佳体验,例如 [Kitty](https://sw.kovidgoyal.net/kitty/)
或 [Ghostty](https://ghostty.org/)
。
### 脚本安装(推荐) [](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html#%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85-%E6%8E%A8%E8%8D%90)
macOS / LinuxWindows (PowerShell)
sh
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
powershell
irm https://code.kimi.com/kimi-code/install.ps1 | iex
> Windows 用户首次启动前还需要安装 [Git for Windows](https://gitforwindows.org/)
> ,Kimi Code CLI 会使用其中的 Git Bash 作为 Shell 环境。如果 Git Bash 安装在非标准路径,请把 `KIMI_SHELL_PATH` 设为 `bash.exe` 的绝对路径。
脚本会自动下载最新版本、校验 checksum,并把 `kimi` 可执行文件放到你的 `PATH` 中。
### npm 安装 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html#npm-%E5%AE%89%E8%A3%85)
需要 Node.js 22.19.0 或更高版本:
sh
node --version
npmpnpm
sh
npm install -g @moonshot-ai/kimi-code
sh
pnpm add -g @moonshot-ai/kimi-code
第一次启动 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html#%E7%AC%AC%E4%B8%80%E6%AC%A1%E5%90%AF%E5%8A%A8)
----------------------------------------------------------------------------------------------------------------------------------
进入项目目录后直接运行 `kimi` 启动交互界面:
sh
cd your-project
kimi
只想执行一条指令而不进入交互界面时,使用 `-p`:
sh
kimi -p "帮我看一下这个项目的目录结构"
继续上一次会话加 `-c`:
sh
kimi -c
首次启动时需要配置 API 来源。在交互界面中输入 `/login` 进入登录流程:
/login
`/login` 会弹出平台选择器,支持两种方式:
* **Kimi Code(OAuth)** — 验证码流程,在任意设备打开链接、登录并输入验证码即可授权
* **Kimi Platform API 密钥** — 输入来自 `platform.kimi.com` 或 `platform.kimi.ai` 的 API 密钥
需要退出登录时,输入 `/logout` 清除当前凭证。
使用其他 AI 供应商
如果你想接入 Anthropic、OpenAI、Google 等其他供应商,需要直接编辑 `~/.kimi-code/config.toml` 配置 API 密钥,详见[平台与模型](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html)
。配置项完整说明见[配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html)
、[环境变量](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html)
和[配置覆盖](https://www.kimi.com/code/docs/kimi-code-cli/configuration/overrides.html)
。
第一个对话 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html#%E7%AC%AC%E4%B8%80%E4%B8%AA%E5%AF%B9%E8%AF%9D)
----------------------------------------------------------------------------------------------------------------------------------
登录完成后,用自然语言描述任务即可。先让它熟悉当前项目:
帮我看一下这个项目的目录结构,简单介绍一下每个目录是做什么的
Kimi Code CLI 会自动调用文件读取、搜索等工具浏览相关内容后给出回答。只读操作默认自动执行无需确认;对于会修改文件或执行 Shell 命令的操作,默认会在执行前征求确认。
也可以直接描述更具体的任务:
在 src/utils 里新增一个函数,用来把任意字符串转成 kebab-case,并补一个单元测试
Kimi Code CLI 会规划步骤、修改代码、运行测试,并在每一步告诉你它做了什么。
不知道能做什么?输入 `/help`
随时在输入框输入 `/help`,可以打开内置的命令和快捷键面板,按 `↑`/`↓` 翻看,`Esc` 关闭。退出时输入 `/exit`,或按 `Ctrl-C` 两次,或在输入框为空时按 `Ctrl-D`。
常用命令与快捷键速查 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html#%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4%E4%B8%8E%E5%BF%AB%E6%8D%B7%E9%94%AE%E9%80%9F%E6%9F%A5)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
第一次使用时,记住下面这些就够了:
**会话相关命令**
| 命令 | 说明 |
| --- | --- |
| `/new` | 开启新会话,清空当前上下文 |
| `/sessions` | 浏览历史会话,选择恢复 |
| `/model` | 切换当前使用的模型 |
| `/compact` | 手动压缩上下文,释放 token |
| `/fork` | 派生当前会话为保留完整历史的独立副本(仍停留在当前会话) |
**最常用快捷键**
| 快捷键 | 说明 |
| --- | --- |
| `Esc` | 中断流式输出 / 关闭弹窗 |
| `Ctrl-C` | 中断输出;空闲时连按两次退出 |
| `Shift-Tab` | 切换 Plan 模式 |
| `Ctrl-S` | 输出中途插入消息,无需等待结束 |
| `Ctrl-O` | 折叠 / 展开工具输出和压缩摘要 |
想看完整列表,输入 `/help` 或访问[斜杠命令参考](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html)
和[键盘快捷键](https://www.kimi.com/code/docs/kimi-code-cli/reference/keyboard.html)
。
数据存放在哪里 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html#%E6%95%B0%E6%8D%AE%E5%AD%98%E6%94%BE%E5%9C%A8%E5%93%AA%E9%87%8C)
------------------------------------------------------------------------------------------------------------------------------------------------------
Kimi Code CLI 的本地数据默认保存在 `~/.kimi-code/` 下,包含配置文件、会话记录、日志和更新缓存。如需迁移到别处,通过 `KIMI_CODE_HOME` 环境变量指定新路径。完整说明见[数据路径](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html)
和[环境变量](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html)
。
升级与卸载 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html#%E5%8D%87%E7%BA%A7%E4%B8%8E%E5%8D%B8%E8%BD%BD)
----------------------------------------------------------------------------------------------------------------------------------
安装完成后,验证可执行文件是否就绪:
sh
kimi --version
**升级**:运行 `kimi upgrade`,CLI 会检查最新版本并展示更新选项。选择 `Install update now` 后根据当前安装来源执行升级;也可以直接用包管理器:
sh
npm install -g @moonshot-ai/kimi-code@latest
**卸载**:脚本安装的用户删除 `kimi` 可执行文件即可;npm 安装的用户:
sh
npm uninstall -g @moonshot-ai/kimi-code
下一步 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
--------------------------------------------------------------------------------------------------------------
* [交互与输入](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html)
— 输入框操作、审批流程、Plan 模式和 "Ask When Needed" 模式详解
* [会话与上下文](https://www.kimi.com/code/docs/kimi-code-cli/guides/sessions.html)
— 恢复会话、上下文压缩、导出会话
* [常见使用案例](https://www.kimi.com/code/docs/kimi-code-cli/guides/use-cases.html)
— 典型任务的 prompt 示例
---
# 快速开始 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-for-vscode/getting-started.html#VPContent)
On this page
快速开始 [](https://www.kimi.com/code/docs/kimi-code-for-vscode/getting-started.html#%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B)
========================================================================================================================
Kimi Code for VS Code 是集成于 Visual Studio Code 的扩展插件。安装后,您可在编辑器内直接发起提问、审查代码 diff 并快速提交变更。插件能够读取您引用的文件内容,并通过可视化界面展示修改建议,经您确认后执行。整个流程由您掌控,同时显著提升开发效率。

本扩展在 VS Code 中提供了原生聊天面板,支持通过 `@` 符号引用文件或文件夹、`/` 命令执行项目扫描与上下文管理、diff 视图展示文件变更并支持回退操作,同时支持集成 MCP 服务器以调用外部工具。聊天面板可置于活动栏、侧边栏或独立标签页中。
安装之前 [](https://www.kimi.com/code/docs/kimi-code-for-vscode/getting-started.html#%E5%AE%89%E8%A3%85%E4%B9%8B%E5%89%8D)
------------------------------------------------------------------------------------------------------------------------
需拥有 Kimi 账号订阅或 Kimi API 密钥。
安装方式 [](https://www.kimi.com/code/docs/kimi-code-for-vscode/getting-started.html#%E5%AE%89%E8%A3%85%E6%96%B9%E5%BC%8F)
------------------------------------------------------------------------------------------------------------------------
通过 [VS Code Marketplace](vscode:extension/moonshot-ai.kimi-code)
安装。
若安装后未显示扩展,请重启 VS Code 或在命令面板中执行 "Developer: Reload Window" (Mac: Cmd+Shift+P, Windows/Linux: Ctrl+Shift+P)。
身份认证 [](https://www.kimi.com/code/docs/kimi-code-for-vscode/getting-started.html#%E8%BA%AB%E4%BB%BD%E8%AE%A4%E8%AF%81)
------------------------------------------------------------------------------------------------------------------------
Kimi Code 支持两种认证模式:
**Kimi 账号模式**:点击登录按钮,浏览器将打开授权页面,完成授权流程后返回 VS Code。
**API Key 模式**:若已配置 API Key,可点击跳过登录。插件将在此模式下运行。

您可随时通过齿轮图标切换认证模式。登出后将返回登录界面。
典型工作流 [](https://www.kimi.com/code/docs/kimi-code-for-vscode/getting-started.html#%E5%85%B8%E5%9E%8B%E5%B7%A5%E4%BD%9C%E6%B5%81)
----------------------------------------------------------------------------------------------------------------------------------
**代码解读**:输入 `@` 选择文件或文件夹,请求解释代码流程,可继续追问细节。
**重构**:引用目标代码如 `@src/feature/`,请求重构方案,审查 diff 并选择性批准,必要时使用回退。
**调试**:粘贴错误信息或堆栈跟踪,引用相关文件,请求诊断与修复,然后批准提议的变更。
**项目概览**:引用文件夹如 `@src/services/`,请求模块地图或架构摘要,可继续询问依赖关系或薄弱环节。
命令与快捷键 [](https://www.kimi.com/code/docs/kimi-code-for-vscode/getting-started.html#%E5%91%BD%E4%BB%A4%E4%B8%8E%E5%BF%AB%E6%8D%B7%E9%94%AE)
--------------------------------------------------------------------------------------------------------------------------------------------
| 快捷键 | 功能 |
| --- | --- |
| `Ctrl+Shift+K` / `Cmd+Shift+K` | 聚焦 Kimi 输入框 |
| `Alt+K` | 插入当前文件引用 |
| `Ctrl+N` / `Cmd+N` | 新建对话(需启用 `kimi.enableNewConversationShortcut`,启用后将占用系统默认的"新建文件"快捷键) |
| `↑` / `↓` | 在输入框中浏览输入历史 |
在命令面板中输入 "Kimi Code" 可访问更多命令:在新标签页打开、在侧边栏打开、新建对话等。
下一步 [](https://www.kimi.com/code/docs/kimi-code-for-vscode/getting-started.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
--------------------------------------------------------------------------------------------------------------
* [核心操作](https://www.kimi.com/code/docs/kimi-code-for-vscode/core-operations.html)
– 学习聊天面板用法、上下文管理与 diff 审查
* [定制化](https://www.kimi.com/code/docs/kimi-code-for-vscode/customization.html)
– 探索 Skills、Hooks 与 MCP 扩展能力
* [配置](https://www.kimi.com/code/docs/kimi-code-for-vscode/configuration.html)
– 自定义认证、模型与行为设置
---
# 从 kimi-cli 迁移 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-cli/guides/migration.html#VPContent)
Return to top
从 kimi-cli 迁移 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/migration.html#%E4%BB%8E-kimi-cli-%E8%BF%81%E7%A7%BB)
============================================================================================================================
INFO
Kimi Code CLI 已完成重大版本升级,底层从 Python/uv 迁移至 Node.js,带来更简单的安装方式、更快的启动速度和全新的终端界面。旧版将逐渐停止维护,建议尽快升级至新版。
如果你正在从旧版迁移,按照以下步骤操作——一条命令就能把配置、MCP server 与会话历史一并迁移至新版。
新版优势 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/migration.html#%E6%96%B0%E7%89%88%E4%BC%98%E5%8A%BF)
------------------------------------------------------------------------------------------------------------------
* **不再依赖 Python / uv**:基于 Node.js 重写,无需配置 Python 环境,安装更简单
* **原生二进制,开箱即用**:启动更快,运行更轻量
* **终端界面全面重设计**:交互体验更流畅
* **数据可完整迁移**:配置、MCP、会话历史一键带走,无缝延续
如何迁移 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/migration.html#%E5%A6%82%E4%BD%95%E8%BF%81%E7%A7%BB)
------------------------------------------------------------------------------------------------------------------
迁移有两种方式。
装好 kimi-code 之后**第一次运行 `kimi`** 时,它会自动检测 `~/.kimi/` 下是否存在 kimi-cli 的数据。一旦检测到,就会弹出迁移提示,你可以选择立即迁移、稍后再说,或不再提示。
你也可以**随时手动运行**:
sh
kimi migrate
你可以选择是否同时迁移聊天会话。如果暂时不需要历史记录,选 **Config only**;否则选 **Config + N sessions** 一并迁移。结束后会显示结果摘要。
迁移会发生什么 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/migration.html#%E8%BF%81%E7%A7%BB%E4%BC%9A%E5%8F%91%E7%94%9F%E4%BB%80%E4%B9%88)
------------------------------------------------------------------------------------------------------------------------------------------------
**会被迁移的内容**:配置(`config.toml`)、MCP 服务配置、输入历史,以及你选择迁移的聊天会话。
**不会被迁移的内容**:OAuth 登录凭证和 MCP 服务的授权都不会被复制,迁移后需要在 kimi-code 里重新执行 `/login` 和重新授权 MCP 服务。kimi-cli 的插件也不在迁移范围内。
提示
迁移**不会改动或删除** `~/.kimi/` 下的任何旧数据。kimi-cli 仍可照常使用,两者互不影响。迁移也可以重复运行,已经迁移过的会话不会被重复导入。
迁移完成后,从 kimi-cli 导入的会话会带上 `[imported]` 标记,方便你与新建的会话区分。
---
# 常见问题 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code/faq.html#VPContent)
Return to top
常见问题 [](https://www.kimi.com/code/docs/kimi-code/faq.html#%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)
=================================================================================================
安装与鉴权 [](https://www.kimi.com/code/docs/kimi-code/faq.html#%E5%AE%89%E8%A3%85%E4%B8%8E%E9%89%B4%E6%9D%83)
-----------------------------------------------------------------------------------------------------------
### `/login` 时模型列表为空 [](https://www.kimi.com/code/docs/kimi-code/faq.html#login-%E6%97%B6%E6%A8%A1%E5%9E%8B%E5%88%97%E8%A1%A8%E4%B8%BA%E7%A9%BA)
如果在运行 `/login` 命令时看到 "No models available for the selected platform" 错误,可能是以下原因:
* **API 密钥无效或过期**:检查你输入的 API 密钥是否正确,以及是否仍有效。
* **网络连接问题**:确认能正常访问 API 服务地址(如 `api.kimi.com` 或 `api.moonshot.cn`)。
**注意区分平台**
Kimi Code 会员权益与 [Kimi 开放平台](https://platform.kimi.com/)
有不同的 Base URL,配置时请注意 Base URL 与 API Key 的匹配是否正确。
| 平台 | Base URL | 计费方式 | Key 创建入口 |
| --- | --- | --- | --- |
| **Kimi Code** | Anthropic 兼容:国内 `https://api.kimi.com/coding/` 海外 `https://api.kimi.ai/coding/` | Kimi 会员订阅(含额度) | [Kimi Code 控制台](https://www.kimi.com/code/console) |
| **Kimi 开放平台** | 国内 `https://api.moonshot.cn/v1` 海外 `https://api.moonshot.ai/v1` | 按量付费 | [Kimi 开放平台官网](https://platform.kimi.com/) |
### API 密钥无效 [](https://www.kimi.com/code/docs/kimi-code/faq.html#api-%E5%AF%86%E9%92%A5%E6%97%A0%E6%95%88)
API 密钥无效可能的原因:
* **密钥输入错误**:检查是否有多余的空格或遗漏的字符。
* **密钥已过期或被撤销**:在平台控制台确认密钥状态。
### 会员过期或配额用尽 [](https://www.kimi.com/code/docs/kimi-code/faq.html#%E4%BC%9A%E5%91%98%E8%BF%87%E6%9C%9F%E6%88%96%E9%85%8D%E9%A2%9D%E7%94%A8%E5%B0%BD)
如果你使用 Kimi Code 平台,可以通过 `/usage` 命令查看当前的配额和会员状态。如果配额用尽或会员过期,需要在 [Kimi Code](https://kimi.com/code)
续费或升级。
订阅相关 [](https://www.kimi.com/code/docs/kimi-code/faq.html#%E8%AE%A2%E9%98%85%E7%9B%B8%E5%85%B3)
-------------------------------------------------------------------------------------------------
### 如何开发票或升级会员 [](https://www.kimi.com/code/docs/kimi-code/faq.html#%E5%A6%82%E4%BD%95%E5%BC%80%E5%8F%91%E7%A5%A8%E6%88%96%E5%8D%87%E7%BA%A7%E4%BC%9A%E5%91%98)
请前往 [Kimi 会员权益页面](https://www.kimi.com/membership/pricing?from=kfc_docs_faq#pricing-faq)
,根据页面指引完成开票申请或会员升级操作。
交互问题 [](https://www.kimi.com/code/docs/kimi-code/faq.html#%E4%BA%A4%E4%BA%92%E9%97%AE%E9%A2%98)
-------------------------------------------------------------------------------------------------
### 粘贴图片失败 [](https://www.kimi.com/code/docs/kimi-code/faq.html#%E7%B2%98%E8%B4%B4%E5%9B%BE%E7%89%87%E5%A4%B1%E8%B4%A5)
使用 `Ctrl-V` 粘贴图片时,如果提示 "Current model does not support image input",说明当前模型不支持图片输入。
解决方法:
* **切换到支持图片的模型**:使用支持 `image_in` 能力的模型。
* **检查剪贴板内容**:确保剪贴板中确实有图片数据,而非图片文件的路径。
更新与升级 [](https://www.kimi.com/code/docs/kimi-code/faq.html#%E6%9B%B4%E6%96%B0%E4%B8%8E%E5%8D%87%E7%BA%A7)
-----------------------------------------------------------------------------------------------------------
### macOS 首次运行缓慢 [](https://www.kimi.com/code/docs/kimi-code/faq.html#macos-%E9%A6%96%E6%AC%A1%E8%BF%90%E8%A1%8C%E7%BC%93%E6%85%A2)
macOS 的 Gatekeeper 安全机制会在首次运行新程序时进行检查,导致启动变慢。解决方法:
* **等待检查完成**:首次运行时耐心等待,后续启动会恢复正常。
* **添加到开发者工具**:在「系统设置 → 隐私与安全性 → 开发者工具」中添加你的终端应用。
### 如何升级 Kimi Code CLI [](https://www.kimi.com/code/docs/kimi-code/faq.html#%E5%A6%82%E4%BD%95%E5%8D%87%E7%BA%A7-kimi-code-cli)
在 CLI 内运行 `kimi upgrade`,会自动检查最新版本并引导升级。也可以直接用包管理器:
sh
npm install -g @moonshot-ai/kimi-code@latest
VS Code 扩展常见问题 [](https://www.kimi.com/code/docs/kimi-code/faq.html#vs-code-%E6%89%A9%E5%B1%95%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)
-------------------------------------------------------------------------------------------------------------------------------------
以下是 Kimi Code VS Code 扩展(VS Code Extension)的常见问题。
### VS Code 提示未打开工作区 [](https://www.kimi.com/code/docs/kimi-code/faq.html#vs-code-%E6%8F%90%E7%A4%BA%E6%9C%AA%E6%89%93%E5%BC%80%E5%B7%A5%E4%BD%9C%E5%8C%BA)
请在 VS Code 中打开文件夹,Kimi Code VS Code 扩展需要工作区才能正常工作。
### VS Code 提示找不到 CLI [](https://www.kimi.com/code/docs/kimi-code/faq.html#vs-code-%E6%8F%90%E7%A4%BA%E6%89%BE%E4%B8%8D%E5%88%B0-cli)
请手动安装 Kimi Code CLI 并在 VS Code 设置中配置 `kimi.executablePath`,或确保内置 CLI 存在。
### VS Code 登录失败 [](https://www.kimi.com/code/docs/kimi-code/faq.html#vs-code-%E7%99%BB%E5%BD%95%E5%A4%B1%E8%B4%A5)
请尝试跳过登录使用 API 密钥模式,检查网络连接,或稍后通过 VS Code 扩展的操作菜单重试。
### VS Code 发送消息无响应 [](https://www.kimi.com/code/docs/kimi-code/faq.html#vs-code-%E5%8F%91%E9%80%81%E6%B6%88%E6%81%AF%E6%97%A0%E5%93%8D%E5%BA%94)
请确认 Kimi Code CLI 可用、模型已配置且 VS Code 中已打开工作区文件夹。通过 "Kimi Code: Show Logs" 查看错误日志。
### VS Code 连接超时 [](https://www.kimi.com/code/docs/kimi-code/faq.html#vs-code-%E8%BF%9E%E6%8E%A5%E8%B6%85%E6%97%B6)
若 30 秒内无响应将超时。请检查网络后重试。
### VS Code 发消息前报错 [](https://www.kimi.com/code/docs/kimi-code/faq.html#vs-code-%E5%8F%91%E6%B6%88%E6%81%AF%E5%89%8D%E6%8A%A5%E9%94%99)
某些错误会阻止在 VS Code 中发送消息,如 Kimi Code CLI 未找到、版本过低、未登录或会话忙碌。错误将以 toast 提示,您的输入将被保留以便重试。
反馈与联系 [](https://www.kimi.com/code/docs/kimi-code/faq.html#%E5%8F%8D%E9%A6%88%E4%B8%8E%E8%81%94%E7%B3%BB)
-----------------------------------------------------------------------------------------------------------
### 文档未能解决问题 [](https://www.kimi.com/code/docs/kimi-code/faq.html#%E6%96%87%E6%A1%A3%E6%9C%AA%E8%83%BD%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98)
如果以上内容未能解决您的问题,欢迎前往 [Kimi 网页端](https://www.kimi.com/)
,点击左下角头像 → **帮助** → **用户反馈**,接入在线客服具体咨询。咨询时请描述您遇到的问题、操作步骤及相关日志信息,在线客服会尽快回复。
---
# Claude Code | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#VPContent)
Return to top
Claude Code [](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#claude-code)
===============================================================================================
> [Claude Code](https://docs.anthropic.com/en/docs/claude-code)
> 是 Anthropic 提供的编程 Agent 产品,界面、配置项和支持能力可能随版本变化。本文说明一种通用接入方案:通过环境变量将 Claude Code 的模型请求转发到 Kimi Code API。
开始之前 [](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#%E5%BC%80%E5%A7%8B%E4%B9%8B%E5%89%8D)
-----------------------------------------------------------------------------------------------------------------
* 确保你已经订阅 [Kimi 会员](https://www.kimi.com/membership/pricing?from=)
并开通 Kimi Code 权益。
* 获取 API Key:
1. 进入 [Kimi Code 控制台](https://www.kimi.com/code/console)
;
2. 点击「新建 API Key」,输入名称后确认;
3. 复制生成的 Key 并妥善保存(关闭弹窗后无法再次查看完整 Key)。

配置流程 [](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#%E9%85%8D%E7%BD%AE%E6%B5%81%E7%A8%8B)
-----------------------------------------------------------------------------------------------------------------
[Claude Code](https://docs.anthropic.com/en/docs/claude-code)
是 Anthropic 推出的命令行编程助手。通过配置环境变量将其接入 Kimi 的 API 端点,你就能在 Claude Code 中直接调用 Kimi Code 的 AI 能力,在熟悉的终端交互里获得 Kimi Code 的编程体验。
① **安装 Claude Code**
安装方式请参考 [Claude Code 官方文档](https://docs.anthropic.com/en/docs/claude-code/getting-started)
。
│
② **执行脚本,跳过登录流程**
安装完成后,不要直接启动 Claude。先在终端执行以下脚本,跳过 Anthropic 默认的登录流程并清理历史配置:
sh
node --eval "
// enable third party model support and fast mode
const claudeJsonFilePath = path.join(os.homedir(), '.claude.json');
if (fs.existsSync(claudeJsonFilePath)) {
const content = JSON.parse(fs.readFileSync(claudeJsonFilePath, 'utf-8'));
fs.writeFileSync(claudeJsonFilePath, JSON.stringify({ ...content, penguinModeOrgEnabled: true, hasCompletedOnboarding: true }, null, 2), 'utf-8');
} else {
fs.writeFileSync(claudeJsonFilePath, JSON.stringify({ penguinModeOrgEnabled: true, hasCompletedOnboarding: true }), 'utf-8');
}
// delete old endpoint, credential and model id
const claudeSettingsJsonFilePath = path.join(os.homedir(), '.claude', 'settings.json');
if (fs.existsSync(claudeSettingsJsonFilePath)) {
const content = JSON.parse(fs.readFileSync(claudeSettingsJsonFilePath, 'utf-8'));
if (typeof content === 'object' && typeof content.env === 'object') {
for (const element of [\
'ANTHROPIC_BASE_URL',\
'ANTHROPIC_API_KEY',\
'ANTHROPIC_AUTH_TOKEN',\
'ANTHROPIC_MODEL',\
'ANTHROPIC_SMALL_FAST_MODEL',\
'CLAUDE_CODE_SUBAGENT_MODEL',\
'ANTHROPIC_DEFAULT_FABLE_MODEL',\
'ANTHROPIC_DEFAULT_FABLE_MODEL_NAME',\
'ANTHROPIC_DEFAULT_OPUS_MODEL',\
'ANTHROPIC_DEFAULT_OPUS_MODEL_NAME',\
'ANTHROPIC_DEFAULT_SONNET_MODEL',\
'ANTHROPIC_DEFAULT_SONNET_MODEL_NAME',\
'ANTHROPIC_DEFAULT_HAIKU_MODEL',\
'ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME',\
'ENABLE_TOOL_SEARCH',\
'CLAUDE_CODE_AUTO_COMPACT_WINDOW',\
'CLAUDE_CODE_EFFORT_LEVEL',\
]) {
delete content.env[element];
}
fs.writeFileSync(claudeSettingsJsonFilePath, JSON.stringify(content, null, 2), 'utf-8');
}
}
"
其中 settings.json 清理部分仅删除 `env` 中的端点、密钥与模型相关变量(这些残留会**覆盖**终端里 export 的同名环境变量),不影响其他配置。另外请检查 `~/.zshrc`、`~/.bashrc` 等 shell 配置文件中是否残留旧的 `ANTHROPIC_*` export(Windows 用户请检查用户环境变量),如有请一并删除。
│
③ **配置 API 接入**
模型上新推荐
**K2.8 Preview** 现已全量上线 Kimi Code,`kimi-for-coding` 直接升级、无需修改配置:综合性能接近 K3,支持 `low` / `high` / `max` 三档思考程度与最高 1M 上下文。详见 [最新动态](https://www.kimi.com/code/docs/kimi-code/whats-new.html)
。
请先根据自己的会员档位确认可用的模型与上下文窗口(新老套餐规则对比见 [会员权益](https://www.kimi.com/code/docs/kimi-code/membership.html#plan-comparison)
):
| 会员档位 | 可配置模型 | 可用上下文上限 |
| --- | --- | --- |
| Go(新套餐) | 无 coding 额度 | — |
| Andante(老套餐) | `kimi-for-coding` | `1048576` |
| Plus / Moderato | `k3` `k3-256k` `kimi-for-coding` | `k3`:`262144` `k3-256k`:`262144` `kimi-for-coding`:`1048576` |
| Pro 及以上 / Allegretto 及以上 | `k3` `k3-256k` `kimi-for-coding` `kimi-for-coding-highspeed` | `k3`:`1048576` `k3-256k`:`262144` `kimi-for-coding`:`1048576` `kimi-for-coding-highspeed`:`262144` |
提供两种配置方式,**任选其一,不要混用**:方式一写入 settings.json 配置文件,长期生效、任何方式启动都生效;方式二在当前终端临时 export,仅对当前会话有效。
**方式一:写入 settings.json(推荐,长期生效)**
settings.json 的路径:
macOS / LinuxWindows
text
~/.claude/settings.json
text
C:\Users\<用户名>\.claude\settings.json
将以下配置写入该文件的 `env` 字段(文件不存在则新建):
K3-256KK3 1M 上下文
json
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.kimi.com/coding/",
"ANTHROPIC_API_KEY": "你的API Key",
"ANTHROPIC_MODEL": "k3-256k",
"ANTHROPIC_DEFAULT_FABLE_MODEL": "k3-256k",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "k3-256k",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "k3-256k",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "k3-256k",
"CLAUDE_CODE_SUBAGENT_MODEL": "k3-256k",
"CLAUDE_CODE_EFFORT_LEVEL": "high",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "262144",
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "262144"
}
}
json
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.kimi.com/coding/",
"ANTHROPIC_API_KEY": "你的API Key",
"ANTHROPIC_MODEL": "k3[1m]",
"ANTHROPIC_DEFAULT_FABLE_MODEL": "k3[1m]",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "k3[1m]",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "k3[1m]",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "k3[1m]",
"CLAUDE_CODE_SUBAGENT_MODEL": "k3[1m]",
"CLAUDE_CODE_EFFORT_LEVEL": "high",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1048576",
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "1048576"
}
}
保存后重启 Claude Code 生效。
明文密钥风险
`settings.json` 中的 API Key 以明文存储,请勿将该文件提交到版本仓库或随 dotfiles 公开分享;该文件的 `env` 会**覆盖**终端里 export 的同名变量。
**方式二:终端环境变量(仅当前会话)**
**K3-256K 配置如下:**
macOS / LinuxWindows
sh
export ANTHROPIC_BASE_URL=https://api.kimi.com/coding/
export ANTHROPIC_API_KEY=你的API Key
export ANTHROPIC_MODEL="k3-256k"
export ANTHROPIC_DEFAULT_FABLE_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_OPUS_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_SONNET_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_HAIKU_MODEL=$ANTHROPIC_MODEL
export CLAUDE_CODE_SUBAGENT_MODEL=$ANTHROPIC_MODEL
export CLAUDE_CODE_EFFORT_LEVEL=high
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=262144
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=262144
claude
powershell
$env:ANTHROPIC_BASE_URL="https://api.kimi.com/coding/"
$env:ANTHROPIC_API_KEY="你的API Key"
$env:ANTHROPIC_MODEL="k3-256k"
$env:ANTHROPIC_DEFAULT_FABLE_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_OPUS_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_SONNET_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL=$env:ANTHROPIC_MODEL
$env:CLAUDE_CODE_SUBAGENT_MODEL=$env:ANTHROPIC_MODEL
$env:CLAUDE_CODE_EFFORT_LEVEL="high"
$env:CLAUDE_CODE_AUTO_COMPACT_WINDOW="262144"
$env:CLAUDE_CODE_MAX_CONTEXT_TOKENS="262144"
claude
**K3 1M 上下文**配置如下:
注意 `k3[1m]` 写法仅在 Claude Code 环境变量场景需要
`k3[1m]`(以及外层的引号)用来明确告诉 Claude Code 把上下文窗口设为 1M;其它场景(例如 API 请求、其它第三方工具的 Model ID 字段)只需填 `k3` 即可。
macOS / LinuxWindows
sh
export ANTHROPIC_BASE_URL=https://api.kimi.com/coding/
export ANTHROPIC_API_KEY=你的API Key
export ANTHROPIC_MODEL="k3[1m]"
export ANTHROPIC_DEFAULT_FABLE_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_OPUS_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_SONNET_MODEL=$ANTHROPIC_MODEL
export ANTHROPIC_DEFAULT_HAIKU_MODEL=$ANTHROPIC_MODEL
export CLAUDE_CODE_SUBAGENT_MODEL=$ANTHROPIC_MODEL
export CLAUDE_CODE_EFFORT_LEVEL=high
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=1048576
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=1048576
claude
powershell
$env:ANTHROPIC_BASE_URL="https://api.kimi.com/coding/"
$env:ANTHROPIC_API_KEY="你的API Key"
$env:ANTHROPIC_MODEL="k3[1m]"
$env:ANTHROPIC_DEFAULT_FABLE_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_OPUS_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_SONNET_MODEL=$env:ANTHROPIC_MODEL
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL=$env:ANTHROPIC_MODEL
$env:CLAUDE_CODE_SUBAGENT_MODEL=$env:ANTHROPIC_MODEL
$env:CLAUDE_CODE_EFFORT_LEVEL="high"
$env:CLAUDE_CODE_AUTO_COMPACT_WINDOW="1048576"
$env:CLAUDE_CODE_MAX_CONTEXT_TOKENS="1048576"
claude
### 配置项说明 [](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#%E9%85%8D%E7%BD%AE%E9%A1%B9%E8%AF%B4%E6%98%8E)
Claude Code 内部会按场景使用不同档位的模型(主对话、后台摘要、子 Agent 等),只配置部分变量会让对应场景静默失败:
| 变量 | 作用 | 不配置或配置错误的影响 |
| --- | --- | --- |
| `ANTHROPIC_BASE_URL` | 将模型请求转发到 Kimi Code 端点 | 请求被发往 Anthropic 官方端点,鉴权失败 |
| `ANTHROPIC_API_KEY` | 使用 Kimi Code API Key 鉴权 | 返回 401 鉴权错误 |
| `ANTHROPIC_MODEL` | 主对话使用的模型 | 使用 Claude 默认模型名,Kimi Code 端点无法识别,报模型不存在错误 |
| `ANTHROPIC_DEFAULT_OPUS_MODEL` / `ANTHROPIC_DEFAULT_SONNET_MODEL` / `ANTHROPIC_DEFAULT_HAIKU_MODEL` / `ANTHROPIC_DEFAULT_FABLE_MODEL` | Claude Code 按任务档位选择模型时使用的模型名 | 对应档位的任务(如 haiku 档的后台标题生成、摘要)请求失败 |
| `CLAUDE_CODE_SUBAGENT_MODEL` | 子 Agent 使用的模型 | 子任务请求失败或效果明显变差 |
| `CLAUDE_CODE_AUTO_COMPACT_WINDOW` | 触发自动压缩上下文的窗口大小 | 需与模型上下文一致:`k3[1m]` 为 `1048576`,其余模型为 `262144`;设置过小会过早压缩丢失上下文,过大则报上下文超限错误 |
| `CLAUDE_CODE_MAX_CONTEXT_TOKENS` | 最大上下文 token 数 | 同上,需与所选模型的上下文窗口一致 |
| `CLAUDE_CODE_EFFORT_LEVEL` | 默认思考档位,K3 推荐设为 `high` | 较低值可能在复杂任务上降低质量 |
切换模型时,请把配置中所有模型变量的值一并替换为新模型名。
### 切换思考档位 [](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#%E5%88%87%E6%8D%A2%E6%80%9D%E8%80%83%E6%A1%A3%E4%BD%8D)
启动后在会话中输入 `/effort` 即可切换思考档位,无需配置环境变量。K3 与 K2.8 Preview 均支持 `low` / `high` / `max` 三档且档位一致,Claude Code 的档位与实际档位的映射关系如下:
| Claude Code 档位 | 实际档位 |
| --- | --- |
| `low` | `low` |
| `medium` | `high`(推荐) |
| `high` | `high`(推荐) |
| `xhigh` | `max` |
| `max` | `max` |
| 未设置(默认) | `high`(K3)/ `max`(K2.8 Preview) |
注意
关闭 thinking 后路由到 K2.8 Preview 无思考版:K3 系列与 K2.8 Preview 关闭 thinking 后,请求均由 K2.8 Preview(无思考)处理;thinking 快捷键 macOS 为 `Option+T`,Windows / Linux 为 `Alt+T`。
> 启动后若提示是否使用该 API key,确认使用即可。随后按照指引选择你信任的项目文件夹,完成授权即可。
>
> 
│
④ **启动后验证**
启动后输入 `/status`,如果返回信息中显示 Base URL 为 `https://api.kimi.com/coding/`,则配置成功。此时即使模型名称仍显示为 Claude 模型,实际调用的仍是 Kimi Code 的 API。

│
在 VS Code 插件中使用 [](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#%E5%9C%A8-vs-code-%E6%8F%92%E4%BB%B6%E4%B8%AD%E4%BD%BF%E7%94%A8)
-------------------------------------------------------------------------------------------------------------------------------------------------------
插件自带 Claude Code 程序,与命令行共用 `~/.claude` 下的配置。按以下步骤接入:
1. 按方式一的「[配置流程](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#%E9%85%8D%E7%BD%AE%E6%B5%81%E7%A8%8B)
」完成 API 接入配置。
2. 打开插件新建会话,出现登录页面时点击底部的 **Run `claude` in terminal**:

3. 在弹出的终端中依次完成两个确认:信任目录选择 **Yes, I trust this folder**;API Key 确认选择 **1\. Yes**:

4. **完全退出 VS Code** 后重新打开,即可在插件中直接对话。
如果不经过终端确认就使用插件,插件会缺少 API Key 的确认登记,发送消息时会反复弹出登录页面。
常见问题 [](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)
-----------------------------------------------------------------------------------------------------------------
### 修改配置后不生效 [](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#%E4%BF%AE%E6%94%B9%E9%85%8D%E7%BD%AE%E5%90%8E%E4%B8%8D%E7%94%9F%E6%95%88)
检查 `~/.claude/settings.json` 的 `env` 中是否有残留旧配置(会覆盖终端环境变量),可执行第 ② 步中的清理脚本;另外终端中 export 的变量只对当前会话有效,重开终端后需要重新设置;如果写入了 `settings.json`,请确认修改后重启了 Claude Code。
### 返回 401 鉴权错误 [](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#%E8%BF%94%E5%9B%9E-401-%E9%89%B4%E6%9D%83%E9%94%99%E8%AF%AF)
检查 `ANTHROPIC_API_KEY` 是否为有效的 Kimi Code API Key,注意 Key 只在创建时完整展示一次。
### 提示模型不存在(model not found) [](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#%E6%8F%90%E7%A4%BA%E6%A8%A1%E5%9E%8B%E4%B8%8D%E5%AD%98%E5%9C%A8-model-not-found)
检查各模型变量的值是否拼写正确(如 `k3-256k`、`k3[1m]`),注意不要携带多余空格或引号。
### 后台任务或子 Agent 报错 [](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#%E5%90%8E%E5%8F%B0%E4%BB%BB%E5%8A%A1%E6%88%96%E5%AD%90-agent-%E6%8A%A5%E9%94%99)
通常是 `ANTHROPIC_DEFAULT_HAIKU_MODEL`、`ANTHROPIC_DEFAULT_FABLE_MODEL` 或 `CLAUDE_CODE_SUBAGENT_MODEL` 未配置,对应场景请求了 Kimi Code 端点无法识别的模型名,请对照「配置项说明」补齐。
### VS Code 插件一直弹出登录页面 [](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#vs-code-%E6%8F%92%E4%BB%B6%E4%B8%80%E7%9B%B4%E5%BC%B9%E5%87%BA%E7%99%BB%E5%BD%95%E9%A1%B5%E9%9D%A2)
插件缺少 API Key 的确认登记。详细操作见「[在 VS Code 插件中使用](https://www.kimi.com/code/docs/third-party-tools/claude-code.html#%E5%9C%A8-vs-code-%E6%8F%92%E4%BB%B6%E4%B8%AD%E4%BD%BF%E7%94%A8)
」。
---
# Quick Start | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#VPContent)
On this page
Quick Start [](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#quick-start)
======================================================================================================
Kimi Code Desktop is the desktop client for Kimi Code. Open a local project, ask the Agent to read and modify code through conversation, and check the results with file previews, changes, and the built-in terminal.
This page walks you through installation, model setup, your first workspace, and your first task.

The Kimi Code Desktop home: type a message to start a conversation.
Install and launch [](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#install-and-launch)
--------------------------------------------------------------------------------------------------------------------
[Kimi Code DesktopmacOS · Apple Silicon](https://code.kimi.com/kimi-code/desktop/download/KimiCode-mac-arm64.dmg)
[Kimi Code DesktopmacOS · Intel](https://code.kimi.com/kimi-code/desktop/download/KimiCode-mac-x64.dmg)
[Kimi Code DesktopWindows](https://code.kimi.com/kimi-code/desktop/download/KimiCode-win-x64.exe)
On first launch, choose the interface language and theme. You can adjust them later in Settings.
Sign in [](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#sign-in)
----------------------------------------------------------------------------------------------
On first launch, follow the Kimi OAuth authorization flow, or skip it for now. When you need to sign in later, use the sign-in entry in the app to complete authorization. If authorization fails, retry as prompted. The sign-in site depends on your region: kimi.com for mainland China and kimi.ai for other regions. Once signed in, you can check your plan usage anytime in the account area of Settings.

Sign in to Kimi Code: pick your account type, then complete OAuth authorization as prompted.
Connect a model [](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#connect-a-model)
--------------------------------------------------------------------------------------------------------------
### Use official Kimi models [](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#use-official-kimi-models)
Once signed in, the desktop app uses the official models available to your account. You can confirm the current model in the model selector inside the Composer, or view available models and model entitlements in the model area of Settings.
Without a Kimi membership, the official models are not available directly, and model entitlements vary by plan. Find the membership entry in the account area to review and choose a plan. See [Membership Benefits](https://www.kimi.com/code/docs/en/kimi-code/membership.html)
and [Model Configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html)
.
### Connect a third-party model provider [](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#connect-a-third-party-model-provider)
To use another model provider:
1. Open Settings and go to the model provider area.
2. Add a provider and enter its API key, base URL, and model information.
3. Save the configuration and return to the session.
4. Switch to the model near the Composer.
5. Send a read-only task to confirm that the model works.

Manual setup asks for a name, API protocol, API key, base URL, and model information.
For complete model and provider details, see [Model Configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html)
and [Providers and models](https://www.kimi.com/code/docs/en/kimi-code-cli/configuration/providers.html)
.
Create a session and choose a workspace [](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#create-a-session-and-choose-a-workspace)
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Desktop organizes sessions by workspace. After creating a session, choose the local project folder above the Composer:
1. Click **New session** on the left.
2. Click the folder name above the Composer to open the workspace picker.
3. Choose a recent project folder, or click **Choose folder…** to add another local folder.
4. Confirm that the target workspace appears above the Composer, then enter and send your task.
The selected folder becomes a desktop workspace and is added to the recent folder list. When adding one, you can also expand **Enter an absolute path directly**; local absolute paths are resolved as provided. An empty session must have a workspace before you can send a message. Dropping a folder from Finder or File Explorer onto the sidebar can also add it as a workspace.
The session appears in the session list for the selected workspace. You can switch between existing workspaces and sessions from the left sidebar.

After creating a session, click the folder name above the Composer to choose a recent folder or add a new workspace.
Start your first task [](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#start-your-first-task)
--------------------------------------------------------------------------------------------------------------------------
Enter a task in the Composer, or use `@` to reference files and directories. The **+** button in the lower-left corner of the Composer provides several task modes:
* **Goal**: Set an objective for a longer task that needs multiple turns and checks. The goal appears above the Composer. See [Goal mode](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/interaction.html#goal-mode)
.
* **Plan**: Ask the Agent to analyze the task and propose a plan before changing files. See [Plan mode](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/interaction.html#plan-mode)
.
* **Swarm**: Split independent work across multiple subagents. Progress appears in the Tasks or Subagent area. See [Agents and Sub-Agents](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/agents.html)
.
While the task is running, the Agent's tool calls, thinking, and the files changed in each turn are all presented in the interface and can be checked at any time. You can send follow-up input to adjust the direction, such as narrowing the scope, adding constraints, asking for an explanation, or stopping the current action. To pause or revert, interrupt the current turn or use `/undo` to revert the most recent change.
Handle approvals [](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#handle-approvals)
----------------------------------------------------------------------------------------------------------------
Desktop shows operations that need your decision in approval cards. A card can contain a command, file changes, or a plan. Review the exact scope before approving or rejecting it. When the Agent needs an answer, the question card can offer single-choice, multiple-choice, and **Other** input.
There are three permission modes:
* **Always Ask**: ask for approval for each operation that requires it.
* **Ask When Needed**: ask only when approval is needed, reducing repeated confirmations while retaining control over key actions.
* **Never Ask**: do not proactively show approval prompts; use this only when you understand the risks.
For a first session or an unfamiliar project, **Always Ask** is a good starting point. You can change the mode after you understand the operation scope.
Review changes and verify [](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#review-changes-and-verify)
----------------------------------------------------------------------------------------------------------------------------------
After a change, open Changes on the right. Start with the file list, then inspect the specific file and the changes from an individual turn. When you need more context, use File Preview for Markdown, JSON, HTML, PDF, CSV, images, and code or text files. You can copy, download, reveal in the system, or open in an external app. File paths mentioned in the conversation can also be clicked open directly.
When the task requires checks, open the bottom terminal panel from the terminal button in the upper-right corner of the session. Confirm the command, current workspace, and output. Continue only after the results look correct. If something is unexpected, explain it in the session or use `/undo` to revert the most recent change.
For web projects, you can also open the built-in browser in the right panel. Browser tabs stay with the session and share page context with the Agent, so you can check page results without switching to another window.

The Changes panel on the right shows the exact diff for each file.
Continue exploring [](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#continue-exploring)
--------------------------------------------------------------------------------------------------------------------
After your first task, you can continue with:
* **Goal** for long-running objectives.
* **Swarm** for independent investigation or modification work.
* The top menu to open the project in an external editor, file manager, or system terminal.
* Creating, archiving, restoring, forking, or exporting sessions.
* Adjusting models, permissions, shortcuts, and plugins in Settings.
Common commands [](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#common-commands)
--------------------------------------------------------------------------------------------------------------
The Composer accepts tasks directly and also supports built-in commands through `/`. Common commands include:
| Command | Purpose |
| --- | --- |
| `/new` | Start a new session |
| `/login` | Open the sign-in flow |
| `/plan` | Enter plan mode |
| `/goal` | Set an ongoing objective |
| `/swarm` | Use multiple subagents for a task |
| `/compact` | Compact the current context |
| `/undo` | Revert the most recent change |
| `/fork` | Fork the current session |
| `/export` | Export the session |
| `/status` | View the current session status |
Desktop and the CLI [](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#desktop-and-the-cli)
----------------------------------------------------------------------------------------------------------------------
Desktop carries the Agent core of Kimi Code CLI. The two can be installed on the same machine and share some local configuration, such as account, model, provider, and plugin-related settings. In the CLI, run the `/desktop` slash command or the [`kimi install-desktop`](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-command.html#kimi-install-desktop)
subcommand to open the Desktop page in your browser.
Desktop focuses on projects, sessions, changes, and terminal verification in a graphical interface; the CLI is better suited to terminal-first and scripted workflows. Refer to each product's settings and configuration files for the exact shared scope.
Next steps [](https://www.kimi.com/code/docs/en/kimi-code-desktop/getting-started.html#next-steps)
----------------------------------------------------------------------------------------------------
* [Using the Desktop App](https://www.kimi.com/code/docs/en/kimi-code-desktop/using-desktop.html)
: learn task modes, context, session management, terminal use, and settings.
* [Kimi Code CLI Quick Start](https://www.kimi.com/code/docs/en/kimi-code-cli/guides/getting-started.html)
: learn terminal commands, sessions, and scripted workflows.
* [Model Configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html)
: view available models and configuration options.
* [Membership Benefits](https://www.kimi.com/code/docs/en/kimi-code/membership.html)
: learn about account benefits, usage, and upgrades.
---
# 远程控制 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#VPContent)
Return to top
远程控制 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E8%BF%9C%E7%A8%8B%E6%8E%A7%E5%88%B6)
=======================================================================================================================
在终端里使用 `kimi rc` 命令启动 Kimi Code CLI 并开启远程控制后,会自动生成一个可以远程控制本机的链接。你可以使用手机扫描二维码打开链接,或在其他设备上直接访问该链接。打开链接后,登录和本地 Kimi Code CLI 中相同的 Kimi 账号,就能远程查看任务进度、处理权限确认、继续对话,或新建会话。任务始终在本机执行,网页只是一个远程窗口。
开始使用 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E5%BC%80%E5%A7%8B%E4%BD%BF%E7%94%A8)
-----------------------------------------------------------------------------------------------------------------------
### 使用前准备 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E4%BD%BF%E7%94%A8%E5%89%8D%E5%87%86%E5%A4%87)
开启远程控制前,请确认本机满足以下条件:
* **已安装 Kimi Code CLI**:安装见 [开始使用](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html)
* **已登录 Kimi 账号且为付费会员**:远程控制需要会员权限,免费用户无法使用
* **本机保持唤醒并联网**:远程控制依赖本机与 Kimi 服务保持连接,关机、休眠或断网后远程会话不可用
### 第一步:启动远程控制 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E7%AC%AC%E4%B8%80%E6%AD%A5-%E5%90%AF%E5%8A%A8%E8%BF%9C%E7%A8%8B%E6%8E%A7%E5%88%B6)
在本机用以下任一方式启动,效果相同:启动一个前台进程并打印远程访问信息。
* **`kimi rc`**(别名 `kimi remote`):直接启动远程控制
* **`kimi web --remote-control`**:与 `kimi rc` 等价,在启动本地网页界面的同时把它暴露到公网
* **`/remote-control`**(别名 `/rc`):已在 CLI 会话中时使用,把当前会话直接交给远程界面
启动成功后,终端会打印访问链接(形如 `https://code-rc.kimi.com/devices/<设备 ID>/`;`kimi login --region global` 后为 `https://code-rc.kimi.ai/devices/<设备 ID>/`)、二维码和本机设备名(主机名),同时默认浏览器会自动打开该链接(加 `--no-open` 可关闭)。二维码除了显示在终端里,还会保存为 PNG 文件(路径见启动信息),终端里无法正常显示二维码时,可以直接打开该文件。

注意
远程控制链接是这台机器的远程控制入口,获得链接的人可能控制你的会话和文件,请勿分享给他人或发布到公开渠道。
两个使用限制:
* 一台机器同时只能运行一个远程控制实例。重复启动会提示已有实例在运行,并给出在用的链接;停止旧实例的方法见 [如何关闭远程控制](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E5%A6%82%E4%BD%95%E5%85%B3%E9%97%AD%E8%BF%9C%E7%A8%8B%E6%8E%A7%E5%88%B6)
* 远程控制不能与 `--dangerous-bypass-auth` 同时使用,也只绑定本机回环地址(不能用 `--host` 做局域网共享,远程访问统一走 Kimi 中转服务)
### 第二步:从其他设备连接 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E7%AC%AC%E4%BA%8C%E6%AD%A5-%E4%BB%8E%E5%85%B6%E4%BB%96%E8%AE%BE%E5%A4%87%E8%BF%9E%E6%8E%A5)
1. 在手机或另一台电脑的浏览器中打开启动信息里的访问链接,手机也可以直接扫终端里的二维码。
2. 使用与本机相同的 Kimi 账号登录。
3. 登录后在设备列表中选择这台机器(显示主机名),即可看到它的会话列表并开始操作。
远程控制通过浏览器访问。
设备数量限制
当前每个账号最多支持约 **3 台**设备。
### 如何关闭远程控制 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E5%A6%82%E4%BD%95%E5%85%B3%E9%97%AD%E8%BF%9C%E7%A8%8B%E6%8E%A7%E5%88%B6)
远程控制是前台进程,停止方式取决于你能否找到启动它的终端:
* **终端还在**:在该终端按 `Ctrl+C`(或直接关闭该终端窗口),设备会立即从远程列表中下线
* **找不到终端**:单实例锁文件 `~/.kimi-code/server/rc.json` 里记录着进程 pid 和在用的链接(重复启动时的报错也会打印这两个信息),执行 `kill ` 即可
* **进程已异常退出**(断电、崩溃等):残留的锁文件会在下次启动时自动清理,无需手动删除
想新开一个实例时,先把旧的按上面任一方式停掉再重新 `kimi rc` 即可。设备 ID 按本机数据目录生成,重开后设备和访问链接都不变。网页端设备管理与撤销的具体入口以最终发布版本为准。
远程会话中可以做什么 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E8%BF%9C%E7%A8%8B%E4%BC%9A%E8%AF%9D%E4%B8%AD%E5%8F%AF%E4%BB%A5%E5%81%9A%E4%BB%80%E4%B9%88)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
远程会话与本地会话能力基本一致,支持:
* **发送新的任务**:直接向 AI 描述需求,任务在本机执行
* **查看当前进度**:实时展示执行步骤和正在使用的工具
* **继续对话**:在已有会话基础上追加指令
* **查看工具调用**:展开每次工具执行的输入与结果
* **处理权限确认**:文件修改、Shell 执行等确认请求,可直接在网页上批准或拒绝
* **中断或停止任务**:随时停止当前任务
* **查看子 Agent / workflow 状态**:任务派发的子 Agent 或 workflow,可在任务面板中查看进度
本地电脑上发生什么 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E6%9C%AC%E5%9C%B0%E7%94%B5%E8%84%91%E4%B8%8A%E5%8F%91%E7%94%9F%E4%BB%80%E4%B9%88)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
远程控制只是一个远程窗口,所有计算和文件操作仍在本机完成。边界如下:
| 内容 | 是否在本地完成 |
| --- | --- |
| 读取项目文件 | 是 |
| 修改项目文件 | 是 |
| 执行 Shell 命令 | 是 |
| 使用本地 MCP | 是 |
| 手机或浏览器界面 | 否 |
| 会话同步 | 通过 Kimi 服务完成 |
断线、休眠和恢复 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E6%96%AD%E7%BA%BF%E3%80%81%E4%BC%91%E7%9C%A0%E5%92%8C%E6%81%A2%E5%A4%8D)
---------------------------------------------------------------------------------------------------------------------------------------------------------------
* **关闭浏览器**:任务在本机继续执行,不会中断。重新打开访问链接即可恢复会话视图
* **本机断网**:断网期间远程界面断开,无法操作。本机的远程控制进程和本地服务保持运行,但执行中的任务可能因模型请求发不出去而暂停或失败;网络恢复后本机会自动重连中转服务,刷新远程页面即可,无需重启
* **电脑休眠**:休眠后远程控制连接断开,任务可能暂停或失败。建议在系统设置中将电脑设为永不休眠,或在使用期间保持唤醒
* **本地进程退出**:按 `Ctrl+C` 或关闭终端后远程控制停止,设备从远程列表中下线。重新启动后可恢复
* **结束远程连接但保留本地任务**:直接关闭网页即可,本机任务不受影响
远程控制和 Kimi Code 网页版有什么区别? [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E8%BF%9C%E7%A8%8B%E6%8E%A7%E5%88%B6%E5%92%8C-kimi-code-%E7%BD%91%E9%A1%B5%E7%89%88%E6%9C%89%E4%BB%80%E4%B9%88%E5%8C%BA%E5%88%AB)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[Kimi Code 网页版](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html)
是本机或局域网里的图形界面,远程控制把它延伸到了公网任意设备:
| 对比项 | Kimi Code 网页版 | 远程控制 |
| --- | --- | --- |
| 访问范围 | 本机 `localhost`,或 `--host` 开启的局域网 | 公网任意设备(经 Kimi 中转) |
| 启动方式 | 终端运行 `kimi web` | `kimi rc`、`kimi web --remote-control` 或 CLI 中 `/remote-control` |
| 鉴权方式 | 本地 token | 登录同一个 Kimi 账号 |
| 数据与执行位置 | 本机 | 本机(网页只是远程窗口) |
| 典型场景 | 本机浏览器图形界面操作 | 手机、平板、另一台电脑远程跟进 |
网页界面的详细功能见 [在网页中使用](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html)
。
安全与权限 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E5%AE%89%E5%85%A8%E4%B8%8E%E6%9D%83%E9%99%90)
---------------------------------------------------------------------------------------------------------------------------------
### 远程设备如何鉴权 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E8%BF%9C%E7%A8%8B%E8%AE%BE%E5%A4%87%E5%A6%82%E4%BD%95%E9%89%B4%E6%9D%83)
远程设备必须登录与本机相同的 Kimi 账号,才能查看和控制会话。不会向其他账号暴露你的设备,也不存在无需登录即可访问的公开链接。
### 访问链接是否包含敏感信息 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E8%AE%BF%E9%97%AE%E9%93%BE%E6%8E%A5%E6%98%AF%E5%90%A6%E5%8C%85%E5%90%AB%E6%95%8F%E6%84%9F%E4%BF%A1%E6%81%AF)
访问链接本身不包含会话数据或本地 token,所有内容都需要登录后按账号权限展示。但它是这台机器的远程控制入口,启动信息中也会提示不要分享给他人。
常见问题 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)
-----------------------------------------------------------------------------------------------------------------------
### 从微信里访问链接,无法打开怎么办? [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E4%BB%8E%E5%BE%AE%E4%BF%A1%E9%87%8C%E8%AE%BF%E9%97%AE%E9%93%BE%E6%8E%A5-%E6%97%A0%E6%B3%95%E6%89%93%E5%BC%80%E6%80%8E%E4%B9%88%E5%8A%9E)
微信内置浏览器会基于自身安全策略限制部分外部网页的应用内访问,远程控制的访问链接(`https://code-rc.kimi.com/…`)在微信中直接打开可能被拦截,出现"已停止访问该网页"等提示。
解决方式:点击页面右上角"…"菜单并选择"在浏览器中打开",或将链接复制到 Safari、Chrome 等系统浏览器中访问。使用微信"扫一扫"扫描启动二维码时同理,扫码后请选择在浏览器中打开,即可获得完整的会话功能。
### 关闭浏览器后任务会停止吗? [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E5%85%B3%E9%97%AD%E6%B5%8F%E8%A7%88%E5%99%A8%E5%90%8E%E4%BB%BB%E5%8A%A1%E4%BC%9A%E5%81%9C%E6%AD%A2%E5%90%97)
不会。浏览器只是窗口,任务在本机执行。关闭网页不影响本机继续运行,重新打开链接即可恢复视图。
### 关闭本地终端后还能继续吗? [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E5%85%B3%E9%97%AD%E6%9C%AC%E5%9C%B0%E7%BB%88%E7%AB%AF%E5%90%8E%E8%BF%98%E8%83%BD%E7%BB%A7%E7%BB%AD%E5%90%97)
不能。远程控制依赖本机的远程控制进程保持运行,进程退出后远程连接即断开。重新启动后可恢复。
### 手机能直接访问本地文件吗? [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E6%89%8B%E6%9C%BA%E8%83%BD%E7%9B%B4%E6%8E%A5%E8%AE%BF%E9%97%AE%E6%9C%AC%E5%9C%B0%E6%96%87%E4%BB%B6%E5%90%97)
不能。手机端没有直接访问本机文件系统的通道:你在手机上看到的是会话界面里展示的内容(例如 AI 修改文件后的 diff 和文件卡片),但文件的读写和命令执行都发生在本机。手机无法脱离会话,直接浏览、打开或下载本机文件。
### 远程连接失败如何排查? [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E8%BF%9C%E7%A8%8B%E8%BF%9E%E6%8E%A5%E5%A4%B1%E8%B4%A5%E5%A6%82%E4%BD%95%E6%8E%92%E6%9F%A5)
按以下顺序检查:
1. **唤醒状态**:确认本机处于唤醒状态,没有进入休眠
2. **网络连通性**:本机能否正常访问互联网
3. **进程状态**:本机的远程控制进程是否正在运行
4. **账号一致性**:网页端登录的 Kimi 账号与本机是否一致
5. **防火墙与代理**:公司网络或代理是否拦截了 `code-rc.kimi.com`
下一步 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
-------------------------------------------------------------------------------------------------------------
* [在网页中使用](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html)
— 远程控制打开的就是网页界面,了解界面本身的功能与操作
---
# 平台与模型 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#VPContent)
Return to top
平台与模型 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#%E5%B9%B3%E5%8F%B0%E4%B8%8E%E6%A8%A1%E5%9E%8B)
===================================================================================================================================
Kimi Code CLI 支持同时接入多家模型供应商服务,模型在供应商之上声明自己的名称、上下文长度和能力。本页介绍如何在 `config.toml` 里配置各种供应商。
支持的供应商类型 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#%E6%94%AF%E6%8C%81%E7%9A%84%E4%BE%9B%E5%BA%94%E5%95%86%E7%B1%BB%E5%9E%8B)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
`providers` 表里的 `type` 字段决定使用哪种协议实现:
| 类型 | 协议 | 典型用途 |
| --- | --- | --- |
| [`kimi`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#kimi) | OpenAI 兼容 | Kimi Code 托管服务、Kimi Platform API 密钥 |
| [`anthropic`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#anthropic) | Anthropic Messages | Claude 系列模型 |
| [`openai`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#openai) | OpenAI Chat Completions | OpenAI 及兼容服务、DeepSeek、Qwen 等 |
| [`openai_responses`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#openai-responses) | OpenAI Responses API | OpenAI 较新的 Responses 接口 |
| [`google-genai`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#google-genai) | Google GenAI | Gemini API |
| [`vertexai`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#vertexai) | Google GenAI on Vertex | Google Cloud Vertex AI |
所有供应商默认以流式方式与模型交互。thinking、视觉、工具调用等能力按模型名前缀自动匹配,通常不需要手动声明。
**凭证优先级**:`api_key` 或 `api_key_env`(互斥替代项,只能设置其中一个)> `[providers..env]` 子表键(两者都不存在时才读)> 全部缺失时启动报错。除显式声明的 `api_key_env` 外,CLI 不会从 shell 环境变量自动取凭证,详见[配置覆盖:供应商凭证](https://www.kimi.com/code/docs/kimi-code-cli/configuration/overrides.html#%E4%BE%9B%E5%BA%94%E5%95%86%E5%87%AD%E8%AF%81)
。
`/provider` — 交互式供应商管理 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#provider-%E2%80%94-%E4%BA%A4%E4%BA%92%E5%BC%8F%E4%BE%9B%E5%BA%94%E5%95%86%E7%AE%A1%E7%90%86)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
不想手动编辑 TOML?在 TUI 里输入 `/provider` 打开**供应商管理器**,可以以交互方式添加或删除供应商。

管理器按来源把供应商显示为一行行条目。操作方式:
* ↑/↓ 移动光标,←/→ 翻页
* `d` 键删除当前供应商(有 `[y/N]` 确认)
* 在 `[ Add New Platform ]` 行按 Enter 添加新供应商
添加时有两条路径:
* **Known third-party provider**:从 [models.dev](https://models.dev/)
拉取模型目录,选供应商 → 输入 API 密钥 → 选默认模型。目录未声明协议类型的供应商(如 xai、openrouter 这类厂商专用 SDK)会按 OpenAI 兼容协议导入并显示 "guessed" 提示;目录没有可用端点时会先弹出 base URL 输入框;Amazon Bedrock / Cohere 等专有协议和无法识别的显式协议会被拒绝导入。已下线(deprecated)和 alpha 状态的模型不会出现在导入列表中。如果公共目录不可达,CLI 会回退到内置目录快照,离线或网络受限环境下也能完成导入
* **Custom registry (api.json)**:粘贴自定义 registry 地址,私有 registry 再附上 Bearer token,CLI 自动创建 `providers` / `models` 条目。当 registry 条目声明了 `env` 字段(存放 API 密钥的环境变量名)时,CLI 会把它作为提示打印出来——想用就在 `config.toml` 里自己设置 `api_key_env`。绑定永远不会自动发生:registry 既决定变量名、又决定凭证发往的端点,不能由它来选择读取你的哪份密钥。对私有 registry,Bearer token 本身仍会存为 `source.apiKey`,供刷新时重新拉取。后续启动时,同一个 registry 地址下的供应商会一起刷新,因此上游新增、删除供应商以及模型元数据变化都会同步。
WARNING
通过 `/login` 登录的 Kimi Code OAuth 托管账号不会在 `/provider` 里显示,请用 `/login` 和 `/logout` 管理。
非交互环境下也可以用 shell 命令完成同样操作:[`kimi provider`](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-provider)
。
`kimi` [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#kimi)
-------------------------------------------------------------------------------------------
用于对接 Moonshot AI 的 OpenAI 兼容接口,包括 Kimi Code 托管服务和 Kimi Platform API 密钥。
* 默认 `base_url`:`https://api.moonshot.ai/v1`
* 凭证键名:`KIMI_API_KEY`、`KIMI_BASE_URL`
* 额外能力:支持视频上传
toml
[providers.kimi]
type = "kimi"
base_url = "https://api.moonshot.ai/v1"
api_key = "sk-xxxxx"
> 使用 Kimi Code 托管服务时,`/login` 登录后会自动配置 `base_url` 和凭证,无需手动填写。
`anthropic` [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#anthropic)
-----------------------------------------------------------------------------------------------------
用于对接 Claude API。标准 Claude 模型自动启用视觉、工具调用及 Thinking(如支持);自定义或未覆盖的模型需在 `[models.]` 里显式声明 `capabilities`。
* 默认 `base_url`:跟随 Anthropic SDK 默认值
* 凭证键名:`ANTHROPIC_API_KEY`、`ANTHROPIC_BASE_URL`
* 默认 `max_tokens`:按模型自动推断。如需覆盖,在模型别名上设 `max_output_size`
toml
[providers.anthropic]
type = "anthropic"
api_key = "sk-ant-xxxxx"
[models."claude-opus-4-7"]
provider = "anthropic"
model = "claude-opus-4-7"
max_context_size = 200000
# max_output_size = 32000 # 可选,省略时使用模型推断的默认值
`openai` [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#openai)
-----------------------------------------------------------------------------------------------
用于对接 OpenAI Chat Completions 协议,也可连接任何兼容该协议的第三方服务(覆盖 `base_url` 即可)。
第三方推理模型(DeepSeek、Qwen、One API 等)开箱即用:CLI 自动处理 `reasoning_content` 字段和 `reasoning_effort` 注入。如果你的网关用非标准字段名返回推理内容,在模型别名上设 `reasoning_key` 覆盖。
* 默认 `base_url`:`https://api.openai.com/v1`
* 凭证键名:`OPENAI_API_KEY`、`OPENAI_BASE_URL`
toml
[providers.openai]
type = "openai"
base_url = "https://api.openai.com/v1"
api_key = "sk-xxxxx"
`openai_responses` [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#openai-responses)
-------------------------------------------------------------------------------------------------------------------
对应 OpenAI 较新的 Responses API,始终以流式方式工作。配置方式与 `openai` 相同。
* 默认 `base_url`:`https://api.openai.com/v1`
* 凭证键名:`OPENAI_API_KEY`、`OPENAI_BASE_URL`
toml
[providers.openai-responses]
type = "openai_responses"
base_url = "https://api.openai.com/v1"
api_key = "sk-xxxxx"
`google-genai` [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#google-genai)
-----------------------------------------------------------------------------------------------------------
用于直连 Google Gemini API。thinking、视觉及多模态能力按模型名自动识别。
* 凭证键名:`GOOGLE_API_KEY`
toml
[providers.gemini]
type = "google-genai"
api_key = "xxxxx"
如需经由兼容 Gemini 协议的代理/网关访问,可设置 `base_url`(或 `GOOGLE_GEMINI_BASE_URL` 环境变量);不填时使用 SDK 默认地址 `https://generativelanguage.googleapis.com`。
> 只填**主机根地址**。Google GenAI SDK 会自行追加 API 版本与路径(如 `/v1beta/models/:generateContent`),所以结尾带 `/v1beta` 会导致路径重复成 `/v1beta/v1beta/…`。
toml
[providers.gemini]
type = "google-genai"
api_key = "xxxxx"
base_url = "https://your-gateway.example"
`vertexai` [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#vertexai)
---------------------------------------------------------------------------------------------------
与 `google-genai` 共用实现,`type = "vertexai"` 时切换到 Vertex AI 访问路径。
认证走 Google Cloud 标准 ADC 流程(`gcloud auth application-default login` 或 `GOOGLE_APPLICATION_CREDENTIALS` 服务账号 JSON),这部分与 Kimi Code 无关。**项目 ID 和区域必须写在 `[providers.vertexai.env]` 子表里**。直接在 shell 里 `export GOOGLE_CLOUD_PROJECT` 不会被 CLI 读取。
toml
[providers.vertexai]
type = "vertexai"
[providers.vertexai.env]
GOOGLE_CLOUD_PROJECT = "my-gcp-project"
GOOGLE_CLOUD_LOCATION = "us-central1"
sh
gcloud auth application-default login # 一次性完成认证
kimi
如需让 Vertex 请求走自定义(如代理)端点,可设置 `base_url`(或 `GOOGLE_VERTEX_BASE_URL` 环境变量);不填时使用 SDK 默认的区域化 `*-aiplatform.googleapis.com` 地址。与 `google-genai` 一样,只填主机根地址。SDK 会自行追加 `/v1beta1/publishers/google/models/…`。
下一步 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
---------------------------------------------------------------------------------------------------------------
* [配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html)
— `providers` 和 `models` 表的完整字段参考
* [配置覆盖](https://www.kimi.com/code/docs/kimi-code-cli/configuration/overrides.html)
— 供应商凭证的解析优先级规则
* [环境变量](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html)
— 各供应商对应的凭证键名列表
---
# Membership Benefits | Kimi Code Docs
[Skip to content](https://www.kimi.com/code/docs/en/kimi-code/membership#VPContent)
Return to top
Membership Benefits [](https://www.kimi.com/code/docs/en/kimi-code/membership#membership-benefits)
====================================================================================================
📢 New plans released
The new Kimi membership plans are now available, with pricing unchanged — see the [Kimi Code plan page](https://www.kimi.ai/code/#pricing)
for plan details and pricing. For new members, **the weekly quota limit is removed**, and only the rolling 5-hour rate window remains. The Go tier has no coding quota; Plus and above can use Kimi Code. Existing subscribers on legacy plans are not affected: the tier name, quota rules, and auto-renewal all remain as they are. See the [plan comparison](https://www.kimi.com/code/docs/en/kimi-code/membership#plan-comparison)
below for the differences between the legacy and new plans.
Overview [](https://www.kimi.com/code/docs/en/kimi-code/membership#overview)
------------------------------------------------------------------------------
Kimi Code is the developer-focused AI coding service within [Kimi membership benefits](https://www.kimi.com/membership/pricing?from=kfc_docs_membership)
, provided together with a Kimi membership subscription and sharing the same quota. Requests from the CLI, VS Code, Desktop, and third-party tools all count toward that quota.
See the [Kimi membership page](https://www.kimi.com/membership/pricing?from=kfc_docs_membership)
for tiers and pricing.
Membership Tiers [](https://www.kimi.com/code/docs/en/kimi-code/membership#plan-comparison)
---------------------------------------------------------------------------------------------
Kimi membership tiers have been renamed, with pricing unchanged. Here is how the new plans compare with the legacy ones:
| Item | Legacy plans | New plans |
| --- | --- | --- |
| Kimi Code availability | Andante and above | Plus and above |
| 5-hour rate window | Yes | Yes |
| Weekly rate window | Yes | No |
| Monthly total quota | Yes | Yes |
| K3 access | Moderato and above | Plus and above |
| K3 1M context | Allegretto and above | Pro and above |
| HighSpeed access | Allegretto and above | Pro and above |
**FAQ**
Can I keep using my legacy plan?
Yes. Legacy plans purchased before the new plans launched remain usable. When the term ends, you can renew or upgrade to a new plan.
Do I have to upgrade to a new plan?
No — migration is optional. Your legacy plan keeps renewing as long as you stay subscribed; whether to upgrade depends on your needs.
How do I upgrade my plan?
On the [Kimi Code plan page](https://www.kimi.ai/code/#pricing)
, pick the new plan you want and click "Subscribe" to complete payment. Your current plan's remaining days are prorated automatically, and the new plan takes effect immediately.
Quota and Limits [](https://www.kimi.com/code/docs/en/kimi-code/membership#quota-and-limits)
----------------------------------------------------------------------------------------------
Quota rules differ between new and existing members:
* **New members**: the weekly quota limit is removed — quota no longer refreshes every 7 days. The **rolling 5-hour rate window** still applies: too many requests in a short time trigger rate limiting, which recovers automatically once the window rolls over.
* **Existing members on legacy plans**: rules are unchanged — quota **refreshes automatically every 7 days** from your subscription date, unused quota does not roll over, and the same 5-hour rolling rate window applies.
Both groups share the Kimi membership monthly total quota: if the monthly total is reached, Kimi Code quota is frozen until the monthly quota resets or you upgrade. Monthly usage can be viewed on the [Subscription](https://www.kimi.com/membership/subscription)
page.
All logged-in devices and API Keys share the same quota; devices inactive for over 30 days are automatically unbound and can be restored by running `/login` again. Log in to the [Kimi Code Console](https://www.kimi.com/code/console)
at any time to check remaining quota and rate-limit status and to manage API Keys and devices.
Extra Usage [](https://www.kimi.com/code/docs/en/kimi-code/membership#extra-usage)
------------------------------------------------------------------------------------
When your subscription quota runs out, you can keep making requests using your Extra Usage balance without waiting for a refresh. Only subscribed members can enable it, and **Kimi on the web and Kimi Code share the same Extra Usage balance**. See the full terms in the [Extra Usage Agreement](https://www.kimi.com/user/agreement/extra-usage-rules-cn)
.

**Top-up entry points**
* **From the main site**: go to the Kimi [Subscription page](https://www.kimi.com/membership/subscription?tab=quota)
, scroll to the "Extra Usage" module at the bottom then choose an amount and complete payment.
* **From the Kimi Code Console**: once your weekly quota (existing members on legacy plans) or 5-hour quota reaches over **80%** used, the progress card shows a **Buy Extra Usage** button that takes you to the subscription page to purchase.

**Enabling and managing**
Turn on the "Extra Usage" toggle, and when your subscription quota runs out, the system automatically deducts from your Extra Usage balance. Click **Settings** in the module to enable a **monthly spending cap** and set the maximum you can spend this month; the progress bar shows this month's Extra Usage consumption in real time.
**Billing and rules**
* **Billing**: charged by actual usage — the more content read and generated, and the more complex the task, the higher the cost; the balance is shown in RMB, with rates as displayed on the platform. Extra Usage pricing is close to the official API pricing of the [Kimi Open Platform](https://platform.kimi.com/)
; for heavy usage, upgrading your subscription is usually more cost-effective.
* **Deduction priority**: time-limited quotas such as the subscription are deducted first; **Extra Usage is deducted last** as a fallback. Once enabled, even if your subscription quota is maxed out, Extra Usage is consumed seamlessly and tasks don't stop or error out.
* **Spending cap**: enable a "monthly spending cap" in settings to limit how much Extra Usage can be spent this month; without it, there is no cap.
* **Validity and stacking**: the balance does not expire and stacks across top-ups; it remains usable after the subscription lapses, but you can't top up during the lapse — re-subscribe first to top up again.
* **Refunds**: generally non-refundable, non-transferable, and non-redeemable.
> Billing example (from official examples, for a rough sense of scale; actual rates per the platform): a simple request (e.g. "recommend a rock song") costs about **¥0.03**; a complex multi-step task (e.g. "plan a week-long road trip from Chengdu to western Sichuan") costs about **¥1.6**.
> Top-up limits: minimum ¥25 per top-up, up to 10 times and ¥3,000 per day, with a balance cap of ¥10,000.
**Checking your usage**
* **Kimi web / app**: Settings → Subscription & Invoices → [My Quota](https://www.kimi.com/membership/subscription?tab=quota)
.
* **Kimi Code Console**: **once Extra Usage is enabled**, log in to the [Console](https://www.kimi.com/code/console)
to view your balance and usage.
* **Kimi Code CLI**: type `/usage` on the command line to check directly.

**FAQ**
Do Kimi on the web and Kimi Code use the same Extra Usage wallet?
Yes. The Extra Usage balance is shared between Kimi and Kimi Code — top up once and use it in both; the Extra Usage you top up under "My Quota" and the one in the Kimi Code Console are the same balance.
Which is deducted first, Extra Usage or subscription quota?
Time-limited quotas such as the subscription are deducted first; Extra Usage is only deducted as a fallback once all time-limited quotas are exhausted.
When I hit the monthly / weekly (legacy plans) / hourly limit, or get rate-limited mid-session, can I keep going?
Yes. Once Extra Usage is enabled you're not affected by subscription limits — whenever any quota is reached it seamlessly switches to the Extra Usage balance, so tasks don't stop or error out, and only Extra Usage is deducted without affecting your membership quota refresh.
How is Extra Usage billed, and how does it compare with a same-priced subscription or Open Platform API?
Billing depends on the request's input/output volume and cache hit rate; Extra Usage pricing is close to the [Kimi Open Platform](https://platform.kimi.com/)
's official API, and for heavy usage upgrading your subscription is usually more cost-effective.
Can unused balance roll over to next month, and does it stack?
Yes — it's credit-based, doesn't expire, and stacks; it stays usable after the subscription lapses, but you can't top up during the lapse and must re-subscribe to top up again.
When the balance is nearly used up (e.g. a 25 RMB top-up), will the current request finish?
It guarantees the "last model call" completes even if its billing exceeds the limit, but it doesn't guarantee the whole task will finish.
Is Extra Usage available for Enterprise?
Not yet supported.
After I close my account, is the balance refunded?
To request a refund, go to [Kimi.ai](https://www.kimi.com/)
on the web, click your profile picture in the bottom-left corner, then select **Get Help** → **User Feedback** to reach our support team.
Next steps [](https://www.kimi.com/code/docs/en/kimi-code/membership#next-steps)
----------------------------------------------------------------------------------
* [Model configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html)
— models, context windows, and switching methods available for each tier
* [Error reference](https://www.kimi.com/code/docs/en/kimi-code/error-reference.html)
— how to handle errors such as quota exhaustion and insufficient permissions
---
# 在网页中使用 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#VPContent)
Return to top
在网页中使用 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#%E5%9C%A8%E7%BD%91%E9%A1%B5%E4%B8%AD%E4%BD%BF%E7%94%A8)
================================================================================================================================
Kimi Code Web 是 Kimi Code CLI 内置的浏览器图形界面:在终端运行 `kimi web`,就能在浏览器里新建会话、对话、处理审批、查看文件改动——界面更易读,会话和数据仍全部保存在你的本机。

开始使用 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#%E5%BC%80%E5%A7%8B%E4%BD%BF%E7%94%A8)
------------------------------------------------------------------------------------------------------------
1 **安装并登录 Kimi Code CLI**
`kimi web` 是 CLI 的内置命令,未安装 CLI 时不可用。安装与登录见 [开始使用](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html)
。
2 **在终端运行 `kimi web`**
如果你已经在 CLI 里,也可以输入 `/web`,把当前会话交接到浏览器。
3 **服务就绪后自动用默认浏览器打开 Web 界面**
启动横幅会打印访问地址,浏览器没有自动打开时,手动复制这行地址打开即可:
text
Local: http://127.0.0.1:58627/#token=...
Token: ...
Stop: Ctrl+C
注意
地址里的 `#token=` 是访问凭证,请勿外发,停止服务在终端按 `Ctrl+C`。
### 启动选项 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#%E5%90%AF%E5%8A%A8%E9%80%89%E9%A1%B9)
| 选项 | 说明 |
| --- | --- |
| `--port ` | 绑定端口;默认 `58627`,被占用时自动 +1 重试 |
| `--host [host]` | 实现同一局域网下的手机、平板或其他电脑都能用 web 地址访问,也可指定 IP,如 `--host 192.168.1.10` |
| `--no-open` | 就绪后不自动打开浏览器 |
| `--log-level ` | 按所选级别开启服务日志;默认不输出 |
### 常用斜杠命令 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#%E5%B8%B8%E7%94%A8%E6%96%9C%E6%9D%A0%E5%91%BD%E4%BB%A4)
| 斜杠命令 | 说明 |
| --- | --- |
| `/new` | 新开会话 |
| `/goal` | 进入目标模式,跨轮次持续推进同一目标 |
| `/compact` | 压缩当前会话上下文 |
| `/tower` | Tower 多 Agent 协作(实验功能),`/tower ` 指定基准分支 |
| `/export` | 导出会话内容与故障排查日志为 ZIP |
| `/remote-control` | 开启远程控制,从远程访问本地 Web 会话 |
与 CLI 的关系 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#%E4%B8%8E-cli-%E7%9A%84%E5%85%B3%E7%B3%BB)
----------------------------------------------------------------------------------------------------------------------
Web 界面和 CLI 共享同一份登录态、配置(`config.toml`)和会话数据。
Web 支持的斜杠命令见上文 [常用斜杠命令](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#%E5%B8%B8%E7%94%A8%E6%96%9C%E6%9D%A0%E5%91%BD%E4%BB%A4)
,与 CLI 不完全一致;部分 CLI 指令在 Web 里有对应的图形入口(设置页、模型选择器、账户菜单、任务面板)。
两端能力对照如下:
| 功能 | CLI | Web | 说明 |
| --- | --- | --- | --- |
| 流式对话 | ✓ | ✓ | Web 为富格式增量渲染(表格、代码高亮、diff、工具卡片) |
| 会话管理 | ✓ | ✓ | Web 可把不常用的会话归档收起,在已归档页按时间排序、随时恢复;Open / Done / Workspaces 标签页为 Lab 实验特性,默认关闭,需在设置的 Lab 页开启 |
| 审批处理 | ✓ | ✓ | Web 可在图形页面中点击处理,无需指令 |
| 后台任务 | ✓ | ✓ | Web 为任务面板实时展示进度 |
| 文件与改动 | ✓ | ✓ | Web 有改动文件摘要卡与逐文件 diff |
| 设置 | ✓ | ✓ | Web 另有图形化设置页(供应商、账号与用量、Lab 实验特性) |
| 全局搜索 | — | ✓ | Web 可实现跨会话、跨工作区搜索 |
| 移动端适配 | — | ✓ | `--host` 开启局域网共享后,可实现在同一局域网下的手机浏览器中使用 |
安全注意 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#%E5%AE%89%E5%85%A8%E6%B3%A8%E6%84%8F)
------------------------------------------------------------------------------------------------------------
* **建议设置并列凭证**:绑定局域网地址后,额外设置 `KIMI_CODE_PASSWORD` 环境变量,服务端会对鉴权失败自动限流。
* **不要彻底关闭鉴权**:`--dangerous-bypass-auth` 会关闭所有鉴权,任何能访问该端口的人都能控制你的会话、文件系统和 shell。仅在可信网络或自有鉴权代理之后使用,详见 [kimi 命令参考](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-web)
。
常见问题 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)
------------------------------------------------------------------------------------------------------------
### 端口被占用了怎么办 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#%E7%AB%AF%E5%8F%A3%E8%A2%AB%E5%8D%A0%E7%94%A8%E4%BA%86%E6%80%8E%E4%B9%88%E5%8A%9E)
不用处理。`kimi web` 会自动用下一个端口重试(58628、58629……),以启动横幅里实际打印的地址为准。
### 浏览器打不开地址 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#%E6%B5%8F%E8%A7%88%E5%99%A8%E6%89%93%E4%B8%8D%E5%BC%80%E5%9C%B0%E5%9D%80)
先确认终端里的服务还在运行(它前台挂在这个终端上)。地址必须完整复制,包含 `#token=` 部分;只输 `http://127.0.0.1:58627` 会停在输入 token 的页面,手动粘贴横幅里的 `Token` 值也可以进入。
### token 失效了怎么恢复 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#token-%E5%A4%B1%E6%95%88%E4%BA%86%E6%80%8E%E4%B9%88%E6%81%A2%E5%A4%8D)
运行 `kimi web rotate-token` 生成新 token,然后用启动横幅里的新地址重新打开。所有运行中的实例会自动换用新 token,无需重启。
### 同一 WiFi 下其他设备访问不到 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#%E5%90%8C%E4%B8%80-wifi-%E4%B8%8B%E5%85%B6%E4%BB%96%E8%AE%BE%E5%A4%87%E8%AE%BF%E9%97%AE%E4%B8%8D%E5%88%B0)
确认启动时带了 `--host`(裸写即可),并用横幅中局域网地址(形如 `http://192.168.x.x:58627/#token=...`)访问。仍不通时检查电脑防火墙是否放行了该端口,以及两台设备是否真的在同一网段(访客 WiFi、VPN、4G/5G 热点切换都会造成隔离)。
下一步 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
--------------------------------------------------------------------------------------------------
* [服务 API](https://www.kimi.com/code/docs/kimi-code-cli/reference/server-api.html)
— 面向脚本与第三方集成的 REST / WebSocket 接口(实验性)
* [kimi 命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-web)
— `kimi web` 的全部命令行选项
* [远程控制](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html)
— 从公网任意设备远程查看和接管本机会话
---
# 会话与上下文 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-cli/guides/sessions.html#VPContent)
Return to top
会话与上下文 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/sessions.html#%E4%BC%9A%E8%AF%9D%E4%B8%8E%E4%B8%8A%E4%B8%8B%E6%96%87)
=====================================================================================================================================
Kimi Code CLI 把每次对话持久化为一个「会话」,保留消息历史和元数据,可以随时关闭终端后再回来继续。本页介绍如何恢复会话、管理上下文,以及导出和派生会话。
会话存储 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/sessions.html#%E4%BC%9A%E8%AF%9D%E5%AD%98%E5%82%A8)
-----------------------------------------------------------------------------------------------------------------
所有会话保存在 `$KIMI_CODE_HOME/sessions/` 下(默认 `~/.kimi-code/sessions/`),按工作目录分组存放:
text
~/.kimi-code/
├── config.toml
├── session_index.jsonl
└── sessions/
└── /
└── /
├── state.json
└── agents/
├── main/
│ └── wire.jsonl
└── /
└── wire.jsonl
* `state.json`:会话标题、创建时间等元数据。
* `agents/*/wire.jsonl`:Agent 事件流,用于会话恢复和回放;同时记录发给模型的请求轨迹(工具 schema、请求参数、MCP 工具清单),便于调试。
注意
`sessions/` 目录下的文件请勿手动编辑,否则可能导致会话无法正常恢复。
启动与恢复会话 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/sessions.html#%E5%90%AF%E5%8A%A8%E4%B8%8E%E6%81%A2%E5%A4%8D%E4%BC%9A%E8%AF%9D)
-----------------------------------------------------------------------------------------------------------------------------------------------
每次直接运行 `kimi` 都会创建新会话。以下方式可以恢复历史会话:
**继续当前目录最近的会话:**
sh
kimi --continue
**恢复指定会话(通过 ID):**
sh
kimi --session abc123
**交互式浏览历史会话并选择:**
sh
kimi --session
注意
`--continue` 与 `--session` 互斥。
在 TUI 中切换会话 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/sessions.html#%E5%9C%A8-tui-%E4%B8%AD%E5%88%87%E6%8D%A2%E4%BC%9A%E8%AF%9D)
-----------------------------------------------------------------------------------------------------------------------------------------------
不离开当前终端也可以管理会话,以下斜杠命令仅在 Agent 空闲时可用:
* **`/new`**(别名 `/clear`):切换到新会话,丢弃当前上下文。
* **`/sessions`**(别名 `/resume`):浏览并恢复历史会话。
* **`/fork`**:派生当前会话(详见下文)。
* **`/title `**(别名 `/rename`):设置会话标题方便识别;不带参数时显示当前标题。
上下文压缩 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/sessions.html#%E4%B8%8A%E4%B8%8B%E6%96%87%E5%8E%8B%E7%BC%A9)
---------------------------------------------------------------------------------------------------------------------------
对话变长时,Kimi Code CLI 会在上下文接近窗口上限时自动压缩历史消息,释放 token 空间。也可以随时手动触发:
/compact
压缩时可以附带指引,告诉模型优先保留哪些信息:
/compact 保留与数据库迁移相关的讨论
派生会话 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/sessions.html#%E6%B4%BE%E7%94%9F%E4%BC%9A%E8%AF%9D)
-----------------------------------------------------------------------------------------------------------------
想在不破坏当前对话的前提下尝试新思路,使用 `/fork`:
/fork
fork 后你仍停留在原会话,对话不受影响、可以直接继续;派生出的副本与原会话彼此独立,可以随时通过 `/sessions` 切换过去。已保存的 `/goal` 不会复制到派生会话。如果你想在派生会话中进行自主 goal 工作,需要在那里开始一个新 goal。
fork 完成后,CLI 会打印一条可直接运行的 `kimi --resume` 命令(并自动复制到剪贴板),方便你在新终端进程中直接进入派生会话。
导出会话 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/sessions.html#%E5%AF%BC%E5%87%BA%E4%BC%9A%E8%AF%9D)
-----------------------------------------------------------------------------------------------------------------
用 `kimi export` 把会话打包为 ZIP,适合分享、归档或提交问题反馈:
sh
kimi export
不传 `sessionId` 时导出当前目录最近的会话(有交互式确认,加 `-y` 跳过)。用 `-o` 指定输出路径:
sh
kimi export -o ~/Desktop/my-session.zip
导出包含会话目录下的所有文件,包括诊断日志。全局诊断日志(`~/.kimi-code/logs/kimi-code.log`)默认也会打包;如不需要,加 `--no-include-global-log` 排除。
也可以在 TUI 内导出,无需离开交互界面:
* **`/export-debug-zip`**:产生与 `kimi export` 相同的调试 ZIP。
* **`/export-md`**(别名 `/export`):导出为人类可读的 Markdown 对话记录,适合分享或存档。可选接收路径参数;不带参数时写入工作目录下的 `kimi-export--.md`。
在 web UI 中,`/export` 会把当前会话下载为诊断 ZIP。压缩包包含持久化的会话数据、诊断日志,以及记录浏览器关键事件且大小有上限、只含元数据的 `logs/kimi-web.jsonl`;提示词正文、WebSocket 内容和 console 参数不会写入这份浏览器日志。这里的 web 命令与上面的 TUI `/export` 别名行为不同。
提示
导出文件可能包含代码、命令输出和路径等敏感信息,分享前请先确认内容。
下一步 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/sessions.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
-------------------------------------------------------------------------------------------------------
* [数据路径](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html)
— 会话文件的完整目录结构说明
* [kimi 命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html)
— `--continue`、`--session`、`export` 等命令的完整参数参考
---
# 交互与输入 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#VPContent)
Return to top
交互与输入 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E4%BA%A4%E4%BA%92%E4%B8%8E%E8%BE%93%E5%85%A5)
==============================================================================================================================
Kimi Code CLI 以交互式 TUI 运行,核心由输入框、对话视图和状态栏三部分组成。本页介绍输入方式、媒体粘贴、审批流程和模式切换。
输入框基本操作 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E8%BE%93%E5%85%A5%E6%A1%86%E5%9F%BA%E6%9C%AC%E6%93%8D%E4%BD%9C)
--------------------------------------------------------------------------------------------------------------------------------------------------
输入框接受自由文本:`Enter` 发送,`Shift-Enter` 或 `Ctrl-J` 插入换行。输入框为空时按 `↑` / `↓` 浏览当前工作目录的历史输入,包括此前运行过的 Shell 命令。
**退出 CLI**:输入框为空时按 `Ctrl-D`,或空闲状态下连按 `Ctrl-C` 两次,或输入 `/exit`。流式输出期间按 `Ctrl-C` 或 `Esc` 是中断当前轮次,不会退出程序。
粘贴图片与视频 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E7%B2%98%E8%B4%B4%E5%9B%BE%E7%89%87%E4%B8%8E%E8%A7%86%E9%A2%91)
--------------------------------------------------------------------------------------------------------------------------------------------------
Kimi Code CLI 支持在输入框中直接粘贴图片和视频,让 AI 结合视觉内容理解你的问题——截图报错、UI 设计图、架构图,直接粘贴进去就能讨论,无需上传或转存。
**视频输入是 Kimi Code 的特色能力**,支持直接粘贴视频片段让模型分析其中的内容、界面流程或代码演示。
操作方式:
* **macOS / Linux**:`Ctrl-V`
* **Windows**:`Alt-V`
粘贴后输入框显示占位符,可像普通文本一样编辑;提交时自动替换为实际内容。纯文本剪贴板会回退到普通粘贴。媒体功能是否可用取决于当前模型的多模态能力(`image_in` / `video_in`),登录 Kimi Code 账号后默认开启。
当会话中累积的媒体超过 20 MB 时,最早的图片和视频会自动从请求中省略,并显示一条警告。
斜杠命令 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E6%96%9C%E6%9D%A0%E5%91%BD%E4%BB%A4)
--------------------------------------------------------------------------------------------------------------------
以 `/` 开头输入命令,补全菜单实时过滤,`Esc` 关闭;匹配不到时按普通消息发送。常用命令:
| 命令 | 作用 |
| --- | --- |
| `/new` | 新建会话 |
| `/sessions` | 浏览并恢复历史会话 |
| `/compact` | 压缩当前会话的上下文 |
| `/undo` | 撤销最近的提示词 |
| `/model` | 切换当前会话使用的模型 |
| `/plan` | 切换 Plan 模式(先出计划再动手) |
| `/yolo` | 打开权限模式列表并预选 "Ask When Needed"(常规修改和命令自动完成) |
| `/goal` | 开始或管理目标模式 |
| `/help` | 查看全部命令 |
已激活的 [Agent Skills](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html)
也会注册为斜杠命令(如 `/skill:`)。全部命令说明见[斜杠命令参考](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html)
。
文件引用 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E6%96%87%E4%BB%B6%E5%BC%95%E7%94%A8)
--------------------------------------------------------------------------------------------------------------------
键入 `@` 触发文件路径补全,选中后插入相对路径,Agent 读取消息时直接加载该文件内容。
* **适用范围**:git 与非 git 目录都可用;隐藏路径也可补全,`.git` 除外
* **文件夹候选**:以 `/` 结尾,可继续补全其下路径
* **降级行为**:快速搜索辅助工具仍在下载时,先回退到基础文件系统扫描
> `@` 引用和斜杠命令是两套机制:`@` 给 Agent 提供文件上下文,`/` 调用内置功能或 Skill。
审批流程 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E5%AE%A1%E6%89%B9%E6%B5%81%E7%A8%8B)
--------------------------------------------------------------------------------------------------------------------
Agent 调用会产生副作用的工具(修改文件、执行命令等)时,TUI 会弹出审批面板让你确认。
* **确认**:方向键选择后 `Enter`,或按 `1`/`2`/`3` 数字键直接选择
* **拒绝**:`Esc`、`Ctrl-C`、`Ctrl-D`
* **会话内放行**:选「Approve for this session」,本次会话内同类调用不再询问
* **永久规则**:在[配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#permission)
预置 allow / deny 规则
"Ask When Needed" 模式下的普通工具调用、Plan 模式下对计划文件的写入,不触发审批。
### 三种权限模式 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E4%B8%89%E7%A7%8D%E6%9D%83%E9%99%90%E6%A8%A1%E5%BC%8F)
**"Always Ask"**(始终询问,原 Manual)是默认模式:只读操作自动放行,修改文件、执行命令等其余操作都会逐一向你确认,适合需要全程掌控每个改动的场景。
**"Ask When Needed"**(必要时询问,原 YOLO)用 `/yolo` 开启,自动批准普通工具调用,适合已知安全的批处理任务。敏感操作仍会询问——例如访问 `.env`、SSH 私钥等敏感文件、执行 `shutdown`、`rm -rf` 这类危险命令,或退出 Plan 模式——Agent 也仍可能向你提问。
**"Never Ask"**(完全自动,原 Auto)用 `/auto` 开启,是完全无人值守模式:所有工具审批自动处理,包括敏感文件和计划退出,且 Agent 不会向你提问,完全由它自己做决定。内置的危险命令拦截会在 "Always Ask" 和 "Ask When Needed" 模式下要求你确认 `shutdown`、`reboot`、`rm -rf` 这类命令;在 "Never Ask" 模式下这些命令直接执行,不再拦截。
模式切换 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E6%A8%A1%E5%BC%8F%E5%88%87%E6%8D%A2)
--------------------------------------------------------------------------------------------------------------------
### Plan 模式 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#plan-%E6%A8%A1%E5%BC%8F)
Plan 模式下,Agent 先输出行动计划,等待你确认后才动手修改文件,适合复杂或高风险任务。
* 切换:`Shift-Tab` 或 `/plan`
* 清除当前计划:`/plan clear`(仅空闲时)
Agent 输出方案后会等待你审批——可批准执行、拒绝、或要求修改。退出 Plan 模式需要你确认,即使开启了 "Ask When Needed" 模式也不例外。"Never Ask" 模式例外:计划退出会自动批准,并在记录中标记为 "Auto-approved"。
### Shell 模式 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#shell-%E6%A8%A1%E5%BC%8F)
Shell 模式让你不离开对话就能运行终端命令,命令输出会写入对话上下文,AI 在后续轮次能够看到这些结果。
* 进入:在空输入框中键入 `!`,或粘贴以 `!` 开头的命令。
* 退出:在空输入框中按 `Backspace` 或 `Esc`;提交命令后也会自动回到普通模式。
* 后台运行:命令执行期间按 `Ctrl+B` 可将其转为后台任务。
* 召回历史命令:在 Shell 模式的空输入框中按 `↑` 浏览此前运行过的 Shell 命令,召回后仍处于 Shell 模式,可再次作为命令执行。
* 长输出:命令输出过长时,结束后的输出卡片会自动折叠,按 `Ctrl-O` 可与工具输出一起展开或折叠。
进入 Shell 模式后,输入框左侧会显示 `!` 提示符,边框变为紫色。例如,无需新开终端就能运行 `!gh auth login` 登录 GitHub CLI,登录后 Kimi 就可以直接使用 `gh`。
### 目标模式 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E7%9B%AE%E6%A0%87%E6%A8%A1%E5%BC%8F)
目标(goal)让 Agent 在多个轮次中持续朝一个明确结果工作——普通提示词说「下一步做什么」,目标说的是「最终要达成什么状态」。适合终点清晰、结果可验证的任务,如修复一批失败的测试、追查并修复构建失败的根因。一次性修改或只需要一个答案的问题,用普通提示词更合适。
在 `/goal` 后写目标,写清完成条件和停止条件(目标最长 4000 个字符,超长会被拒绝,已输入的文本保留在输入框中):
sh
/goal 修复所有结算系统回退的漏洞,为每个修复补充测试,最后运行结算测试套件
避免 `/goal 找出代码库中的所有 bug` 这类宽泛写法——没有成功标准的目标,Agent 可能立刻进入「阻塞」状态,或工作得远超预期。明显无法完成的目标(如 `/goal 证明 1 + 1 = 3`)也会被直接标记为「阻塞」。
常用管理命令:
| 命令 | 作用 |
| --- | --- |
| `/goal` 或 `/goal status` | 查看当前目标及进展 |
| `/goal pause` / `/goal resume` | 暂停 / 继续目标 |
| `/goal cancel` | 取消目标(需确认,取消后无法继续) |
| `/goal replace ` | 用新目标替换当前目标 |
| `/goal next ` | 追加后续目标,当前目标完成后自动开始 |
目标有三种停止方式:**完成**:达成后自动清除并总结;**暂停**:手动暂停、中断轮次或出错;**阻塞**:Agent 无法按当前表述继续,会简短说明原因。时间预算只在目标活跃且会话打开时计时,会话关闭或目标暂停期间不计时,重新打开会话后用 `/goal resume` 按剩余预算继续。
Web 界面中,对话下方的目标条可直接暂停、继续或取消目标;点击目标条可展开详情,配置了 token 预算时会显示预算进度。
用 `/goal next ` 可以在不打断当前目标的情况下安排后续工作:当前目标运行期间后续目标对 Agent 不可见,完成后自动开始第一个。`/goal next manage` 打开交互式管理器,可调整顺序、编辑或删除(方向键浏览,`Space` 选择,`E` 编辑,`D` 删除,`Esc` 取消)。当前目标被暂停、取消或阻塞时,后续目标不会自动开始。
> 提示:`manual` 权限模式下目标可能停下来等待工具审批;非交互模式只支持创建目标(`kimi -p "/goal ..."`),完成时退出码 `0`、阻塞时 `3`、暂停时 `6`。
流式输出期间 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA%E6%9C%9F%E9%97%B4)
----------------------------------------------------------------------------------------------------------------------------------------
Agent 思考或调用工具时,输入框仍然可用,支持以下额外操作:
* **`Ctrl-S`**:把输入框中的内容立即注入正在运行的轮次,无需等待结束
* **`Esc` / `Ctrl-C`**:中断当前轮次
* **`Ctrl-O`**:全局切换工具输出和压缩摘要的折叠状态
Agent 正通过 `WaitFor` 等待后台任务时,按 `Ctrl-S` 会提前结束本次等待。后台任务继续运行,已有工具结果保留;如果同批还有其他前台工具,Agent 会在它们返回后处理新消息。
外部编辑器 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E5%A4%96%E9%83%A8%E7%BC%96%E8%BE%91%E5%99%A8)
------------------------------------------------------------------------------------------------------------------------------
按 `Ctrl-G` 把当前输入内容发给外部编辑器,保存后回填到输入框,不保存则保持原样。适合需要输入大段文本或带格式内容的场景。
编辑器优先级:`/editor` 配置 > `$VISUAL` 环境变量 > `$EDITOR` 环境变量。未配置时可先运行 `/editor` 选择默认编辑器。
下一步 [](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
----------------------------------------------------------------------------------------------------------
* [键盘快捷键](https://www.kimi.com/code/docs/kimi-code-cli/reference/keyboard.html)
— 全部快捷键的完整速查表
* [斜杠命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html)
— 所有内置命令的说明与别名
* [会话与上下文](https://www.kimi.com/code/docs/kimi-code-cli/guides/sessions.html)
— 如何恢复会话、压缩上下文、导出对话
---
# 数据路径 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html#VPContent)
Return to top
数据路径 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html#%E6%95%B0%E6%8D%AE%E8%B7%AF%E5%BE%84)
==============================================================================================================================
Kimi Code CLI 把配置文件、会话历史、登录凭据、诊断日志等运行时数据集中存放在 `~/.kimi-code/` 下。本页帮你搞清楚每类数据在哪里、用来做什么,以及需要时怎么清理或搬迁。
数据根目录 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html#%E6%95%B0%E6%8D%AE%E6%A0%B9%E7%9B%AE%E5%BD%95)
----------------------------------------------------------------------------------------------------------------------------------------
默认数据根是 `~/.kimi-code/`,在不同平台的实际路径:
* macOS:`/Users//.kimi-code`
* Linux:`/home//.kimi-code`
* Windows:`C:\Users\\.kimi-code`
如果你需要把数据目录挪到别处(比如用多个独立环境隔离不同项目的配置),设置 `KIMI_CODE_HOME` 即可:
sh
export KIMI_CODE_HOME="$HOME/.config/kimi-code"
设置后,配置、会话、日志、OAuth 凭据、Kimi 专属用户级 Skills、全局 `AGENTS.md` 等 **Kimi Code 数据**都会落到新路径下。`KIMI_CODE_HOME` 的完整说明见[环境变量](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html)
。
提示
**通用 `.agents` 资源**仍放在真实 OS home 下,以便跨工具共享。例如,用户级通用 Skills 仍位于 `~/.agents/skills/`,而 Kimi 专属用户级 Skills 会随 `KIMI_CODE_HOME` 移动到 `$KIMI_CODE_HOME/skills/`。
目录结构 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html#%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84)
------------------------------------------------------------------------------------------------------------------------------
$KIMI_CODE_HOME (默认 ~/.kimi-code)
├── config.toml # 用户配置
├── tui.toml # 终端界面偏好(含自动更新开关)
├── AGENTS.md # 全局 Kimi 专属 Agent 指令(可选)
├── mcp.json # 用户级 MCP server 声明(可选)
├── skills/ # Kimi 专属用户级 Skills(可选)
├── plugins/
│ ├── installed.json # 已安装 plugin 记录与启用状态
│ └── managed/ # zip/本地路径安装的 plugin 副本
├── session_index.jsonl # 会话索引
├── credentials/ # OAuth 凭据(目录 0700,文件 0600)
│ ├── .json
│ └── mcp/
│ └── -.json
├── sessions/ # 会话数据(详见下文)
│ └── //
├── bin/
│ ├── rg # Grep 使用的托管 ripgrep 二进制(Windows 为 rg.exe)
│ └── fd # 文件引用使用的托管 fd 二进制(Windows 为 fd.exe)
├── logs/
│ └── kimi-code.log # 全局诊断日志
├── updates/
│ ├── latest.json
│ ├── install.json
│ ├── install.lock
│ └── rollout.log
└── user-history/
└── .jsonl
各类文件说明 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html#%E5%90%84%E7%B1%BB%E6%96%87%E4%BB%B6%E8%AF%B4%E6%98%8E)
--------------------------------------------------------------------------------------------------------------------------------------------------
数据根下的顶层文件各有用途,大部分由 CLI 自动管理:
* **`config.toml`**:主运行时配置,存放供应商、模型、循环控制等用户级设置。详见[配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html)
。
* **`tui.toml`**:终端界面客户端偏好,包括自动更新开关 `[upgrade].auto_install`(默认开启)。可在 `/settings` 关闭,或手动设为 `auto_install = false`。
* **`AGENTS.md`**:全局 Kimi 专属 Agent 指令。该文件会随 `KIMI_CODE_HOME` 移动;跨工具通用指令仍可放在 `~/.agents/AGENTS.md`。
* **`mcp.json`**:用户级 MCP server 声明,启动时与项目内的 `.kimi-code/mcp.json` 合并加载。详见 [MCP](https://www.kimi.com/code/docs/kimi-code-cli/customization/mcp.html)
。
* **`skills/`**:Kimi 专属用户级 Skills。该目录会随 `KIMI_CODE_HOME` 移动;跨工具通用 Skills 仍可放在 `~/.agents/skills/`。详见 [Agent Skills](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html)
。
* **`plugins/installed.json`**:记录已安装的 plugin、每个 plugin 的启用状态,以及通过 `/plugins` 或 `/plugins mcp disable|enable` 修改的 MCP server 能力状态。本地路径和 zip URL 安装的文件会复制到 `plugins/managed//`。详见 [Plugins](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html)
。
* **`credentials/`**:OAuth 凭据目录,权限 `0o700`(目录)/ `0o600`(文件),仅当前用户可读写。托管供应商凭据存为 `credentials/.json`,MCP server 凭据存在 `credentials/mcp/` 子目录下。凭据写入使用原子流程(tmp → fsync → rename)防止写损。
会话数据 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html#%E4%BC%9A%E8%AF%9D%E6%95%B0%E6%8D%AE)
------------------------------------------------------------------------------------------------------------------------------
每个会话的数据存在 `sessions///` 下,同时在顶层 `session_index.jsonl` 里维护一份索引(每行一条记录,含 `sessionId`、`sessionDir`、`workDir` 三个字段)。`workDirKey` 是从工作目录路径生成的桶名,格式为 `wd__`。
会话目录内部包含:
* **`state.json`**:会话标题、`lastPrompt`、创建/更新时间、`forkedFrom` 等元数据。
* **`upcoming-goals.json`**:由 `/goal next ` 创建的 TUI 专属队列。它不属于 Agent 对话;只有当前目标完成并提升后续目标后,才会进入 Agent 对话。
* **`agents/main/wire.jsonl`**:main agent 的完整通信记录,用于会话恢复和回放。
* **`agents/main/plans/`**:Plan 模式下写入的计划文件,按计划 id 命名(`.md`)。
* **`agents/agent-0/` 等**:subagent 实例目录,各自含 `wire.jsonl`。
* **`logs/kimi-code.log`**:该会话的诊断日志,只有发生诊断事件时才存在。
* **`tasks/`**:后台任务持久化。`tasks/.json` 保存状态/pid/退出码,`tasks//output.log` 保存输出。
* **`cron/`**:定时任务持久化,用 `kimi --session` 恢复会话时重新加载到调度器。详见[定时任务](https://www.kimi.com/code/docs/kimi-code-cli/reference/tools.html#%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)
。
内置工具缓存 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html#%E5%86%85%E7%BD%AE%E5%B7%A5%E5%85%B7%E7%BC%93%E5%AD%98)
--------------------------------------------------------------------------------------------------------------------------------------------------
`Grep` 工具第一次需要 ripgrep 时,CLI 可自动下载 `rg` 并缓存到 `bin/rg`(Windows 为 `bin/rg.exe`)。终端界面的文件引用补全使用 `fd`;需要时 CLI 会在后台自动下载并缓存到 `bin/fd`(Windows 为 `bin/fd.exe`)。之后的运行会直接复用缓存的二进制。`rg` 优先使用系统 `PATH`,再使用缓存;`fd` 优先检查托管缓存,再回退到系统 `fd` / `fdfind`。删除 `bin/` 目录会在下次需要时触发重新下载。
日志与更新状态 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html#%E6%97%A5%E5%BF%97%E4%B8%8E%E6%9B%B4%E6%96%B0%E7%8A%B6%E6%80%81)
------------------------------------------------------------------------------------------------------------------------------------------------------------
* **`logs/kimi-code.log`**(全局):记录启动、登录、导出等跨会话事件。
* **`/logs/kimi-code.log`**(会话级):记录单个会话内的诊断事件。
报 bug 时,优先用 `kimi export` 导出相关会话(详见 [kimi 命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html)
);会话日志默认包含在导出包里。不想分享全局日志时加 `--no-include-global-log`。
`updates/` 下的文件(`latest.json`、`install.json`、`install.lock`、`rollout.log`)由自动更新机制维护,通常无需手动编辑。`rollout.log` 记录每次更新检查命中的灰度分批情况,可用于排查设备何时能收到新版本。
输入历史 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html#%E8%BE%93%E5%85%A5%E5%8E%86%E5%8F%B2)
------------------------------------------------------------------------------------------------------------------------------
终端输入历史按工作目录分开保存,路径为 `user-history/.jsonl`。用于在终端界面里用方向键浏览历史提示词。
清理数据 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html#%E6%B8%85%E7%90%86%E6%95%B0%E6%8D%AE)
------------------------------------------------------------------------------------------------------------------------------
删除数据根目录(`~/.kimi-code/` 或 `KIMI_CODE_HOME` 指定路径)可清除所有运行时数据。只需清理部分内容时:
| 需求 | 操作 |
| --- | --- |
| 重置配置 | 删除 `~/.kimi-code/config.toml` |
| 重置终端界面偏好 | 删除 `~/.kimi-code/tui.toml` |
| 清理所有会话 | 删除 `~/.kimi-code/sessions/` 和 `session_index.jsonl` |
| 清理诊断日志 | 删除 `~/.kimi-code/logs/` |
| 清理输入历史 | 删除 `~/.kimi-code/user-history/` |
| 重置更新状态 | 删除 `~/.kimi-code/updates/latest.json` |
| 强制重新下载托管 `rg` 和 `fd` | 删除 `~/.kimi-code/bin/` |
| 清除供应商 OAuth 登录态 | 运行 `/logout`,或删除对应的 `credentials/.json` |
| 清除 MCP server OAuth 登录态 | 删除 `credentials/mcp/`(`/logout` 不会清理 MCP 凭据) |
| 移除用户级 MCP 声明 | 删除 `$KIMI_CODE_HOME/mcp.json`(默认为 `~/.kimi-code/mcp.json`) |
| 清理全局 Kimi 专属 Agent 指令 | 删除 `$KIMI_CODE_HOME/AGENTS.md`(默认为 `~/.kimi-code/AGENTS.md`) |
| 清理 plugin 安装记录 | 删除 `$KIMI_CODE_HOME/plugins/`(本地 plugin 源码不受影响) |
| 清空 Kimi 专属用户级 Skills | 删除 `$KIMI_CODE_HOME/skills/`(默认为 `~/.kimi-code/skills/`) |
下一步 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
--------------------------------------------------------------------------------------------------------------------
* [配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html)
— `config.toml` 各字段的完整说明
* [环境变量](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html)
— `KIMI_CODE_HOME` 等路径变量的详细用法
---
# 环境变量 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#VPContent)
Return to top
环境变量 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F)
========================================================================================================================
Kimi Code CLI 通过环境变量控制少数运行时行为:迁移数据目录、关闭遥测、不改配置文件临时切换模型。
重要:API 密钥不在这里配置
`KIMI_API_KEY`、`ANTHROPIC_API_KEY`、`OPENAI_API_KEY` 等密钥变量**不会**从 shell 环境变量自动读取。在终端里 `export KIMI_API_KEY=xxx` 不会让任何供应商获得密钥。密钥必须写在 `config.toml` 的 `[providers.]` 段或 `[providers..env]` 子表里。
例外有两处:`KIMI_MODEL_*` 系列和供应商的 `api_key_env` 字段,这两个显式通道_确实_会从 shell 读取凭证。详见[用环境变量定义模型](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E7%94%A8%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E5%AE%9A%E4%B9%89%E6%A8%A1%E5%9E%8Bkimi-model)
和[供应商凭证键](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E4%BE%9B%E5%BA%94%E5%95%86%E5%87%AD%E8%AF%81%E9%94%AE%E5%86%99%E5%9C%A8-configtoml-%E9%87%8C)
。
背景说明见[配置覆盖:供应商凭证](https://www.kimi.com/code/docs/kimi-code-cli/configuration/overrides.html#%E4%BE%9B%E5%BA%94%E5%95%86%E5%87%AD%E8%AF%81)
。
核心路径 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E6%A0%B8%E5%BF%83%E8%B7%AF%E5%BE%84)
------------------------------------------------------------------------------------------------------------------------
### `KIMI_CODE_HOME` [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#kimi-code-home)
覆盖数据根目录,默认 `~/.kimi-code`。设置后,配置文件、会话、日志、OAuth 凭据等全部数据都落到新路径下:
sh
export KIMI_CODE_HOME="/path/to/custom/kimi-code"
> 确保目录可写。多个 `kimi` 实例共用同一个 `KIMI_CODE_HOME` 会共享配置和凭证。
数据目录的完整结构见[数据路径](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html)
。
### `KIMI_DISABLE_TELEMETRY` [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#kimi-disable-telemetry)
设为 `1` 关闭匿名遥测上报(也接受 `true`/`yes`/`y`,不区分大小写):
sh
export KIMI_DISABLE_TELEMETRY=1
### `KIMI_MODEL_*` 系列 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#kimi-model-%E7%B3%BB%E5%88%97)
不修改 `config.toml` 临时切换模型:设置 `KIMI_MODEL_NAME` 后,CLI 在内存里合成一个临时供应商,重启后失效。详见[用环境变量定义模型](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E7%94%A8%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E5%AE%9A%E4%B9%89%E6%A8%A1%E5%9E%8Bkimi-model)
。
### `KIMI_CODE_CUSTOM_HEADERS` [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#kimi-code-custom-headers)
新增
新增于 0.20.2。
为所有出站的模型请求附加自定义 HTTP 请求头:LLM 聊天请求(所有供应商协议)和 `/models` 模型列表请求都会携带。适合网关按请求头路由的场景,例如指定集群:
sh
export KIMI_CODE_CUSTOM_HEADERS=$'X-Gateway-Cluster: my-cluster\nX-Custom-Tag: debug'
格式与 `ANTHROPIC_CUSTOM_HEADERS` 一致:由换行分隔的 `Name: Value` 行,键名和值两端的空白会被去除,不含冒号的行会被忽略。
> 优先级:Kimi 身份头(`User-Agent`、`X-Msh-*`)和 `config.toml` 里供应商的 `custom_headers`(见 [配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#providers)
> )会覆盖这里的同名条目。认证头的行为因协议而异:在 `kimi`、`openai`、`openai_responses` 协议上,`Authorization` 条目会替换生成的 bearer token;`/models` 列表请求始终使用自己的认证头。`authorization` 这类大小写变体不会被当作同名头。它会与真正的头合并,可能导致请求失败。不要用它设置认证等保留头。需要按供应商区分请求头时,请改用 `custom_headers`。
供应商凭证键(写在 config.toml 里) [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E4%BE%9B%E5%BA%94%E5%95%86%E5%87%AD%E8%AF%81%E9%94%AE-%E5%86%99%E5%9C%A8-config-toml-%E9%87%8C)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
下面这些键名不是直接从 shell 读取的。它们是写在 `config.toml` 的 `[providers..env]` 子表里、作为 `api_key` / `base_url` 备用来源的键名。CLI 只从配置文件读取,不从 `process.env` 读取。
上面的惯用键名是按供应商类型固定的。如果更希望把密钥放在 shell 环境里并使用自定义变量名,可以在供应商上设置 [`api_key_env`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#providers)
:CLI 会在每次请求时从该变量读取密钥。
这样设计是为了让你保留熟悉的键名写法,同时把密钥放在配置文件里统一管理:
toml
[providers.kimi.env]
KIMI_API_KEY = "sk-xxx"
KIMI_BASE_URL = "https://api.moonshot.ai/v1"
各供应商对应的键名:
| 键名 | 适用供应商 | 默认值 |
| --- | --- | --- |
| `KIMI_API_KEY` | Kimi / Moonshot | 无 |
| `KIMI_BASE_URL` | Kimi / Moonshot | `https://api.moonshot.ai/v1` |
| `ANTHROPIC_API_KEY` | Anthropic | 无 |
| `ANTHROPIC_BASE_URL` | Anthropic | Anthropic SDK 默认值 |
| `OPENAI_API_KEY` | OpenAI(`openai` 和 `openai_responses`) | 无 |
| `OPENAI_BASE_URL` | OpenAI(`openai` 和 `openai_responses`) | `https://api.openai.com/v1` |
| `GOOGLE_API_KEY` | Google GenAI、Vertex AI | 无 |
| `VERTEXAI_API_KEY` | Vertex AI | 无 |
| `GOOGLE_CLOUD_PROJECT` | Vertex AI | 无 |
| `GOOGLE_CLOUD_LOCATION` | Vertex AI | 无 |
WARNING
`GOOGLE_APPLICATION_CREDENTIALS`(服务账号 JSON 路径)是唯一走系统环境变量的例外。它由 Google SDK 自身通过 ADC 流程读取,CLI 不参与。其他所有键名都必须写在 `[providers..env]` 子表里。
供应商类型与字段的完整说明见[平台与模型](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html)
。
OAuth 与托管端点 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#oauth-%E4%B8%8E%E6%89%98%E7%AE%A1%E7%AB%AF%E7%82%B9)
----------------------------------------------------------------------------------------------------------------------------------------------
这组变量用于将 OAuth 认证和托管服务端点指向自建或测试环境,日常使用不需要设置。
| 环境变量 | 用途 | 默认值 |
| --- | --- | --- |
| `KIMI_CODE_OAUTH_HOST` | OAuth 认证 host,优先级最高 | 未设时回退到 `KIMI_OAUTH_HOST` |
| `KIMI_OAUTH_HOST` | OAuth 认证 host,作为上一个的 fallback | 未设时使用 `https://auth.kimi.com` |
| `KIMI_CODE_BASE_URL` | OAuth 登录后的托管 API base URL | `https://api.kimi.com/coding/v1` |
WARNING
`KIMI_CODE_BASE_URL`(OAuth 托管服务,指向 `kimi.com`)和 `KIMI_BASE_URL`(API 密钥直连,指向 `moonshot.ai`)是两个不同的变量,请按场景区分。
用环境变量定义模型(`KIMI_MODEL_*`) [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E7%94%A8%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E5%AE%9A%E4%B9%89%E6%A8%A1%E5%9E%8B-kimi-model)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
测试时想换个模型但不想动 `config.toml`?设置 `KIMI_MODEL_NAME` 后,CLI 会从 `KIMI_MODEL_*` 系列变量在内存里合成出一个临时供应商和模型别名,不写回配置文件。优先级高于 `config.toml` 的 `default_model`,但低于启动时 `-m ` 选项。
sh
export KIMI_MODEL_NAME="kimi-for-coding"
export KIMI_MODEL_API_KEY="YOUR_API_KEY"
export KIMI_MODEL_BASE_URL="https://api.example.com/v1"
export KIMI_MODEL_MAX_CONTEXT_SIZE="262144"
export KIMI_MODEL_CAPABILITIES="image_in,thinking"
kimi
完整变量列表:
| 环境变量 | 必填 | 用途 | 默认值 |
| --- | --- | --- | --- |
| `KIMI_MODEL_NAME` | 是(同时是启用开关) | 发送给 API 的模型 ID | — |
| `KIMI_MODEL_API_KEY` | 是 | API 密钥 | — |
| `KIMI_MODEL_PROVIDER_TYPE` | 否 | 供应商类型:`kimi`、`anthropic`、`openai` | `kimi` |
| `KIMI_MODEL_BASE_URL` | 否 | API 基础 URL | 各类型有各自默认值 |
| `KIMI_MODEL_MAX_CONTEXT_SIZE` | 否 | 最大上下文长度(token 数) | `262144`(256K) |
| `KIMI_MODEL_CAPABILITIES` | 否 | 逗号分隔的能力标签,与自动探测的能力取并集 | `image_in,thinking` |
| `KIMI_MODEL_DISPLAY_NAME` | 否 | 在 `/model` 中显示的名称 | 回退到 `KIMI_MODEL_NAME` |
| `KIMI_MODEL_MAX_OUTPUT_SIZE` | 否 | 单次输出上限(仅 `anthropic`);设置后会覆盖内置的 Claude 上限 | 模型默认值 |
| `KIMI_MODEL_REASONING_KEY` | 否 | 推理字段名覆盖(仅 `openai`) | 自动探测 |
| `KIMI_MODEL_THINKING_EFFORT` | 否 | Thinking 强度:`low`/`medium`/`high`/`xhigh`/`max` | — |
| `KIMI_MODEL_ADAPTIVE_THINKING` | 否 | 强制开启或关闭 adaptive thinking(仅 `anthropic`) | 按模型名推断 |
设置了 `KIMI_MODEL_NAME` 但缺少必填变量时,启动会立即失败并给出明确提示。
运行时开关 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E8%BF%90%E8%A1%8C%E6%97%B6%E5%BC%80%E5%85%B3)
----------------------------------------------------------------------------------------------------------------------------------
控制遥测、后台任务、plugin marketplace 等子系统行为的开关变量:
| 环境变量 | 用途 | 合法值 |
| --- | --- | --- |
| `KIMI_DISABLE_TELEMETRY` | 关闭匿名遥测上报 | `1`、`true`、`yes`、`y`(不区分大小写) |
| `KIMI_CODE_PASSWORD` | 为 `kimi web` 本地服务设置并列鉴权密码;绑到非本机地址时建议设置,见 [安全注意](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html#%E5%AE%89%E5%85%A8%E6%B3%A8%E6%84%8F) | 任意非空字符串;未设置时仅 token 有效 |
| `KIMI_CODE_BACKGROUND_KEEP_ALIVE_ON_EXIT` | 会话关闭时是否保留后台任务,优先级高于 `config.toml`。默认会在退出时停止后台任务 | 真值:`1`/`true`/`yes`/`on`;假值:`0`/`false`/`no`/`off` |
| `KIMI_CODE_BACKGROUND_MAX_RUNNING_TASKS` | 同时运行的后台任务数上限,优先级高于 `config.toml` 的 `[background] max_running_tasks`;不设置表示无上限 | 正整数;非法值被忽略 |
| `KIMI_CODE_BACKGROUND_BASH_TASK_TIMEOUT_S` | 后台 `Bash` 任务的默认超时(秒),也用于前台命令转入后台后的重新计时,优先级高于 `[task] bash_task_timeout_s`;`0` 表示无超时 | 非负整数;非法值被忽略 |
| `KIMI_CODE_BACKGROUND_PRINT_BACKGROUND_MODE` | `kimi -p` 主轮次结束后仍有后台任务待处理时的行为,优先级高于 `[task] print_background_mode` | `exit`、`drain` 或 `steer`;非法值被忽略 |
| `KIMI_CODE_BACKGROUND_PRINT_WAIT_CEILING_S` | print 模式 drain/steer 等待的时长上限(秒),优先级高于 `[task] print_wait_ceiling_s` | 正整数;非法值被忽略 |
| `KIMI_CODE_BACKGROUND_PRINT_MAX_TURNS` | print 模式下由后台任务完成触发的新轮次上限,优先级高于 `[task] print_max_turns` | 正整数;非法值被忽略 |
| `KIMI_IMAGE_MAX_EDGE_PX` | 图片压缩的最长边上限(像素),优先级高于 `config.toml` 的 `[image] max_edge_px`(默认 `2000`) | 正整数;非法值被忽略 |
| `KIMI_IMAGE_READ_BYTE_BUDGET` | 模型自行读图的单图字节预算,优先级高于 `config.toml` 的 `[image] read_byte_budget`(默认 `262144`) | 正整数;非法值被忽略 |
| `KIMI_CODE_PLUGIN_MARKETPLACE_URL` | 覆盖 `/plugins` 加载的 marketplace JSON;默认 `https://code.kimi.com/kimi-code/plugins/marketplace.json` | 也接受 `http://`、`file://` URL 和本地路径 |
| `KIMI_CODE_AGENT_SWARM_MAX_CONCURRENCY` | 限制 AgentSwarm 初始提升并发阶段可同时运行的 subagent 数量;不设置表示不限制 | 正整数;非法值会立即失败 |
| `KIMI_CODE_SUBAGENT_SCOPE_CACHE_SIZE` | 保留在内存中的已完成 subagent scope 数量,超出后最旧的会被驱逐,恢复时从持久化状态按需重建(默认 `32`;`0` 或负数 = 不驱逐) | 整数;非法值会立即失败 |
| `KIMI_CODE_SUBAGENT_SCOPE_EVICT_TIMEOUT_MS` | 单个 subagent scope 驱逐允许的最长时间(毫秒),超时后驱逐队列跳过它继续后续驱逐(默认 `15000`) | 正整数;非法值会立即失败 |
| `KIMI_SUBAGENT_TIMEOUT_MS` | 单个 `Agent` subagent 可运行的最长时间(毫秒),优先级高于 `config.toml` 的 `[subagent] timeout_ms` | 正整数;非法值回退到配置或默认值 |
| `KIMI_CODE_SWARM_TIMEOUT_MS` | `AgentSwarm` subagent 可运行的最长时间(毫秒),优先级高于 `config.toml` 的 `[swarm] timeout_ms` | 正整数;非法值回退到配置或默认值 |
| `KIMI_CODE_IDENTITY_NAME` | Agent 在系统提示词中的自称,优先级高于 `config.toml` 的 `[identity] name`,不写回配置文件 | 任意非空字符串;空值视为未设置 |
| `KIMI_CODE_IDENTITY_SLUG` | 协议标识(`User-Agent` 产品名、MCP 客户端名),优先级高于 `[identity] slug`;未设置时由名称派生 | 任意非空字符串;会转小写并将连续非字母数字字符折叠为 `-` |
| `KIMI_CODE_BUILTIN_PRODUCT_SKILLS` | 是否向模型提供介绍 Kimi Code 自身的内置 Skills,优先级高于 `config.toml` 的 `builtin_product_skills` | 真值:`1`/`true`/`yes`/`on`;假值:`0`/`false`/`no`/`off` |
| `KIMI_CODE_REPEAT_BREAKER` | 同一工具调用连续重复多次时,是否注入提醒并最终强制停止该轮。未设置时保持开启 | 真值:`1`/`true`/`yes`/`on`;假值:`0`/`false`/`no`/`off`;其他值忽略 |
| `KIMI_CODE_EXPERIMENTAL_SUBAGENT_FORK` | 在 `Agent`/`AgentSwarm` 上启用实验性 `fork` 参数:以调用方对话历史快照而非空上下文启动 subagent | 真值:`1`/`true`/`yes`/`on`;假值:`0`/`false`/`no`/`off` |
| `KIMI_CODE_EXPERIMENTAL_TOOL_SELECT` | 启用实验性按需加载工具:标记 `deferred: true` 的 MCP server 工具不进入顶层工具列表,由模型经 `select_tools` 按需加载;还需模型声明 `dynamically_loaded_tools` 能力,详见 [MCP](https://www.kimi.com/code/docs/kimi-code-cli/customization/mcp.html#%E6%8C%89%E9%9C%80%E5%8A%A0%E8%BD%BD%E5%B7%A5%E5%85%B7) | 真值:`1`/`true`/`yes`/`on`;假值:`0`/`false`/`no`/`off` |
| `KIMI_CODE_WATCH` | 是否挂文件系统 watch 以热更新配置和工作区文件,优先级高于 `[watch] enabled`(默认 `false`) | 真值:`1`/`true`/`yes`/`on`;假值:`0`/`false`/`no`/`off` |
| `KIMI_CODE_SEARCH_WORKER` | 在独立 worker 线程中运行全局搜索索引,优先级高于 `[database] search`(默认 `true`) | 真值:`1`/`true`/`yes`/`on`;假值:`0`/`false`/`no`/`off` |
| `KIMI_CODE_PERSISTENCE_MINIDB_READMODEL` | 会话索引使用基于 minidb 的读模型,优先级高于 `[database] base`(默认 `true`) | 真值:`1`/`true`/`yes`/`on`;假值:`0`/`false`/`no`/`off` |
| `KIMI_MCP_STARTUP_TIMEOUT_MS` | MCP server 全局默认连接超时(毫秒);优先级高于配置文件,低于 `mcp.json` 的 `startupTimeoutMs` | `1` 到 `2147483647` 的整数;非法值被忽略 |
| `KIMI_MCP_TOOL_TIMEOUT_MS` | MCP server 全局默认单次工具调用超时(毫秒);优先级高于配置文件,低于 `mcp.json` 的 `toolTimeoutMs` | `1` 到 `2147483647` 的整数;非法值被忽略 |
| `KIMI_LOOP_MAX_STEPS_PER_TURN` | Agent 单轮最大步数,优先级高于 `config.toml` 的 `[loop_control] max_steps_per_turn`;`0` 表示无上限 | 非负整数;非法值被忽略 |
| `KIMI_LOOP_MAX_ATTEMPTS_PER_STEP` | 单步失败后的最大总尝试次数(含首次尝试),优先级高于 `config.toml` 的 `[loop_control] max_attempts_per_step` | 非负整数;非法值被忽略 |
| `KIMI_CODE_INFINITE_RETRY` | 让所有失败的 LLM 请求无限重试而不是终止任务;指数退避(32 秒封顶)并尊重 `Retry-After`,等待期间中断仍生效 | 真值:`1`/`true`/`yes`/`on`;假值:`0`/`false`/`no`/`off` |
| `KIMI_TOKEN_COUNTING_STRATEGY` | 对外上报的上下文 token 计数,优先级高于 `config.toml` 的 `[token_counting] strategy` | `measured+estimated`、`measured`、`estimated`(不区分大小写);非法值被忽略 |
| `KIMI_WEB_SEARCH_BASE_URL` | 网页搜索(`WebSearch`)服务的 API URL,优先级高于配置文件;凭据与自定义 header 不发往该端点 | 非空字符串;空白值被忽略 |
| `KIMI_WEB_SEARCH_API_KEY` | 网页搜索(`WebSearch`)服务的 API 密钥;设置后同时替换配置中的 API 密钥和 OAuth 凭据 | 非空字符串;空白值被忽略 |
| `KIMI_WEB_FETCH_BASE_URL` | 网页抓取(`FetchURL`)服务的 API URL,优先级高于配置文件;未指定端点时已登录用户走 Kimi OAuth 托管抓取,再回退本地直连;凭据不发往该端点 | 非空字符串;空白值被忽略 |
| `KIMI_WEB_FETCH_API_KEY` | 网页抓取(`FetchURL`)服务的 API 密钥;设置后同时替换配置中的 API 密钥和 OAuth 凭据 | 非空字符串;空白值被忽略 |
| `KIMI_CODE_EXPERIMENTAL_FLAG` | 在当前进程启用所有已注册的实验功能 | `1`、`true`、`yes`、`on` |
| `KIMI_SHELL_PATH` | Windows 上覆盖 Git Bash 路径(自动探测失败时使用) | 绝对路径 |
| `KIMI_MODEL_MAX_COMPLETION_TOKENS` | 单步 LLM 请求的 `max_completion_tokens` 硬上限,仅对 `kimi` 供应商生效 | 正整数;`0` 或负数禁用 clamp |
| `KIMI_MODEL_TEMPERATURE` | 每次请求的采样温度,仅对 `kimi` 供应商生效(全局生效,不依赖 `KIMI_MODEL_NAME`) | 数字,如 `0.3` |
| `KIMI_MODEL_TOP_P` | 每次请求的核采样 `top_p`,仅对 `kimi` 供应商生效(全局生效) | 数字,如 `0.95` |
| `KIMI_MODEL_THINKING_EFFORT` | 在线上强制使用指定的思考强度,绕过模型声明的 `support_efforts`;仅 `kimi` 供应商生效 | 思考强度值,如 `max` |
| `KIMI_MODEL_THINKING_KEEP` | 保留思考透传;`kimi` 以 `thinking.keep` 发送,`anthropic` 以 `clear_thinking_20251015` 编辑发送;覆盖 `[thinking] keep` | API 接受的值,如 `all`;传入关值(`false`/`0`/`no`/`off`/`none`/`null`)可禁用 |
| `KIMI_CODE_NO_AUTO_UPDATE` | 完全禁用更新预检:不检查、不后台安装、不提示。同时兼容旧名 `KIMI_CLI_NO_AUTO_UPDATE` | 真值:`1`/`true`/`yes`/`on` |
| `KIMI_DISABLE_CRON` | 禁用定时任务工具(`CronCreate` 拒绝新计划,已有任务不触发) | `1` 表示禁用 |
`KIMI_CODE_INFINITE_RETRY`、`KIMI_CODE_IDENTITY_*` 和 `KIMI_CODE_BUILTIN_PRODUCT_SKILLS` 这几个变量由 `agent-core-v2` 引擎读取。
诊断日志 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E8%AF%8A%E6%96%AD%E6%97%A5%E5%BF%97)
------------------------------------------------------------------------------------------------------------------------
这组变量控制日志级别和文件滚动,进程启动时读取一次:
| 环境变量 | 用途 | 默认值 |
| --- | --- | --- |
| `KIMI_LOG_LEVEL` | 日志级别:`off`、`error`、`warn`、`info`、`debug` | `info` |
| `KIMI_LOG_GLOBAL_MAX_BYTES` | 全局日志文件单个最大字节数 | `6291456`(6 MB) |
| `KIMI_LOG_GLOBAL_FILES` | 全局日志文件保留份数 | `5` |
| `KIMI_LOG_SESSION_MAX_BYTES` | 会话级日志文件单个最大字节数 | `5242880`(5 MB) |
| `KIMI_LOG_SESSION_FILES` | 会话级日志文件保留份数 | `3` |
系统环境变量 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E7%B3%BB%E7%BB%9F%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F)
--------------------------------------------------------------------------------------------------------------------------------------------
CLI 还会读取一些标准系统变量来检测运行环境,不会修改它们:
* `HOME`:解析默认数据路径
* `VISUAL`、`EDITOR`:外部编辑器命令(`VISUAL` 优先)
* `PATH`:定位 `rg`、`fd`、`fdfind`、`git` 等依赖;在 Windows 上,Git Bash 探测会检查 `PATH` 中找到的每个 `git.exe`,包括 Scoop 等包管理器提供的 shim
* `NO_COLOR`、`FORCE_COLOR`:控制颜色输出(遵循 [no-color.org](https://no-color.org/)
约定)
* `CI`:非空且非 `"0"` 时关闭主题检测,回退深色主题
* `TERM_PROGRAM`、`TERM`、`TMUX`:检测终端特性和通知支持
* `DISPLAY`、`WAYLAND_DISPLAY`、`XDG_SESSION_TYPE`:检测 Linux 图形会话(用于剪贴板和图片功能)
* `WSL_DISTRO_NAME`、`WSLENV`:检测 WSL,用于剪贴板 PowerShell 桥接
* `LOCALAPPDATA`:Windows 上探测 Git Bash 安装路径时作为 fallback 使用
HTTP 代理 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#http-%E4%BB%A3%E7%90%86)
--------------------------------------------------------------------------------------------------------------
Kimi Code 会遵循标准代理环境变量,让所有出网流量(模型 API 调用、MCP 服务、网络工具、遥测、登录、更新检查)都走代理:
* `HTTP_PROXY` / `http_proxy`:用于 `http://` 请求的代理
* `HTTPS_PROXY` / `https_proxy`:用于 `https://` 请求的代理
* `ALL_PROXY` / `all_proxy`:当对应 scheme 的变量未设置时使用的兜底代理
* `NO_PROXY` / `no_proxy`:以逗号分隔的、绕过代理的主机列表
### 代理类型与优先级 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E4%BB%A3%E7%90%86%E7%B1%BB%E5%9E%8B%E4%B8%8E%E4%BC%98%E5%85%88%E7%BA%A7)
同时支持 HTTP(S) 代理和 SOCKS 代理。SOCKS 代理通过 scheme 识别:`socks5://`、`socks5h://`、`socks4://` 或 `socks://`(`socks5://` 的别名),通常设在 `ALL_PROXY`。对 HTTP/HTTPS 流量,HTTP(S) 代理优先于 `ALL_PROXY`。
### 启用条件与回环地址 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E5%90%AF%E7%94%A8%E6%9D%A1%E4%BB%B6%E4%B8%8E%E5%9B%9E%E7%8E%AF%E5%9C%B0%E5%9D%80)
仅当设置了其中任一变量时才启用代理,否则直连。回环地址(`localhost`、`127.0.0.1`、`::1`)始终绕过代理,因此配置了代理后,本地服务(例如 localhost 上的 MCP 服务)仍能正常工作。你也可以把自己的内网主机加入 `NO_PROXY` 一并放行。
### MCP 子进程 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#mcp-%E5%AD%90%E8%BF%9B%E7%A8%8B)
以 Node 子进程运行的 stdio MCP 服务,在其 Node 版本支持 `NODE_USE_ENV_PROXY` 时(Node ≥ 22.21 或 ≥ 24.5)会自动遵循 `HTTP_PROXY` / `HTTPS_PROXY` / `NO_PROXY`;SOCKS 代理仅作用于 Kimi Code 自身的流量。
下一步 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
--------------------------------------------------------------------------------------------------------------
* [配置覆盖](https://www.kimi.com/code/docs/kimi-code-cli/configuration/overrides.html)
— 环境变量、CLI 选项、配置文件的优先级关系
* [数据路径](https://www.kimi.com/code/docs/kimi-code-cli/configuration/data-locations.html)
— `KIMI_CODE_HOME` 影响的完整目录结构
* [平台与模型](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html)
— 各供应商类型的完整接入示例
---
# Kimi Code 社区倡议 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code/community-guidelines.html#VPContent)
Return to top
Kimi Code 社区倡议 [](https://www.kimi.com/code/docs/kimi-code/community-guidelines.html#kimi-code-%E7%A4%BE%E5%8C%BA%E5%80%A1%E8%AE%AE)
======================================================================================================================================
Kimi Code 致力于为全球用户提供智能、高效的 AI 编程服务,用模型能力的持续跃迁、Agent产品力的极致打磨、Token Plan的范式革新,缩短人类想象到现实的路径,让通用agent普惠每个有想法的个体。为保证每位Kimi Code用户拥有更好的体验,我们提出以下倡议。
适用范围 [](https://www.kimi.com/code/docs/kimi-code/community-guidelines.html#%E9%80%82%E7%94%A8%E8%8C%83%E5%9B%B4)
------------------------------------------------------------------------------------------------------------------
Kimi Code 订阅仅限交互式使用,我们兼容主流编程工具与 Agent 框架(Kimi CLI、VS Code、Claude Code、OpenCode、OpenClaw 等),你可以在自己习惯的工具里自由调用 Kimi Code 的 AI 能力。如有企业级集成、商业化服务或其他开放平台相关需求,也可前往 [Kimi 开放平台](https://platform.moonshot.cn/)
了解更多合作方案。
✧ 我们有必要提示的使用规范 [](https://www.kimi.com/code/docs/kimi-code/community-guidelines.html#%E2%9C%A7-%E6%88%91%E4%BB%AC%E6%9C%89%E5%BF%85%E8%A6%81%E6%8F%90%E7%A4%BA%E7%9A%84%E4%BD%BF%E7%94%A8%E8%A7%84%E8%8C%83)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
为了让每个人都能持续获得稳定的模型服务,有一些使用规范我们需要大家一起遵守。
#### 不以商业化为目的转售账号或 API 访问权限
账号是你和 Kimi Code 之间的连接,转让给他人使用也会让你自己的数据和使用记录处于风险中。
#### 不将 Kimi Code 的能力以任何形式二次分售
用 Kimi Code 来辅助自己的工作完全没问题,但把它包装成服务再卖给别人,绕过平台的定价和服务体系,对其他正常用户也不公平。
#### 不伪造或篡改客户端身份信息
客户端身份信息是平台识别请求来源、保障服务质量与安全的重要依据,伪造 User-Agent 或使用高风险的 Agent 不利于平台维护整体服务的稳定性。
#### 不进行非个人交互式使用
Kimi Code 订阅仅限个人交互式使用场景。通过脚本批量执行、数据标注等非交互式方式使用,超出了正常使用范畴。
如果出现了不符合上述规范的使用方式,我们会先评估情况,再根据情节进行**限制并发**等处理。你会收到 `You've reached your concurrent request limit` 报错,详情请见[错误参考文档](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%B9%B6%E5%8F%91%E8%AF%B7%E6%B1%82%E9%99%90%E5%88%B6)
。相应地,若用户通过非官方渠道获取服务(如账号转售、第三方代购等),一经核实可能面临封号处理,且由此产生的损失需由用户**自行承担**。
处理有误?
若你被错误封禁,请通过支持邮箱联系我们 [support@moonshot.cn](mailto:support@moonshot.cn)
。为了更好地帮你解决问题,请务必提交账号 ID、封禁时间、使用场景说明及证明截图。
♡ 我们欢迎的使用方式 [](https://www.kimi.com/code/docs/kimi-code/community-guidelines.html#%E2%99%A1-%E6%88%91%E4%BB%AC%E6%AC%A2%E8%BF%8E%E7%9A%84%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Kimi Code 欢迎每一位用代码改变世界的创造者——无论你是独立开发者、开源贡献者、还是正在把第一个想法变成产品的新手。我们更鼓励持续专注的使用方式,对于保持长会话、并充分复用历史内容的用户,平台会动态优化其额度使用效率,即在相同工作量下额度更加耐用。
加入社区 [](https://www.kimi.com/code/docs/kimi-code/community-guidelines.html#%E5%8A%A0%E5%85%A5%E7%A4%BE%E5%8C%BA)
------------------------------------------------------------------------------------------------------------------
如果你想和更多志同道合的 Kimi Coder 交流技术心得,欢迎加入我们的飞书交流群,一起 Happy Coding!

常见问题 [](https://www.kimi.com/code/docs/kimi-code/community-guidelines.html#%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)
------------------------------------------------------------------------------------------------------------------
**Q1: 我是重度用户,每天高强度使用,会被误封吗?**
不会。风控识别会考虑多种特征,对于 IP 地址、对话状态等使用指标正常的重度用户通常不会触发处置。
**Q2:我用 VPN 或公司代理访问,会被误封吗?**
通过代理访问 Kimi(正向代理)没问题;把自己的账号给别人转发(反向代理),属于违规。
**Q3: 我同时在多个设备或工具上使用 Kimi Code,会被误封吗?**
不会。开发者在不同设备(如工作电脑、个人笔记本)或使用不同编程工具(Kimi CLI、VS Code、Claude Code)之间切换,属于完全正常的使用模式。只要不刻意篡改客户端身份信息就不会被误封。
---
# 错误参考(Error Reference) | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code/error-reference.html#VPContent)
Return to top
错误参考(Error Reference) [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E9%94%99%E8%AF%AF%E5%8F%82%E8%80%83-error-reference)
==============================================================================================================================================
本文档收录的是调用 Kimi Code API 时可能遇到的**服务端错误**和**工具调用错误**,包括权限、限流、请求格式、服务器内部等问题。如果你遇到的是客户端本身的问题(如 CLI 安装失败、IDE 连接异常、MCP 配置错误等),请参考 [常见问题 FAQ](https://www.kimi.com/code/docs/kimi-code/error-reference.html#)
。
根据终端或客户端显示的报错信息,在下表中找到对应条目,查看含义和处理方式。
提示
如果你使用的是 OpenCode、Claude Code 等第三方客户端,客户端自身可能对错误码进行了转换或重新包装,导致你看到的错误码与本文档不一致。这种情况下,请**以报错信息中的文字内容为主**,在下方快速查找表中匹配关键词,找到对应条目。
快速查找 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%BF%AB%E9%80%9F%E6%9F%A5%E6%89%BE)
-------------------------------------------------------------------------------------------------------------
报错分两类:**模型调用错误**发生在请求模型生成回复的过程中(认证、限流、请求格式等);**工具调用错误**发生在 AI 执行工具调用的过程中(如读取网页、处理图片)。按报错来源在下方对应表格中匹配关键词。
### 模型调用 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%A8%A1%E5%9E%8B%E8%B0%83%E7%94%A8)
| 看到的报错关键词 | HTTP 状态码 | 跳转章节 |
| --- | --- | --- |
| `The API Key appears to be invalid or may have expired` | 401 | [认证错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#api-key-%E6%97%A0%E6%95%88) |
| `Invalid Authentication` | 401 | [认证错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#invalid-authentication) |
| `Your current subscription does not have access to k3` | 401 | [权限错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%97%A0-k3-%E8%AE%BF%E9%97%AE%E6%9D%83%E9%99%90) |
| `Your current plan supports only kimi-k3 up to 256K context` | 401 | [权限错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%97%A0-1m-%E8%AE%BF%E9%97%AE%E6%9D%83%E9%99%90) |
| `Your current subscription does not have access to kimi-for-coding-highspeed` | 401 | [权限错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E9%AB%98%E9%80%9F%E7%89%88%E6%97%A0%E8%AE%BF%E9%97%AE%E6%9D%83%E9%99%90) |
| `Your model id does not exist, recognized as other:` | 401 | [权限错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%A8%A1%E5%9E%8B-id-%E4%B8%8D%E5%AD%98%E5%9C%A8) |
| `unable to verify your membership benefits` | 402 | [会员权益异常](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E4%BC%9A%E5%91%98%E6%9D%83%E7%9B%8A%E6%97%A0%E6%B3%95%E9%AA%8C%E8%AF%81) |
| `You've reached your 5-hour usage limit` | 403 | [配额与账户限制](https://www.kimi.com/code/docs/kimi-code/error-reference.html#_5-%E5%B0%8F%E6%97%B6%E9%99%90%E9%A2%9D%E8%A7%A6%E9%A1%B6) |
| `You've reached your weekly (7-day) usage limit` | 403 | [配额与账户限制](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%AF%8F%E5%91%A8-7-%E5%A4%A9%E9%A2%9D%E5%BA%A6%E8%80%97%E5%B0%BD) |
| `You've reached your monthly usage limit for this billing cycle` | 403 | [配额与账户限制](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E4%BC%9A%E5%91%98%E6%9C%88%E5%BA%A6%E9%A2%9D%E5%BA%A6%E8%80%97%E5%B0%BD) |
| `You've reached your concurrent request limit` | 403 | [配额与账户限制](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%B9%B6%E5%8F%91%E8%AF%B7%E6%B1%82%E9%99%90%E5%88%B6) |
| `We're receiving too many requests` | 429 | [限流与过载](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%B9%B6%E5%8F%91%E8%AF%B7%E6%B1%82%E8%BF%87%E5%A4%9A) |
| `The engine is currently overloaded` | 429 | [限流与过载](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%8E%A8%E7%90%86%E5%BC%95%E6%93%8E%E8%BF%87%E8%BD%BD) |
| `total message size N exceeds limit 2097152` | 400 | [请求格式错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%B6%88%E6%81%AF%E4%BD%93%E8%B6%85%E5%87%BA%E4%B8%8A%E4%B8%8B%E6%96%87%E9%99%90%E5%88%B6) |
| `Your request exceeded model token limit: 262144` | 400 | [请求格式错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#token-%E8%B6%85%E9%99%90) |
| `thinking is enabled but reasoning_content is missing` | 400 | [请求格式错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%80%9D%E7%BB%B4%E9%93%BE%E5%AD%97%E6%AE%B5%E7%BC%BA%E5%A4%B1) |
| `unsupported image url` | 400 | [请求格式错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E4%B8%8D%E6%94%AF%E6%8C%81%E7%9A%84%E5%9B%BE%E7%89%87-url) |
| `function name ... is duplicated` | 400 | [请求格式错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%B7%A5%E5%85%B7%E5%90%8D%E9%87%8D%E5%A4%8D) |
| `The request was rejected because it was considered high risk` | 400 | [请求格式错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%86%85%E5%AE%B9%E5%AE%89%E5%85%A8%E6%8B%A6%E6%88%AA) |
| `Not found the model kimi-for-coding or Permission denied` | 404 | [资源未找到](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%A8%A1%E5%9E%8B%E6%9C%AA%E6%89%BE%E5%88%B0) |
| `method not found` | 404 | [资源未找到](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%8E%A5%E5%8F%A3%E8%B7%AF%E5%BE%84%E4%B8%8D%E5%AD%98%E5%9C%A8) |
| `bot_id ... value does not match id_kinds` | 500 | [服务端内部错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#bot-id-%E6%A0%BC%E5%BC%8F%E4%B8%8D%E5%90%88%E8%A7%84) |
| `failed to connect to ... database=membership_` | 500 | [服务端内部错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%95%B0%E6%8D%AE%E5%BA%93%E8%BF%9E%E6%8E%A5%E5%A4%B1%E8%B4%A5) |
| `FATAL: terminating connection due to administrator command` | 500 | [服务端内部错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%95%B0%E6%8D%AE%E5%BA%93%E8%BF%9E%E6%8E%A5%E5%A4%B1%E8%B4%A5) |
| `failed to evaluate rate limit script` | 500 | [服务端内部错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%86%85%E9%83%A8%E8%BF%9E%E6%8E%A5%E5%BC%82%E5%B8%B8) |
| `i/o timeout` / `conn closed` / `bad connection` | 500 | [服务端内部错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%86%85%E9%83%A8%E8%BF%9E%E6%8E%A5%E5%BC%82%E5%B8%B8) |
| `503 Service Unavailable` / `504 Gateway Timeout` / `502 Bad Gateway` | 500 | [服务端内部错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E4%B8%8B%E6%B8%B8%E6%9C%8D%E5%8A%A1%E4%B8%8D%E5%8F%AF%E7%94%A8) |
| `未找到该账号` / `该账号已被禁用` / `已被禁言` | 500 | [服务端内部错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E8%B4%A6%E5%8F%B7%E7%8A%B6%E6%80%81%E5%BC%82%E5%B8%B8) |
### 工具调用 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%B7%A5%E5%85%B7%E8%B0%83%E7%94%A8)
| 看到的报错关键词 | HTTP 状态码 | 跳转章节 |
| --- | --- | --- |
| `context canceled` | 499 | [工具调用错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E8%AF%B7%E6%B1%82%E8%A2%AB%E5%8F%96%E6%B6%88) |
| `url2text` / `spider checkUrl failed` / `invalid html` | 500 | [工具调用错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E7%BD%91%E9%A1%B5%E8%AF%BB%E5%8F%96%E5%A4%B1%E8%B4%A5) |
| `image_url:moderation request error` | 500 | [工具调用错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%9B%BE%E7%89%87%E5%AE%A1%E6%A0%B8%E5%A4%B1%E8%B4%A5) |
| `We consider the current URL poses a security risk` | 403 | [工具调用错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#url-%E5%AE%89%E5%85%A8%E9%A3%8E%E9%99%A9%E6%8B%A6%E6%88%AA) |
| `invalid_url: The provided URL is invalid` | 400 | [工具调用错误](https://www.kimi.com/code/docs/kimi-code/error-reference.html#url-%E6%A0%BC%E5%BC%8F%E6%97%A0%E6%95%88) |
认证错误 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E8%AE%A4%E8%AF%81%E9%94%99%E8%AF%AF)
-------------------------------------------------------------------------------------------------------------
**HTTP 401**
请求未携带有效凭证,或凭证已失效。服务端在处理请求之前会先验证身份,401 表示这一步没有通过。**不需要重试**,修复凭证后重新发送请求。
### API Key 无效 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#api-key-%E6%97%A0%E6%95%88)
error, status code: 401, message: The API Key appears to be invalid or may have expired. Please verify your credentials and try again.
API Key 填写有误,或该 Key 已在控制台被撤销/过期。
**处理方式:**
* **密钥输入错误**:检查是否有多余的空格或遗漏的字符
* **密钥已过期或被撤销**:前往[控制台](https://www.kimi.com/code/console?from=kfc_overview_topbar)
› API Keys 确认密钥状态
* **环境变量覆盖**:检查是否有 `KIMI_API_KEY` 或 `OPENAI_API_KEY` 环境变量覆盖了配置文件中的密钥,可运行 `echo $KIMI_API_KEY` 检查;如果发现环境变量中配置了旧 Key,请更新为正确的 Key,或删除错误的环境变量后重新启动服务
### Invalid Authentication [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#invalid-authentication)
error, status code: 401, message: Invalid Authentication
请求未携带有效凭证,或使用了不支持的认证格式。
**处理方式:**
最常见原因是误用了开放平台的 Key 或 URL。Kimi Code 和 [Kimi 开放平台](https://platform.kimi.com/)
是两套独立系统,Key 和 Base URL 均不通用:
* Kimi Code:Key 从[控制台](https://www.kimi.com/code/console?from=kfc_overview_topbar)
获取,Base URL 为 `https://api.kimi.com/coding/v1`(OpenAI 协议)或 `https://api.kimi.com/coding/`(Anthropic 协议)
* 开放平台:Key 从 [platform.kimi.com](https://platform.kimi.com/)
获取,Base URL 为 `https://api.moonshot.cn/v1`
会员权益异常 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E4%BC%9A%E5%91%98%E6%9D%83%E7%9B%8A%E5%BC%82%E5%B8%B8)
---------------------------------------------------------------------------------------------------------------------------------
**HTTP 402**
服务端无法确认当前账号的订阅状态,通常为临时性问题。
### 会员权益无法验证 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E4%BC%9A%E5%91%98%E6%9D%83%E7%9B%8A%E6%97%A0%E6%B3%95%E9%AA%8C%E8%AF%81)
error, status code: 402, message: We're unable to verify your membership benefits at this time. Please ensure your membership is active.
**处理方式:**
* 确认 Kimi Code 订阅仍在有效期内
* 等待片刻后重试
* 前往[控制台](https://www.kimi.com/code/console?from=kfc_overview_topbar)
检查订阅状态
* 如持续出现,请前往 [Kimi 网页端](https://www.kimi.com/)
,点击左下角头像 → **帮助** → **用户反馈**,接入在线客服具体咨询
权限错误 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%9D%83%E9%99%90%E9%94%99%E8%AF%AF)
-------------------------------------------------------------------------------------------------------------
**HTTP 401**
请求本身格式正确,身份也已验证,但当前账号的订阅档位不包含该能力(如 K3、1M 上下文或高速版)。**重试无意义**,需要升级订阅或调整请求。配额与并发类问题请见[配额与账户限制](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E9%85%8D%E9%A2%9D%E4%B8%8E%E8%B4%A6%E6%88%B7%E9%99%90%E5%88%B6)
和[限流与过载](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E9%99%90%E6%B5%81%E4%B8%8E%E8%BF%87%E8%BD%BD)
。
### 无 K3 访问权限 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%97%A0-k3-%E8%AE%BF%E9%97%AE%E6%9D%83%E9%99%90)
error, status code: 401, message: Your current subscription does not have access to k3. Upgrade to higher-tier Kimi Code plans. Upgrade: Upgrade: https://www.kimi.com/code?from=server_highspeed_error#pricing
当前订阅未包含 `k3` 的访问权限。K3 需要 Moderato / Plus 及以上套餐才能调用。
**处理方式:**
* [升级订阅](https://www.kimi.com/code/#pricing)
到 Moderato / Plus 及以上套餐即可调用 `k3`
* 暂不升级时,可继续使用标准版 `kimi-for-coding`
### 无 1M 访问权限 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%97%A0-1m-%E8%AE%BF%E9%97%AE%E6%9D%83%E9%99%90)
error, status code: 401, message: Your current plan supports only k3 up to 256K context. 1M context is available on higher-tier Kimi Code plans. Upgrade: https://www.kimi.com/code?from=server_k3_error#pricing
当前套餐调用 `k3` 时仅支持最高 256K 上下文;如需使用最高 1M 上下文,需升级至 Allegretto / Pro 及以上套餐。直接调用 `k3-256k` 时上下文超过 256K,会返回 `k3-256k supports only 256K context.`,压缩上下文或切换到 `k3` 即可。
**处理方式:**
* [升级订阅](https://www.kimi.com/code/#pricing)
到 Allegretto / Pro 及以上套餐即可使用 `k3` 的最高 1M 上下文
* 暂不升级时,可继续使用 `k3` 的 256K 上下文,或切换到标准版 `kimi-for-coding`
### 模型 ID 不存在 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%A8%A1%E5%9E%8B-id-%E4%B8%8D%E5%AD%98%E5%9C%A8)
error, status code: 401, message: Your model id does not exist, recognized as other:. Please set model id as ``.
请求中使用的模型 ID 不被模型侧识别。常见原因是把只在特定场景使用的写法填到了不支持该写法的入口。例如 `k3[1m]`(带外层引号)仅在 Claude Code 环境变量场景中用于显式声明 1M 上下文窗口;在 API 请求、其他第三方工具的 Model ID 字段等场景中,应直接使用 `k3`。
**处理方式:**
* 检查报错中 `recognized as other:` 后面的实际 model id,确认没有拼写错误或多加符号
* 如果是 Claude Code 环境变量配置,确认已按 [在更多第三方工具中使用](https://www.kimi.com/code/docs/third-party-tools/claude-code.html)
的示例填写,包括外层引号
* 如果是 API 请求或其他第三方工具,将 Model ID 改为标准形式(如 `k3`、`kimi-for-coding`、`kimi-for-coding-highspeed`),避免使用仅适用于 Claude Code env 的 `k3[1m]` 写法
### 高速版无访问权限 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E9%AB%98%E9%80%9F%E7%89%88%E6%97%A0%E8%AE%BF%E9%97%AE%E6%9D%83%E9%99%90)
error, status code: 401, message: Your current subscription does not have access to kimi-for-coding-highspeed. Upgrade to higher-tier Kimi Code plans. Upgrade: Upgrade: https://www.kimi.com/code?from=server_highspeed_error#pricing
当前账号的订阅未包含高速版模型 `kimi-for-coding-highspeed` 的访问权限。高速版与标准版 `kimi-for-coding` 是同一个模型,但输出速度约为标准版的 5–6 倍,需要 Allegretto / Pro 及以上套餐才能使用。
**处理方式:**
* [升级订阅](https://www.kimi.com/membership/pricing?from=server_highspeed_error)
到 Allegretto / Pro 及以上套餐即可解锁高速版
* 暂不升级时,可继续使用标准版 `kimi-for-coding`,功能与高速版完全一致,仅输出速度较慢
配额与账户限制 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E9%85%8D%E9%A2%9D%E4%B8%8E%E8%B4%A6%E6%88%B7%E9%99%90%E5%88%B6)
-------------------------------------------------------------------------------------------------------------------------------------------
**HTTP 403**
账户侧的额度或限制触顶,分两类:配额类错误属于账户使用量问题,**重试无意义**,需等待窗口重置、购买额外用量或升级套餐;并发请求限制由风控策略触发,与剩余额度无关,需按申诉流程处理。
### 5 小时限额触顶 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#_5-%E5%B0%8F%E6%97%B6%E9%99%90%E9%A2%9D%E8%A7%A6%E9%A1%B6)
error, status code: 403, message: You've reached your 5-hour usage limit. Your quota will reset when the current 5-hour window ends. To continue now, purchase extra usage or upgrade your plan: https://www.kimi.com/membership/subscription?tab=quota
当前 5 小时滚动窗口内的调用量已达上限。
**处理方式:**
* 等待当前 5 小时窗口结束、额度自动重置,可前往[控制台](https://www.kimi.com/code/console?from=kfc_overview_topbar)
查看重置时间
* 前往[订阅页](https://www.kimi.com/membership/subscription?tab=quota)
购买额外用量(加油包)或升级套餐,提升限额上限
### 每周 7 天额度耗尽 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%AF%8F%E5%91%A8-7-%E5%A4%A9%E9%A2%9D%E5%BA%A6%E8%80%97%E5%B0%BD)
error, status code: 403, message: You've reached your weekly (7-day) usage limit. Your quota will reset when the current 7-day window ends. To continue now, purchase extra usage or upgrade your plan: https://www.kimi.com/membership/subscription?tab=quota
Kimi Code 订阅额度每 7 天刷新一次,当前 7 天窗口内的额度已全部用完。此错误仅适用于老会员(Andante / Moderato / Allegretto / Allegro 套餐);新会员(Go / Plus / Pro / Max 套餐)已取消每周额度限制,不会触发此错误。
**处理方式:**
* 等待当前 7 天窗口结束、额度自动刷新,可前往[控制台](https://www.kimi.com/code/console?from=kfc_overview_topbar)
查看额度使用情况
* 前往[订阅页](https://www.kimi.com/membership/subscription?tab=quota)
购买额外用量(加油包)或升级套餐,获取更高配额
### 会员月度额度耗尽 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E4%BC%9A%E5%91%98%E6%9C%88%E5%BA%A6%E9%A2%9D%E5%BA%A6%E8%80%97%E5%B0%BD)
error, status code: 403, message: You've reached your monthly usage limit for this billing cycle. Your quota will be refreshed in the next cycle. To continue now, purchase extra usage or upgrade your plan: https://www.kimi.com/membership/subscription?tab=quota
你的 Kimi [月度额度](https://www.kimi.com/membership/subscription)
已全部用完。
Kimi 的所有会员权益——包括 PPT、Agent 集群、Kimi Code 等共用同一套月度额度。一旦总额度耗尽,即使 Kimi Code 还有剩余额度,也无法继续发起请求,需等待下个月额度自动刷新或升级会员计划,详情见[Kimi 会员额度计费说明](https://www.kimi.com/membership-credits)
。额度耗尽后账户进入冻结状态,如下图所示:

**处理方式:**
* 等待下个计费周期自动重置
* 前往[订阅页](https://www.kimi.com/membership/subscription?tab=quota)
购买额外用量(加油包)或升级会员计划,获取更高的月度额度
### 并发请求限制 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%B9%B6%E5%8F%91%E8%AF%B7%E6%B1%82%E9%99%90%E5%88%B6)
error, status code: 403, message: You've reached your concurrent request limit. Please wait for your ongoing requests to finish and try again.
账号同时进行中的请求数达到上限。该限制由风控策略触发。
**处理方式:**
* 前往 [Kimi Code 社区倡议](https://www.kimi.com/code/docs/kimi-code/community-guidelines.html)
了解违规原因及判定范围
* 如需申诉,请发送邮件至 [support@moonshot.cn](mailto:support@moonshot.cn)
,并在邮件中附上:账号 ID、触发风控的时间、使用场景说明及相关截图
限流与过载 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E9%99%90%E6%B5%81%E4%B8%8E%E8%BF%87%E8%BD%BD)
-----------------------------------------------------------------------------------------------------------------------
**HTTP 429**
瞬时性限制,**稍后重试即可恢复**:并发请求过多是短时间内请求量超出账户限制;推理引擎过载是服务端容量问题,与个人配额和账户状态无关。
### 并发请求过多 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%B9%B6%E5%8F%91%E8%AF%B7%E6%B1%82%E8%BF%87%E5%A4%9A)
error, status code: 429, message: We're receiving too many requests at the moment. Please wait a moment and try again.
短时间内发出的请求太多,超出了账户限制。
**处理方式:**
* 稍等片刻后重试,避免连续快速地重复发送请求
### 推理引擎过载 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%8E%A8%E7%90%86%E5%BC%95%E6%93%8E%E8%BF%87%E8%BD%BD)
error, status code: 429, message: The engine is currently overloaded, please try again later
服务端当前请求量超出推理容量,**与个人配额和账户状态无关**。 工作日高峰期(14:00-17:00)可能会触发,Kimi Code会及时处理,为你提供更丝滑的体验,也可避开高峰期请求
**处理方式:**
* 稍等片刻后重试
请求格式错误 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E8%AF%B7%E6%B1%82%E6%A0%BC%E5%BC%8F%E9%94%99%E8%AF%AF)
---------------------------------------------------------------------------------------------------------------------------------
**HTTP 400**
请求内容本身有问题,服务端在解析或校验阶段就拒绝了。**修改请求内容即可解决,无需等待或联系支持。**
### 消息体超出上下文限制 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%B6%88%E6%81%AF%E4%BD%93%E8%B6%85%E5%87%BA%E4%B8%8A%E4%B8%8B%E6%96%87%E9%99%90%E5%88%B6)
error, status code: 400, message: total message size 5943865 exceeds limit 2097152
所有消息(含历史对话、系统提示、工具结果)加起来超过 2MB 上下文限制。这是出现频率最高的 400 错误。
**处理方式:**
* 精简对话历史,删除不必要的早期轮次
* 分段处理长文本,控制单次请求体积
### Token 超限 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#token-%E8%B6%85%E9%99%90)
error, status code: 400, message: Invalid request: Your request exceeded model token limit: 262144 (requested: 558009)
请求的 token 数超过模型单次处理上限(262,144 tokens)。
**处理方式:**
* 缩短 prompt 长度或截断历史对话
* 分多次请求处理长文本
### 思维链字段缺失 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%80%9D%E7%BB%B4%E9%93%BE%E5%AD%97%E6%AE%B5%E7%BC%BA%E5%A4%B1)
error, status code: 400, message: thinking is enabled but reasoning_content is missing in assistant tool call message at index 2
启用了思维链(thinking)模式,但工具调用消息中缺少 `reasoning_content` 字段。这是 Kimi Code 特有字段,启用思维链时必须携带。
**处理方式:**
* 在工具调用的 assistant 消息中补充 `reasoning_content` 字段
* 参考 [平台与模型](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html)
查看思维链字段规范
### 不支持的图片 URL [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E4%B8%8D%E6%94%AF%E6%8C%81%E7%9A%84%E5%9B%BE%E7%89%87-url)
error, status code: 400, message: Invalid request: unsupported image url: C:\Users\pc\...\screenshot.jpg
传入的图片 URL 格式不支持:本地路径、非标准 base64 前缀,或不支持的外部域名。
**处理方式:**
* 本地路径需上传至可公开访问的 URL
* base64 图片需使用标准格式:`data:image/jpeg;base64,...`
### 工具名重复 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%B7%A5%E5%85%B7%E5%90%8D%E9%87%8D%E5%A4%8D)
error, status code: 400, message: function name unnamed_function is duplicated
`tools` 数组中存在同名工具定义。
**处理方式:**
* 确保每个工具的 `name` 字段唯一
### 内容安全拦截 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%86%85%E5%AE%B9%E5%AE%89%E5%85%A8%E6%8B%A6%E6%88%AA)
error, status code: 400, message: The request was rejected because it was considered high risk
请求内容触发了内容安全检测,服务端拒绝处理。
**处理方式:**
* 检查 prompt 中是否包含敏感内容,修改后重试
* 如认为是误判,请前往 [Kimi 网页端](https://www.kimi.com/)
,点击左下角头像 → **帮助** → **用户反馈**,联系在线客服,并附上触发报错的请求内容
资源未找到 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E8%B5%84%E6%BA%90%E6%9C%AA%E6%89%BE%E5%88%B0)
-----------------------------------------------------------------------------------------------------------------------
**HTTP 404**
请求的资源不存在,或当前账号无权访问。检查模型名称和接口路径是否正确。
### 模型未找到 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%A8%A1%E5%9E%8B%E6%9C%AA%E6%89%BE%E5%88%B0)
error, status code: 404, message: Not found the model kimi-for-coding or Permission denied
**处理方式:**
* 确认模型名称拼写正确(`kimi-for-coding`);常见错误拼写:`Kimi For Coding`、`Kimi-for-Coding`、`kimi-for-code`、`kimi-code`、`K2.6`
* 确认账号已开通 [Kimi Code](https://kimi.com/code)
访问权限
### 接口路径不存在 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%8E%A5%E5%8F%A3%E8%B7%AF%E5%BE%84%E4%B8%8D%E5%AD%98%E5%9C%A8)
method not found
**处理方式:**
* 检查请求 URL 是否正确,Kimi Code 的 Base URL 为 `https://api.kimi.com/coding/v1`(OpenAI 协议)或 `https://api.kimi.com/coding/`(Anthropic 协议)
服务端内部错误 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%9C%8D%E5%8A%A1%E7%AB%AF%E5%86%85%E9%83%A8%E9%94%99%E8%AF%AF)
-------------------------------------------------------------------------------------------------------------------------------------------
**HTTP 500**
服务端发生了意外错误,**不由请求内容或账户状态引起**。大多数情况下等待片刻后重试即可恢复,如持续出现,请前往 [Kimi 网页端](https://www.kimi.com/)
,点击左下角头像 → **帮助** → **用户反馈**,联系在线客服进行反馈。
### bot\_id 格式不合规 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#bot-id-%E6%A0%BC%E5%BC%8F%E4%B8%8D%E5%90%88%E8%A7%84)
invalid_argument: field kimi.billing.v1.ClawExtension.bot_id: value "KIMI_CLAW_ID" (id_kind=uuid_v4): value does not match id_kinds: [uuid_v4]
invalid_argument: field kimi.billing.v1.ClawExtension.bot_id: value "openclaw-local" (id_kind=uuid_v4): value does not match id_kinds: [uuid_v4]
`bot_id` 不是合法的 UUID v4 格式。这是客户端软件在发请求时自动附上的字段,通常由客户端负责填写,用户无需手动设置。
**处理方式:**
* 更新到最新版本的客户端后重试
* 如更新后仍出现,请前往 [Kimi 网页端](https://www.kimi.com/)
,点击左下角头像 → **帮助** → **用户反馈**,联系在线客服并发送完整报错信息
### 数据库连接失败 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%95%B0%E6%8D%AE%E5%BA%93%E8%BF%9E%E6%8E%A5%E5%A4%B1%E8%B4%A5)
internal: failed to connect to `user=kimi_chat_prod_rw database=membership_009`: ...: connection reset by peer
internal: FATAL: terminating connection due to administrator command (SQLSTATE 57P03)
服务端无法连接会员资格校验数据库,或数据库正在维护重启。属于基础设施层故障。
**处理方式:**
* 等待 1-2 分钟后重试
### 内部连接异常 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%86%85%E9%83%A8%E8%BF%9E%E6%8E%A5%E5%BC%82%E5%B8%B8)
internal: conn closed
internal: driver: bad connection
internal: read tcp ...: i/o timeout
internal: unexpected EOF
internal: failed to evaluate rate limit script: read tcp ...: i/o timeout
服务端内部网络连接异常,涵盖连接被重置、I/O 超时、Redis 限流脚本超时等多种底层错误,通常为瞬态故障。
**处理方式:**
* 稍等片刻后重试(初始等待 1 秒,最多重试 3 次)
### 下游服务不可用 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E4%B8%8B%E6%B8%B8%E6%9C%8D%E5%8A%A1%E4%B8%8D%E5%8F%AF%E7%94%A8)
unavailable: 503 Service Unavailable
unavailable: 504 Gateway Timeout
unavailable: 502 Bad Gateway
服务端调用下游模型或基础组件时收到 5xx 响应。
**处理方式:**
* 等待片刻后重试
### 账号状态异常 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E8%B4%A6%E5%8F%B7%E7%8A%B6%E6%80%81%E5%BC%82%E5%B8%B8)
unauthenticated: not_found: 未找到该账号,请确认是否注册
unauthenticated: failed_precondition: 因违反用户协议,该账号已被禁用。
unauthenticated: failed_precondition: 因违反用户协议,该账号已被暂时禁用。
unauthenticated: failed_precondition: 因违反用户协议,该账号已被禁言。
服务端查询账号信息时发现账号不存在或处于异常状态。
**处理方式:**
* 账号未注册:确认使用的账号已完成注册
* 账号被禁用/禁言:发送邮件至 [support@moonshot.cn](mailto:support@moonshot.cn)
了解原因和申诉方式
工具调用错误 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%B7%A5%E5%85%B7%E8%B0%83%E7%94%A8%E9%94%99%E8%AF%AF)
---------------------------------------------------------------------------------------------------------------------------------
以下错误发生在 AI 执行工具调用过程中(如读取网页、处理图片),**不影响对话本身继续使用**,只是当前这一步操作没有成功。
如果看到的是认证或限流类错误(如 401、429),请参考前面的对应章节。
### 请求被取消 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E8%AF%B7%E6%B1%82%E8%A2%AB%E5%8F%96%E6%B6%88)
**HTTP 499**
error sending 'CallDataSourceTool' request: Post "http://...": context canceled
canceled: context canceled
客户端在收到结果之前主动中断了连接,通常是用户手动停止操作、网络中断或客户端超时触发。不是服务端错误。
**处理方式:**
* 用户主动停止属正常行为,无需处理
* 频繁出现且非主动触发时,检查客户端超时配置是否过短
### 网页读取失败 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E7%BD%91%E9%A1%B5%E8%AF%BB%E5%8F%96%E5%A4%B1%E8%B4%A5)
**HTTP 500**
url2text:v2:fresh-request timeout
url-to-text request failed: 30001 invalid html
url-to-text request failed: 30041 check url failed, client error (4xx)
url-to-text request failed: 30043 check url failed, server error (5xx)
url-to-text request failed: 403 verify page
url-to-text request failed: 500 url is in blacklist
spider checkUrl failed: Post "...": context deadline exceeded
AI 尝试读取网页内容时失败。常见原因:目标页面响应超时、页面结构异常、需要登录验证、URL 在黑名单内,或目标服务器本身出错。
**处理方式:**
* 超时或服务器错误:稍后重试
* 需要登录验证的页面(verify page):无法通过工具读取,改为手动复制内容后粘贴给 AI
* 黑名单 URL:该地址被系统拦截,无法访问
### 图片审核失败 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E5%9B%BE%E7%89%87%E5%AE%A1%E6%A0%B8%E5%A4%B1%E8%B4%A5)
**HTTP 500**
image_url:moderation request error: 非法输入
image_url:Post "https://api.msh.team/v1/moderations": context deadline exceeded
AI 在处理图片时,图片内容审核服务返回错误或超时。
**处理方式:**
* `非法输入`:图片内容触发了内容审核,请确认图片符合使用规范
* 超时:稍后重试,或检查网络连接是否正常
### URL 安全风险拦截 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#url-%E5%AE%89%E5%85%A8%E9%A3%8E%E9%99%A9%E6%8B%A6%E6%88%AA)
**HTTP 403**
(security_risk) We consider the current URL poses a security risk and are unable to provide fetch service at this time.
工具调用中传入的 URL 被判定为安全风险,服务端拒绝抓取。
**处理方式:**
* 内网地址(如 `192.168.x.x`、`10.x.x.x`)及已知风险域名会被拦截
* 需要登录才能访问的页面无法通过工具调用抓取
### URL 格式无效 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#url-%E6%A0%BC%E5%BC%8F%E6%97%A0%E6%95%88)
**HTTP 400**
(invalid_url) The provided URL is invalid: parse "https://the repo for the contents of the path": invalid character " " in host name
(invalid_url) The provided URL is invalid: missing scheme
模型将自然语言描述或格式有误的字符串作为 URL 传给工具,通常是描述性文字被当成地址传入,或缺少协议头。
**处理方式:**
* 确认传入的是真实可访问的 URL,不是对 URL 的文字描述
* 协议头(`http://` 或 `https://`)不可省略
未覆盖的错误类型 [](https://www.kimi.com/code/docs/kimi-code/error-reference.html#%E6%9C%AA%E8%A6%86%E7%9B%96%E7%9A%84%E9%94%99%E8%AF%AF%E7%B1%BB%E5%9E%8B)
-----------------------------------------------------------------------------------------------------------------------------------------------------
如以上条目未能覆盖你遇到的报错,请前往 [Kimi 网页端](https://www.kimi.com/)
,点击左下角头像 → **帮助** → **用户反馈**,联系在线客服,并附上完整的错误消息、Request ID 和请求时间。
---
# 快速开始 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#VPContent)
On this page
快速开始 [](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B)
=====================================================================================================================
Kimi Code 桌面端是 Kimi Code 的桌面客户端。你可以在图形界面中打开本地项目,通过对话让 Agent 阅读和修改代码,并使用改动、文件预览和终端检查结果。
本页介绍从安装、连接模型到完成第一个任务的最短路径。

Kimi Code 桌面端首页:输入消息即可开始对话。
安装与启动 [](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E5%AE%89%E8%A3%85%E4%B8%8E%E5%90%AF%E5%8A%A8)
-------------------------------------------------------------------------------------------------------------------------------
[Kimi Code 桌面版macOS · Apple Silicon](https://code.kimi.com/kimi-code/desktop/download/KimiCode-mac-arm64.dmg)
[Kimi Code 桌面版macOS · Intel](https://code.kimi.com/kimi-code/desktop/download/KimiCode-mac-x64.dmg)
[Kimi Code 桌面版Windows](https://code.kimi.com/kimi-code/desktop/download/KimiCode-win-x64.exe)
首次启动时选择界面语言和主题,之后可以在设置中调整。
登录 [](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E7%99%BB%E5%BD%95)
-------------------------------------------------------------------------------------------------
首次启动时可以按页面提示完成 Kimi OAuth 授权,也可以先跳过。之后需要登录时,再从应用中的登录入口完成授权;授权失败时按页面提示重试。登录站点随所在区域而定:国内区域为 kimi.com,海外区域为 kimi.ai。登录后可在设置的账号区域随时查看套餐用量。

登录 Kimi Code:选择账号类型后按提示完成 OAuth 授权。
连接模型 [](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E8%BF%9E%E6%8E%A5%E6%A8%A1%E5%9E%8B)
---------------------------------------------------------------------------------------------------------------------
### 使用 Kimi 官方模型 [](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E4%BD%BF%E7%94%A8-kimi-%E5%AE%98%E6%96%B9%E6%A8%A1%E5%9E%8B)
登录 Kimi 账号后,桌面端会使用账号可用的官方模型。你可以在输入框内的模型选择区域确认当前模型,也可以在设置中的模型模块查看可用模型和模型权限。
未订阅 Kimi 会员的用户系统无法直接读取并使用官方模型,不同会员可使用的模型权益也不同,可以从账号区域找到会员入口,查看并选择适合的会员方案。会员权益和模型权限说明见[会员权益](https://www.kimi.com/code/docs/kimi-code/membership.html)
和[模型配置](https://www.kimi.com/code/docs/kimi-code/models.html)
。
### 接入第三方模型供应商 [](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E6%8E%A5%E5%85%A5%E7%AC%AC%E4%B8%89%E6%96%B9%E6%A8%A1%E5%9E%8B%E4%BE%9B%E5%BA%94%E5%95%86)
如果你需要使用其他模型供应商:
1. 打开设置,进入模型供应商区域。
2. 选择添加供应商,填写 API Key、Base URL 和模型信息。
3. 保存后回到会话,在输入框附近切换到该模型。
4. 发送一个只读任务,确认模型可用。

手动添加供应商需要填写名称、API 协议、API Key、Base URL 和模型信息。
完整的模型和供应商说明见[模型配置](https://www.kimi.com/code/docs/kimi-code/models.html)
和[平台与模型](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html)
。
新建会话并选择工作区 [](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E6%96%B0%E5%BB%BA%E4%BC%9A%E8%AF%9D%E5%B9%B6%E9%80%89%E6%8B%A9%E5%B7%A5%E4%BD%9C%E5%8C%BA)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
桌面端会按工作区整理会话。新建会话后,可以在输入框上方选择要使用的本地项目文件夹:
1. 点击左侧的“新建会话”。
2. 点击输入框上方的文件夹名称,打开工作区选择器。
3. 从最近使用的文件夹中选择项目,或点击“选择文件夹…”添加新的本地文件夹。
4. 确认输入框上方显示了目标工作区后,再输入任务并发送消息。
新选择的文件夹会成为桌面端的工作区,并加入最近使用的文件夹列表。添加时若选择“直接输入绝对路径”,路径会以本地绝对路径解析;空会话必须先选择工作区才能发送。将 Finder 或文件资源管理器中的文件夹拖到侧边栏,也可以直接添加为工作区。
会话会出现在所选工作区的会话列表中。已有工作区和会话可以直接从左侧切换。

新建会话后,点击输入框上方的文件夹名称,从最近使用的文件夹中选择或添加新的工作区。
发起第一个任务 [](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E5%8F%91%E8%B5%B7%E7%AC%AC%E4%B8%80%E4%B8%AA%E4%BB%BB%E5%8A%A1)
---------------------------------------------------------------------------------------------------------------------------------------------------
在输入框中输入任务,也可以用 `@` 引用文件或目录。输入框左下角的 **+** 提供几种任务模式:
* **目标**:设定一个持续推进的目标,适合需要多轮执行和检查的长任务;开启后,目标会显示在输入框上方。见[目标模式](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E7%9B%AE%E6%A0%87%E6%A8%A1%E5%BC%8F)
。
* **计划**:先让 Agent 分析并给出计划,确认后再修改文件。见 [Plan 模式](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#plan-%E6%A8%A1%E5%BC%8F)
。
* **Swarm**:把可拆分的任务交给多个子代理并行处理,进度会显示在 Tasks 或 Subagent 区域。见 [Agent 与 subagent](https://www.kimi.com/code/docs/kimi-code-cli/customization/agents.html)
。
任务执行过程中,Agent 的工具调用、思考过程和每轮修改的文件都会呈现在界面中,可以随时查看。你可以继续输入补充要求来调整方向,例如缩小修改范围、补充约束、要求先解释原因、要求停止当前操作,或让 Agent 按新的要求继续。需要回退时,可以使用 `/undo` 回退最近的修改。
处理审批 [](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E5%A4%84%E7%90%86%E5%AE%A1%E6%89%B9)
---------------------------------------------------------------------------------------------------------------------
桌面端会把需要你决定的操作显示为审批卡片。卡片可能包含命令、文件修改或计划等内容;阅读具体范围后再选择批准或拒绝。智能体提出问题时,问题卡片可能提供单选、多选和「其他」输入。
权限模式有三种:
* **始终询问**:仅自动读取,其余操作逐一向你确认。
* **必要时询问**:自动完成常规修改和命令;高危操作、提问和计划仍会问你。
* **完全自动**:完全不打断,所有操作和判断自动完成。
首次使用或处理不熟悉的项目时,建议先使用 **始终询问**,确认操作范围后再调整模式。
查看改动并验证 [](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E6%9F%A5%E7%9C%8B%E6%94%B9%E5%8A%A8%E5%B9%B6%E9%AA%8C%E8%AF%81)
---------------------------------------------------------------------------------------------------------------------------------------------------
修改完成后,在右侧查看改动,先检查文件列表,再按文件和单次修改查看具体变化。需要进一步确认时,可以在文件预览中检查 Markdown、JSON、HTML、PDF、CSV、图片以及代码或文本文件,并复制、下载、在系统中显示或在外部应用中打开。会话中提到的文件路径也可以直接点开预览。
如果任务需要运行检查,可通过会话右上角的终端按钮打开底部终端面板,确认命令、当前工作区和输出结果。验证无误后再继续下一步;如果结果不符合预期,可以回到会话中说明问题,或使用 `/undo` 回退最近的修改。
如果是网页类项目,还可以在右侧面板打开内置浏览器:标签页随会话常驻,页面信息与 Agent 共享,直接在应用内查看页面效果,无需切到其他窗口。

右侧改动面板按文件显示每次修改的具体差异。
继续探索 [](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E7%BB%A7%E7%BB%AD%E6%8E%A2%E7%B4%A2)
---------------------------------------------------------------------------------------------------------------------
完成第一个任务后,可以继续:
* 用**目标**推进长任务。
* 用 **Swarm** 处理可拆分的调查或修改。
* 通过顶部菜单在外部编辑器、文件管理器或系统终端中打开项目。
* 创建、归档、恢复、Fork 或导出会话。
* 在设置中调整模型、权限、快捷键和插件。
常用命令 [](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4)
---------------------------------------------------------------------------------------------------------------------
输入框可以直接输入任务,也支持通过 `/` 使用内置命令。常用命令:
| 命令 | 作用 |
| --- | --- |
| `/new` | 新建会话 |
| `/login` | 打开登录流程 |
| `/plan` | 进入计划模式 |
| `/goal` | 设定持续推进的目标 |
| `/swarm` | 使用多个子代理处理任务 |
| `/compact` | 压缩当前上下文 |
| `/undo` | 回退最近的修改 |
| `/fork` | Fork 当前会话 |
| `/export` | 导出会话 |
| `/status` | 查看当前会话状态 |
桌面端和命令行的关系 [](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E6%A1%8C%E9%9D%A2%E7%AB%AF%E5%92%8C%E5%91%BD%E4%BB%A4%E8%A1%8C%E7%9A%84%E5%85%B3%E7%B3%BB)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
桌面端延续 Kimi Code CLI 的 Agent 核心能力,两者可以安装在同一台机器上,并共享部分本地配置,如账号、模型、模型供应商和插件相关设置。在 CLI 中运行 `/desktop` 斜杠命令或 [`kimi install-desktop`](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-install-desktop)
子命令,可以在浏览器中打开桌面端页面进行下载安装。
桌面端适合在图形界面中管理项目、会话、改动和终端验证;命令行更适合终端优先和脚本化的工作流。具体共享范围以各自的设置和配置文件为准。
下一步 [](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
-----------------------------------------------------------------------------------------------------------
* [使用桌面端](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html)
:了解任务模式、上下文、会话管理、终端和设置。
* [Kimi Code CLI 快速开始](https://www.kimi.com/code/docs/kimi-code-cli/guides/getting-started.html)
:了解终端中的命令、会话和脚本化流程。
* [模型配置](https://www.kimi.com/code/docs/kimi-code/models.html)
:查看可用模型和模型配置方式。
* [会员权益](https://www.kimi.com/code/docs/kimi-code/membership.html)
:了解账号权益、额度和升级方式。
---
# 变更记录 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#VPContent)
Return to top
变更记录 [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#%E5%8F%98%E6%9B%B4%E8%AE%B0%E5%BD%95)
===============================================================================================================
本页记录 Kimi Code Desktop 每个版本的变更内容。
1.0.3(2026-09-23) [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#_1-0-3-2026-09-23)
---------------------------------------------------------------------------------------------------------
### 新功能 [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#%E6%96%B0%E5%8A%9F%E8%83%BD)
* 点击会话中的本地 HTML 文件,会在右侧内置浏览器中按真实网页打开,方便直接验证页面效果。
* 浏览器下载记录支持暂停、继续、取消和重试,并显示下载速度与剩余时间。
* 输入框中高亮有效的行首 `/` 命令,未输入参数时显示参数提示。
* 右键点击会话中的文件名,可以复制路径或在文件夹中显示。
* 设置中新增自动生成会话标题的开关,关闭后不再用 AI 命名新会话。
* 免费套餐账号使用订阅模型发送消息时,会提示升级套餐。
### 优化 [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#%E4%BC%98%E5%8C%96)
* 会话中的 Markdown 表格改用圆角外框,加宽后可占满会话整宽。
* 定时任务在会话记录中显示易读的名称、周期和详情。
* 浏览器地址栏建议列表支持高亮、去重,并区分不同类型的建议。
* 展开的工具面板中显示完整的 Bash 命令。
### 修复 [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#%E4%BF%AE%E5%A4%8D)
* 修复恶意网页可通过本地内嵌服务器执行任意命令的安全漏洞。
* 修复长对话打开卡死、流式输出掉帧和移动端内存占用过高的问题。
* 修复删除会话后确认弹窗一直转圈无法关闭的问题。
* 修复子代理模型设置在界面显示未配置、保存后不生效的问题。
* 修复 Swarm 工具卡片与成员状态显示的一系列问题。
* 修复 Fork 会话继续聊天后,标题被自动重新生成覆盖的问题。
* 修复内置终端 `Cmd+K` 误弹出搜索面板、`Ctrl+C` 在选中文字时无法复制的问题。
* 修复侧边栏与工作面板同时打开时互相遮挡争抢的问题。
* 修复侧边聊天在请求失败时不显示失败卡片、新建会话空页面仍可点击侧边聊天入口的问题。
* 修复任务通知卡片在回合折叠内顺序错乱的问题。
* 修复 Windows 上置顶截图拖拽不稳定的问题。
1.0.2(2026-09-19) [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#_1-0-2-2026-09-19)
---------------------------------------------------------------------------------------------------------
### 新功能 [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#%E6%96%B0%E5%8A%9F%E8%83%BD-1)
* 内置浏览器全面升级:会话记录中实时展示 Agent 的浏览活动,按活动分组汇总并列出信息来源;Agent 控制标签页时页面四周显示高亮描边;Agent 还会主动展示你要求查看的页面。
* 浏览器地址栏新增「在默认浏览器中打开」按钮;下载记录中显示实时下载进度与文件操作。
* Agent 可按照你配置的搜索引擎进行搜索。
* 重新设计供应商设置页。
* 退出确认改为应用内对话框。
* 鼠标悬停可查看 subagent 名称。
### 优化 [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#%E4%BC%98%E5%8C%96-1)
* 启动渲染更快,侧边栏更新更轻量,会话搜索范围加上限。
* 输入框换行时不再重绘整个会话记录。
* 截图导出与复制不再重复解码。
* 截图全局快捷键仅限稳定版可用。
### 修复 [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#%E4%BF%AE%E5%A4%8D-1)
* 修复窗口隐藏或最小化时页面截图失败的问题。
* 恢复 `` ctrl+` `` 为底部终端开关,移除新建终端标签的快捷键。
* 登录后保持当前视图,不再跳转到最近的会话。
* 修复地址栏输入时建议列表不即时更新的问题。
* 修复 cmd 点击和中键点击链接不在新标签页打开的问题。
* 修复 Agent 的浏览器 URL 被截断为单个字符的问题。
* 修复下载保存对话框未显示在应用窗口上的问题。
* 修复 sub-agent 的审批与提问请求不显示的问题。
* 修复会话恢复时的闪烁;回合文件卡片仅保留最近 3 轮。
* 修复调整窗口大小或切换面板时会话记录跳动的问题。
* Windows:支持检测安装在自定义目录的编辑器,保留全屏窗口边框与媒体控制。
1.0.1(2026-09-17) [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#_1-0-1-2026-09-17)
---------------------------------------------------------------------------------------------------------
### 新功能 [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#%E6%96%B0%E5%8A%9F%E8%83%BD-2)
* 改动详情的 diff 视图新增「打开文件」按钮。
* 会话记录中的链接悬停时显示完整 URL,并提供打开操作。
* 浏览器工具调用在会话记录中可视化展示。
* 图片预览支持图集导航与右键菜单。
* 移除工作区时,确认弹窗会说明移除后的影响。
* 截图输出操作顺序调整为关闭、置顶、保存、复制。
### 优化 [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#%E4%BC%98%E5%8C%96-2)
* 统一设置页中供应商、插件、快捷键、浏览器标签页的样式。
* 提升低 DPI 显示器下的界面清晰度。
### 修复 [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#%E4%BF%AE%E5%A4%8D-2)
* 失败的回合卡片现在显示完整的供应商错误信息。
* 编辑与视图菜单标签随界面语言本地化。
* 修复内置浏览器的多项问题:macOS 下 Agent 剪贴板与撤销键失效、非 http 链接被拦截后页面空白、元素引用与等待轮询偶发失效。
* 修复 toast 提示被模态框遮挡的问题。
* 修复打开右侧面板时页面根节点跟随滚动的问题。
* 修复侧边聊天中工具调用的渲染与交互问题。
1.0.0(2026-09-17) [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#_1-0-0-2026-09-17)
---------------------------------------------------------------------------------------------------------
### 新功能 [](https://www.kimi.com/code/docs/kimi-code-desktop/changelog.html#%E6%96%B0%E5%8A%9F%E8%83%BD-3)
* Kimi Code 桌面客户端正式发布:延续 Kimi Code CLI 的 Agent 核心能力,在图形界面中打开项目、与 Agent 对话并交付改动。支持 macOS(Apple Silicon / Intel)和 Windows。
* 每一步都清晰可见:工具调用、思考过程和每轮修改的文件都在界面中呈现;敏感操作弹出审批提示,始终询问 / 必要时询问 / 完全自动三档权限模式由你掌控。
* 从对话到交付的完整工作流:目标模式持续推进长任务,可暂停、恢复或取消;计划模式先出方案再动手,计划可评审、可反馈;长任务可转入后台继续运行,随时查看进度。
* 内置浏览器与可视化标注:浏览器进驻右侧面板,标签页随会话常驻,页面信息与 Agent 共享;支持截图标注、划词评论、`@` 提及文件和网页元素点选,让 Agent 准确定位要修改的位置。
* 登录即可使用 Kimi 官方模型,也可接入第三方模型供应商;会话、项目与后台任务集中管理,并可通过插件扩展能力。
---
# 会员权益 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code/membership.html#VPContent)
Return to top
会员权益 [](https://www.kimi.com/code/docs/kimi-code/membership.html#%E4%BC%9A%E5%91%98%E6%9D%83%E7%9B%8A)
========================================================================================================
📢 新套餐发布
Kimi 会员新套餐正式发布,定价不变。新套餐详情见 [Kimi Code 套餐购买页](https://www.kimi.com/code/#pricing)
。新会员**取消每周额度限制**,仅保留每 5 小时的滚动频率窗口;Go 档无 coding 额度,Plus 及以上档位可使用 Kimi Code。老套餐会员不受影响,档位名称、额度规则与自动续费均维持原样。新老套餐的规则差异见下方 [套餐档位](https://www.kimi.com/code/docs/kimi-code/membership.html#plan-comparison)
对比。
概述 [](https://www.kimi.com/code/docs/kimi-code/membership.html#%E6%A6%82%E8%BF%B0)
------------------------------------------------------------------------------------
Kimi Code 是 [Kimi 会员权益](https://www.kimi.com/membership/pricing?from=kfc_docs_membership)
中面向开发者的智能编程服务,随 Kimi 会员订阅一同提供,与 Kimi 会员共享同一套额度。CLI、VS Code、桌面端及第三方工具发起的请求,均计入该额度。
订阅档位与价格详见 [Kimi 会员权益页](https://www.kimi.com/membership/pricing?from=kfc_docs_membership)
。
套餐档位 [](https://www.kimi.com/code/docs/kimi-code/membership.html#plan-comparison)
-----------------------------------------------------------------------------------
Kimi 会员已启用新的档位名称,定价不变。新老套餐的规则对比如下:
| 对比项 | 老套餐 | 新套餐 |
| --- | --- | --- |
| Kimi Code 使用门槛 | Andante 及以上 | Plus 及以上 |
| 5 小时频率窗口 | 有 | 有 |
| 周频率窗口 | 有 | 无 |
| 月总额度 | 有 | 有 |
| K3 调用门槛 | Moderato 及以上 | Plus 及以上 |
| K3 1M 上下文门槛 | Allegretto 及以上 | Pro 及以上 |
| 高速版门槛 | Allegretto 及以上 | Pro 及以上 |
**常见问题**
老套餐还能继续使用吗?
可以。在新版套餐上线前购买的旧版套餐仍可继续使用,到期后可选择续订或升级到新版套餐。
我一定要升级新套餐吗?
不是强制迁移。老套餐可以继续维持订阅,是否升级取决于你的使用需求。
如何升级会员计划?
在 [Kimi Code 套餐购买页](https://www.kimi.com/code/#pricing)
选择想要升级的新套餐,点击「订阅」后按提示完成支付即可。升级时系统会根据当前套餐的剩余天数折算,新套餐权益立即生效。
额度与限制 [](https://www.kimi.com/code/docs/kimi-code/membership.html#%E9%A2%9D%E5%BA%A6%E4%B8%8E%E9%99%90%E5%88%B6)
------------------------------------------------------------------------------------------------------------------
新会员与老会员的额度规则不同:
* **新会员**:取消每周额度限制,不再每 7 天刷新;保留**每 5 小时的滚动频率窗口**——短时间请求过多会触发限流,等窗口滚动后自动恢复。
* **老会员**:规则不变,额度以订阅日为起点**每 7 天自动刷新**,未用完不累积;同样有每 5 小时的滚动频率窗口。
两类会员都与 Kimi 会员计划共享月总额度:如月总额度达到上限,Kimi Code 额度会冻结,需等待月额度重置或升级订阅。月额度消耗可在 [订阅](https://www.kimi.com/membership/subscription)
页查看。
所有登录设备和 API Key 共享同一套配额;超过 30 天未活跃的设备会自动解绑,重新 `/login` 即可恢复。登录 [Kimi Code 控制台](https://www.kimi.com/code/console)
可随时查看剩余额度与频限状态、管理 API Key 和登录设备。
加油包 [](https://www.kimi.com/code/docs/kimi-code/membership.html#extra-usage)
------------------------------------------------------------------------------
订阅额度用尽后,可用加油包(Extra Usage)余额继续发起请求,不必等待刷新。仅订阅会员可开启,且**网页端 Kimi 与 Kimi Code 共享同一份加油包额度**。完整条款见 [加油包充值协议](https://www.kimi.com/user/agreement/extra-usage-rules-cn)
。

**充值入口**
* **从主站充值**:进入 Kimi [订阅页面](https://www.kimi.com/membership/subscription?tab=quota)
,滚动至页面底部的「额度加油包」模块 → 选择充值金额 → 完成支付即可。
* **从 Kimi Code 控制台充值**:当你的**周额度(老会员)或 5 小时额度任意一项消耗超过 80%** 时,进度条卡片会出现【加油包购买】按钮,点击即可跳转到 Kimi 订阅页完成购买。

**开启与管理**
打开「额度加油包」开关后,当订阅额度用尽时,系统会自动从加油包余额中扣减。点击模块的「设置」可开启**每月消费上限**、设定本月最多可花费的金额;进度条则实时显示本月加油包的消耗情况。
**计费与规则**
* **计费**:按实际用量扣费——读取与生成的内容越多、任务越复杂,花费越高;余额以人民币显示,费率以平台展示为准。加油包价格近似于 [Kimi 开放平台](https://platform.kimi.com/)
的官方 API 价格;用量较大时,升级订阅通常更划算。
* **消耗优先级**:先扣订阅等限时额度,**加油包最后扣**,作为兜底补充。开启后即使订阅额度被打满,也能无缝消耗加油包余额,任务不中断、不报错。
* **限额控制**:可在设置中开启「每月消费上限」,为加油包设定本月最多可花费的金额;不开启则不限额。
* **有效期与叠加**:余额不过期、可叠加;订阅失效后余额仍可继续消费,但失效期间无法再充值,需重新开通订阅后才能充值。
* **退款**:一般不可退款、转让或兑现。
> 计费示例(引自官方示例,仅供感受量级,实际以平台为准):一次简单请求(如「推荐一首摇滚歌曲」)约 **0.03 元**;一次复杂的多步任务(如「规划一周成都到川西的自驾行程」)约 **1.6 元**。
> 充值限制:单次最低 25 RMB,每日最多 10 次、累计 3,000 RMB,余额上限 10,000 RMB。
**查询用量**
* **Kimi 网页 / App**:设置 → 订阅和发票 → [我的额度](https://www.kimi.com/membership/subscription?tab=quota)
。
* **Kimi Code 控制台**:**开启加油包后**,登录 [控制台](https://www.kimi.com/code/console)
即可查看余额与用量。
* **Kimi Code CLI**:在命令行中输入 `/usage` 直接查询。

**常见问题**
网页端 Kimi 和 Kimi Code 的加油包是同一个钱包吗?
是的。加油包额度在 Kimi 与 Kimi Code 之间共享——充值一次,两端通用;「我的额度」里充值的加油包与 Kimi Code 控制台的加油包也是同一个。
加油包和订阅额度谁先扣?
先扣订阅等限时额度,加油包在所有限时额度耗尽后才作为兜底扣除。
达到月 / 周(老会员)/ 小时额度上限,或会话中被限流时,还能继续吗?
能。开启加油包后不受订阅限额影响,任意额度触顶都会无缝切到加油包余额,任务不中断、不报错,且只扣加油包余额、不影响会员额度刷新。
加油包怎么计费?和同价位的订阅、开放平台 API 相比如何?
计费取决于请求的输入 / 输出量与 cache 命中率;加油包单价近似 [Kimi 开放平台](https://platform.kimi.com/)
的官方 API,用量较大时升级订阅通常更划算。
没用完的余额能留到下个月、能叠加吗?
能。余额制、不过期、可叠加;订阅失效后余额仍可消费,但失效期间无法充值,需重新开通订阅后再充。
余额快用尽时(如充了 25 元),会保证当前请求跑完吗?
会保证「最后一次模型调用」即使计费超限也完成,但不保证整个任务一定跑完。
加油包支持企业版吗?
暂不支持。
注销账户后余额会退回吗?
请前往 [Kimi 网页端](https://www.kimi.com/)
,点击左下角头像 → **帮助** → **用户反馈**,接入在线客服申请退款。
下一步 [](https://www.kimi.com/code/docs/kimi-code/membership.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
----------------------------------------------------------------------------------------------
* [模型配置](https://www.kimi.com/code/docs/kimi-code/models.html)
— 各档位可用的模型、上下文窗口与切换方式
* [错误参考](https://www.kimi.com/code/docs/kimi-code/error-reference.html)
— 额度用尽、权限不足等报错的处理方式
---
# 最新动态 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code/whats-new.html#VPContent)
On this page
最新动态 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%9C%80%E6%96%B0%E5%8A%A8%E6%80%81)
=======================================================================================================
记录 Kimi Code 各产品的新功能与核心修复,重点介绍最值得关注的变化。
最新Kimi Code CLI
v2.1.0 2026 年 9 月 23 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v2-1-0-2026-%E5%B9%B4-9-%E6%9C%88-23-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### 全屏模式(实验性) [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%85%A8%E5%B1%8F%E6%A8%A1%E5%BC%8F-%E5%AE%9E%E9%AA%8C%E6%80%A7)
新增实验性全屏界面:transcript 独立滚动、支持鼠标选择,点击折叠块即可展开或收起,底部还有可点击的 "Jump to bottom" 指示器。在 `/settings` 的 TUI mode 中开启,或在 `~/.kimi-code/tui.toml` 中设置 `tui_mode = "fullscreen"`,重启 Kimi Code 后生效。→ [tui.toml](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#tuitoml)
#### 启动更快、占用更低 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%90%AF%E5%8A%A8%E6%9B%B4%E5%BF%AB%E3%80%81%E5%8D%A0%E7%94%A8%E6%9B%B4%E4%BD%8E)
缩短 CLI 启动时间并降低内存占用,大项目下的首屏等待明显变短。
#### 文件监听默认关闭 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%96%87%E4%BB%B6%E7%9B%91%E5%90%AC%E9%BB%98%E8%AE%A4%E5%85%B3%E9%97%AD)
对配置文件和工作区文件的监听默认不再开启;如需热更新 AGENTS.md、skills 或 MCP 配置,将 `[watch] enabled` 设为 `true` 或设置 `KIMI_CODE_WATCH=1`。→ [watch](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#watch)
此外:加强工作区安全限制——文件工具无法再通过符号链接访问工作目录外的文件,项目本地配置仅在工作区受信任后生效;新增 `auto_session_title` 配置,可关闭客户端自动生成会话标题。→ [配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#%E9%A1%B6%E5%B1%82%E5%AD%97%E6%AE%B5)
Kimi Code Desktop
Kimi Code Desktop 正式发布 2026 年 9 月 17 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-code-desktop-%E6%AD%A3%E5%BC%8F%E5%8F%91%E5%B8%83-2026-%E5%B9%B4-9-%E6%9C%88-17-%E6%97%A5)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Kimi Code 桌面客户端正式上线:延续 Kimi Code CLI 的 Agent 核心能力,在图形界面中打开项目、与 Agent 对话并交付改动。现已支持 macOS(Apple Silicon / Intel)和 Windows。→ [快速开始](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html)
#### 每一步都清晰可见 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%AF%8F%E4%B8%80%E6%AD%A5%E9%83%BD%E6%B8%85%E6%99%B0%E5%8F%AF%E8%A7%81)
工具调用、思考过程和每轮修改的文件都在界面中呈现;敏感操作会弹出审批提示,始终询问 / 必要时询问 / 完全自动三档权限模式由你掌控。→ [处理审批](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html#%E5%A4%84%E7%90%86%E5%AE%A1%E6%89%B9)
#### 从对话到交付的完整工作流 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E4%BB%8E%E5%AF%B9%E8%AF%9D%E5%88%B0%E4%BA%A4%E4%BB%98%E7%9A%84%E5%AE%8C%E6%95%B4%E5%B7%A5%E4%BD%9C%E6%B5%81)
目标模式持续推进长任务,可暂停、恢复或取消;计划模式先出方案再动手,计划可评审、可反馈;长任务还可转入后台继续运行,随时查看进度。→ [选择任务模式](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html#%E9%80%89%E6%8B%A9%E4%BB%BB%E5%8A%A1%E6%A8%A1%E5%BC%8F)
#### 内置浏览器与可视化标注 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%86%85%E7%BD%AE%E6%B5%8F%E8%A7%88%E5%99%A8%E4%B8%8E%E5%8F%AF%E8%A7%86%E5%8C%96%E6%A0%87%E6%B3%A8)
浏览器进驻右侧面板,标签页随会话常驻,页面信息与 Agent 共享;截图标注、划词评论、`@` 提及文件、网页元素点选,让 Agent 准确定位要修改的位置。→ [验证修改](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html#%E9%AA%8C%E8%AF%81%E4%BF%AE%E6%94%B9)
下载:[macOS · Apple Silicon](https://code.kimi.com/kimi-code/desktop/download/KimiCode-mac-arm64.dmg)
· [macOS · Intel](https://code.kimi.com/kimi-code/desktop/download/KimiCode-mac-x64.dmg)
· [Windows](https://code.kimi.com/kimi-code/desktop/download/KimiCode-win-x64.exe)
Kimi Code CLI
v2.0.0 2026 年 9 月 17 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v2-0-0-2026-%E5%B9%B4-9-%E6%9C%88-17-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### 新增 `/desktop` 命令 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%96%B0%E5%A2%9E-desktop-%E5%91%BD%E4%BB%A4)
新增 `/desktop` 斜杠命令(别名 `/install-desktop`)与 `kimi install-desktop` 子命令,在浏览器中打开桌面端页面,从终端直达桌面端下载安装。→ [`kimi install-desktop`](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-install-desktop)
#### Mermaid 图表在终端渲染 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#mermaid-%E5%9B%BE%E8%A1%A8%E5%9C%A8%E7%BB%88%E7%AB%AF%E6%B8%B2%E6%9F%93)
Mermaid 代码块现在会直接渲染为图表;可在 `/settings` → Mermaid diagrams 中关闭,或在 tui.toml 的 `[markdown]` 配置段设置 `mermaid = "off"`。
此外:内置浏览器插件更名为 Kimi Browser Extension;会话中累积的媒体超过 20 MB 时,最早的图片和视频会自动从请求中省略并显示警告 → [粘贴图片与视频](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E7%B2%98%E8%B4%B4%E5%9B%BE%E7%89%87%E4%B8%8E%E8%A7%86%E9%A2%91)
。v2.0.1 起,供应商密钥可改用 `api_key_env` 从指定的环境变量读取,不再必须写进配置文件 → [配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#providers)
。
Kimi Code CLI
v0.43.0 2026 年 9 月 14 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-43-0-2026-%E5%B9%B4-9-%E6%9C%88-14-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### Web 版会话 AI 标题默认开启 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#web-%E7%89%88%E4%BC%9A%E8%AF%9D-ai-%E6%A0%87%E9%A2%98%E9%BB%98%E8%AE%A4%E5%BC%80%E5%90%AF)
首轮对话后自动生成会话标题,在重命名输入框中还可以一键重新生成,不再需要你手动起名。
#### 会话选择器中可删除会话 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E4%BC%9A%E8%AF%9D%E9%80%89%E6%8B%A9%E5%99%A8%E4%B8%AD%E5%8F%AF%E5%88%A0%E9%99%A4%E4%BC%9A%E8%AF%9D)
在会话选择器中选中目标会话按 `Ctrl-X`,再按 `y` 确认即可删除,清理历史会话更方便。
#### 目标模式时间预算更合理 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E7%9B%AE%E6%A0%87%E6%A8%A1%E5%BC%8F%E6%97%B6%E9%97%B4%E9%A2%84%E7%AE%97%E6%9B%B4%E5%90%88%E7%90%86)
时间预算不再计入会话关闭期间的时间,并取消 24 小时上限,长期目标不再被离线时间白白消耗。→ [目标模式](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E7%9B%AE%E6%A0%87%E6%A8%A1%E5%BC%8F)
此外:`kimi upgrade`(别名 `kimi update`)新增 `-y, --yes` 选项,跳过确认直接安装更新;新增 `KIMI_CODE_PERMISSION_MODE_REMINDER` 环境变量,设为 `0` 可关闭自动权限模式提醒的注入。v0.43.1 修复了在 subagent 运行时按 `Ctrl-C` 会直接退出整个 CLI 的问题,现在只会中断正在运行的 subagent。
模型发布
K2.8 Preview 2026 年 9 月 11 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#k2-8-preview-2026-%E5%B9%B4-9-%E6%9C%88-11-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------------------
🎉 **K2.8 Preview** 现已全量上线 Kimi Code!Model ID 不变,仍为 `kimi-for-coding`,客户端与第三方工具无需修改配置即可使用。→ [模型配置](https://www.kimi.com/code/docs/kimi-code/models.html)
#### 综合性能接近 K3,思考效率更高 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E7%BB%BC%E5%90%88%E6%80%A7%E8%83%BD%E6%8E%A5%E8%BF%91-k3-%E6%80%9D%E8%80%83%E6%95%88%E7%8E%87%E6%9B%B4%E9%AB%98)
编码与智能体能力全面提升,思考(thinking)效率较 K2.7 Code 显著改善。
#### 支持 thinking effort 档位调节 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%94%AF%E6%8C%81-thinking-effort-%E6%A1%A3%E4%BD%8D%E8%B0%83%E8%8A%82)
与 K3 的思考等级一致,支持 `low` / `high` / `max` 三档(默认 `max`)。关闭 thinking 后,K3 系列与 K2.8 Preview 的请求均路由到 K2.8 Preview(无思考)。
#### 支持 1M 超长上下文 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%94%AF%E6%8C%81-1m-%E8%B6%85%E9%95%BF%E4%B8%8A%E4%B8%8B%E6%96%87)
全部会员档位均开放最高 1M 上下文窗口。
Kimi Code CLI
v0.42.0 2026 年 9 月 9 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-42-0-2026-%E5%B9%B4-9-%E6%9C%88-9-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### Remote Control 转为正式功能 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#remote-control-%E8%BD%AC%E4%B8%BA%E6%AD%A3%E5%BC%8F%E5%8A%9F%E8%83%BD)
远程控制结束实验阶段正式开放,无需再设置实验开关,随时随地从手机或另一台电脑接管本地会话。→ [远程控制](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html)
#### Web 版输入框媒体预览栏 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#web-%E7%89%88%E8%BE%93%E5%85%A5%E6%A1%86%E5%AA%92%E4%BD%93%E9%A2%84%E8%A7%88%E6%A0%8F)
附件以可排序的预览栏展示,可在文本中按需引用图片和视频,排队与发送后预览仍然保留;并新增支持 HEIC、HEIF 和 BMP 图片。→ [粘贴图片与视频](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E7%B2%98%E8%B4%B4%E5%9B%BE%E7%89%87%E4%B8%8E%E8%A7%86%E9%A2%91)
#### 工具调用结果折叠为摘要 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%B7%A5%E5%85%B7%E8%B0%83%E7%94%A8%E7%BB%93%E6%9E%9C%E6%8A%98%E5%8F%A0%E4%B8%BA%E6%91%98%E8%A6%81)
已完成的工具调用折叠为标题加一行结果摘要,消息记录更清爽,按 `Ctrl-O` 可展开查看完整内容。→ [键盘快捷键](https://www.kimi.com/code/docs/kimi-code-cli/reference/keyboard.html#%E5%B7%A5%E5%85%B7%E8%BE%93%E5%87%BA)
此外:`/btw` 侧边聊天的 subagent 新增只读工具;子 Agent 模型池(`[secondary_model]`)始终开启,实验开关已移除。
Kimi Code CLI
v0.41.0 2026 年 9 月 4 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-41-0-2026-%E5%B9%B4-9-%E6%9C%88-4-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### Web 版 Tower 多 Agent 协作 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#web-%E7%89%88-tower-%E5%A4%9A-agent-%E5%8D%8F%E4%BD%9C)
Web 版新增 tower 多智能体协作模式(实验功能),可通过 `/tower` 命令或输入框加号菜单开启,`/tower ` 可指定基准分支。
#### Web 版划词标注 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#web-%E7%89%88%E5%88%92%E8%AF%8D%E6%A0%87%E6%B3%A8)
在消息、文件预览、diff 与每轮改动面板或终端中选中文字,即可添加评论或引用到对话。
#### 危险命令不再拦截 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%8D%B1%E9%99%A9%E5%91%BD%E4%BB%A4%E4%B8%8D%E5%86%8D%E6%8B%A6%E6%88%AA)
自动权限模式不再拦截危险命令和无法静态分析的命令。→ [三种权限模式](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E4%B8%89%E7%A7%8D%E6%9D%83%E9%99%90%E6%A8%A1%E5%BC%8F)
此外:新增会话评分提示(可在配置中关闭);后台提问的回答直接送达 Agent,不再经输出文件中转。
Kimi Code CLI
v0.40.0 2026 年 9 月 2 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-40-0-2026-%E5%B9%B4-9-%E6%9C%88-2-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### 权限模式更名,新增危险命令护栏 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%9D%83%E9%99%90%E6%A8%A1%E5%BC%8F%E6%9B%B4%E5%90%8D-%E6%96%B0%E5%A2%9E%E5%8D%B1%E9%99%A9%E5%91%BD%E4%BB%A4%E6%8A%A4%E6%A0%8F)
原 YOLO / Auto 模式更名为「必要时询问」(`/ask-when-needed`)和「完全自动」(`/never-ask`),Manual 即「始终询问」。同时新增内置危险命令护栏:`shutdown`、`reboot`、`rm -rf` 这类命令在完全自动模式下会被直接拒绝,其余模式执行前必须经你确认,可用 `[permission] dangerous_command_guard = false` 关闭。→ [交互与输入](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E4%B8%89%E7%A7%8D%E6%9D%83%E9%99%90%E6%A8%A1%E5%BC%8F)
#### 子 Agent 模型池转为正式功能 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%AD%90-agent-%E6%A8%A1%E5%9E%8B%E6%B1%A0%E8%BD%AC%E4%B8%BA%E6%AD%A3%E5%BC%8F%E5%8A%9F%E8%83%BD)
`[secondary_model]` 子代理设置结束实验状态,在所有启动模式下默认启用,仍可通过 `KIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL=0` 或 `[experimental] secondary-model = false` 退出。→ [配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#secondary-model)
#### Web 设置新增插件面板 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#web-%E8%AE%BE%E7%BD%AE%E6%96%B0%E5%A2%9E%E6%8F%92%E4%BB%B6%E9%9D%A2%E6%9D%BF)
Web 版设置新增「插件」面板,可直接浏览插件市场,并安装、启停、移除插件。→ [Plugins](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html)
此外:Tower 模式(实验性)不再由 Agent 自行进入,需用 `/tower on` 或 `/tower ` 显式开启;新增 `kimi session list` 命令,可在命令行直接列出会话。v0.40.1 修复了 kimi-cli 迁移完成或关闭后仍重复弹出迁移提示的问题。
Kimi Code CLI
v0.39.0 2026 年 8 月 27 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-39-0-2026-%E5%B9%B4-8-%E6%9C%88-27-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### 远程控制本地 Web 会话 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E8%BF%9C%E7%A8%8B%E6%8E%A7%E5%88%B6%E6%9C%AC%E5%9C%B0-web-%E4%BC%9A%E8%AF%9D)
开启 `KIMI_CODE_EXPERIMENTAL_REMOTE_CONTROL=1` 后,运行 `kimi rc`、`kimi web --remote-control` 或 `/remote-control`,即可从远程访问本地 Web 会话。→ [远程控制](https://www.kimi.com/code/docs/kimi-code-cli/guides/remote-control.html)
#### 实验性 Tower 多 Agent 编排 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%AE%9E%E9%AA%8C%E6%80%A7-tower-%E5%A4%9A-agent-%E7%BC%96%E6%8E%92)
开启 `KIMI_CODE_EXPERIMENTAL_TOWER=1` 后,用 `/tower on` 和 `/tower ` 启动 Tower 模式,让多个 Agent 协同推进目标。
#### 子 Agent 继承当前对话历史 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%AD%90-agent-%E7%BB%A7%E6%89%BF%E5%BD%93%E5%89%8D%E5%AF%B9%E8%AF%9D%E5%8E%86%E5%8F%B2)
开启 `KIMI_CODE_EXPERIMENTAL_SUBAGENT_FORK=1`,或在 `[experimental]` 中设置 `subagent_fork = true`,即可让 subagent 和 swarm 工具通过 `fork` 参数继承调用方当前对话历史的快照。→ [Agent 与子 Agent](https://www.kimi.com/code/docs/kimi-code-cli/customization/agents.html)
此外:AgentSwarm 现在可通过 `[swarm] timeout_ms` 或 `KIMI_CODE_SWARM_TIMEOUT_MS` 单独设置超时;Windows 文件工具和 Shell 现在能正确解析 Git Bash 路径。v0.39.1 修复了 web 端权限模式跨会话串改、空输入框首个输入字符被吞、工作区较多时启动卡在 Connecting 等问题,OpenIn 菜单新增文件模式(复制绝对路径、选择编辑器打开)。
Kimi Code CLI
v0.38.0 2026 年 8 月 20 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-38-0-2026-%E5%B9%B4-8-%E6%9C%88-20-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### 新增 WaitFor 工具 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%96%B0%E5%A2%9E-waitfor-%E5%B7%A5%E5%85%B7)
Agent 可以在当前轮次内等待后台任务完成,无需结束轮次后再被唤起——任务一结束就能接着处理结果。→ [后台任务](https://www.kimi.com/code/docs/kimi-code-cli/reference/tools.html#%E5%90%8E%E5%8F%B0%E4%BB%BB%E5%8A%A1)
#### Kimi Datasource 新增 13 个数据源 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-datasource-%E6%96%B0%E5%A2%9E-13-%E4%B8%AA%E6%95%B0%E6%8D%AE%E6%BA%90)
官方数据插件新增中国政府数据(NDA/NBS)与中国标准(GB/HB/DB/TT)、八个国际组织数据集(WHO、FAO、UNSD、ECB、Eurostat、UNICEF、OECD、FRED)、新华财经和财新,在 `/plugins` 的 Official 标签页更新插件即可使用。→ [Kimi Datasource](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html#kimi-datasource)
此外:Edit 和 Write 现在要求先读取已存在的文件再进行修改;过长的 `!` Shell 命令输出会自动折叠,按 ctrl+o 可与工具输出一起展开。
Kimi Code CLI
v0.37.0 2026 年 8 月 18 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-37-0-2026-%E5%B9%B4-8-%E6%9C%88-18-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### 单条提示词激活多个 Skill [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%8D%95%E6%9D%A1%E6%8F%90%E7%A4%BA%E8%AF%8D%E6%BF%80%E6%B4%BB%E5%A4%9A%E4%B8%AA-skill)
在输入框空白后输入 `/` 即可插入 skill 标记,一条提示词里可以同时激活多个 skill。Agent 忙碌时输入的 skill 斜杠命令也会排队执行,不再被直接拒绝。→ [调用 Skill](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html#%E8%B0%83%E7%94%A8-skill)
#### Web 会话管理升级 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#web-%E4%BC%9A%E8%AF%9D%E7%AE%A1%E7%90%86%E5%8D%87%E7%BA%A7)
侧边栏新增 Open / Done / Workspaces 标签页,会话可标记为 Done,并新增独立的会话管理页面;搜索对话框现在也能直接搜索工作区并滚动定位。→ [在网页中使用](https://www.kimi.com/code/docs/kimi-code-cli/guides/web.html)
#### Windows 原生 CLI 自动更新 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#windows-%E5%8E%9F%E7%94%9F-cli-%E8%87%AA%E5%8A%A8%E6%9B%B4%E6%96%B0)
Windows 单文件版 CLI 现在支持自动更新,无需手动下载替换。
此外:聊天消息中 @提及的文件、文件夹和 skill 渲染为图标胶囊,浏览器标签页标题显示当前工作区目录名;web 端 Subagent 面板更名为 Background Agent;0.37.1 修复了粘贴的图片和视频无法发送给模型的问题。
Kimi Code CLI
v0.36.0 2026 年 8 月 13 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-36-0-2026-%E5%B9%B4-8-%E6%9C%88-13-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### 子 Agent 模型池 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%AD%90-agent-%E6%A8%A1%E5%9E%8B%E6%B1%A0)
实验性的子 Agent 模型配置升级为模型池:在 `[secondary_model]` 中配置一组带描述的候选模型,主 Agent 每次派生子 Agent 时按任务从中挑选;也可以用 `/secondary-model` 或 `default_model` 固定默认模型。设置 `KIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL=1` 启用。→ [subagent 模型池](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#subagent-%E6%A8%A1%E5%9E%8B%E6%B1%A0)
#### 实验性全屏 TUI 模式 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%AE%9E%E9%AA%8C%E6%80%A7%E5%85%A8%E5%B1%8F-tui-%E6%A8%A1%E5%BC%8F)
设置 `KIMI_CODE_TUI_FULL_SCREEN=1` 即可启用全屏 alternate-screen 界面:可滚动的 transcript 视口、鼠标选择文本、可点击链接、Ctrl-Shift-F 搜索。→ [环境变量](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html)
#### LaTeX 公式渲染 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#latex-%E5%85%AC%E5%BC%8F%E6%B8%B2%E6%9F%93)
TUI 现在会把消息中的 LaTeX 数学公式(`$…$` 与 `$$…$$`)渲染为 Unicode 公式。
此外:工作区信任提示现在展示项目 MCP 的启动目标并默认拒绝信任,未信任工作区也无法再植入同名 `fd`/`stty` 可执行文件;修复 API 请求失败自动重试期间按 Ctrl+C 无反应的问题。
Kimi Code CLI
v0.35.0 2026 年 8 月 12 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-35-0-2026-%E5%B9%B4-8-%E6%9C%88-12-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### 内置插件市场新增 Modern Web Guidance [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%86%85%E7%BD%AE%E6%8F%92%E4%BB%B6%E5%B8%82%E5%9C%BA%E6%96%B0%E5%A2%9E-modern-web-guidance)
运行 `/plugins` 选择 Modern Web Guidance 即可安装,获取现代 Web 开发指导。→ [插件](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html)
#### `/tasks` 面板实时展示后台子 Agent 进度 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#tasks-%E9%9D%A2%E6%9D%BF%E5%AE%9E%E6%97%B6%E5%B1%95%E7%A4%BA%E5%90%8E%E5%8F%B0%E5%AD%90-agent-%E8%BF%9B%E5%BA%A6)
后台子 Agent 的工作进展现在会实时显示在 `/tasks` 面板中,无需等待完成即可掌握进度。→ [斜杠命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html)
此外:修复压缩后 token 计数远低于实际上下文大小的问题,现在与会话运行期间显示的数字一致;修复 coder 子 Agent 默认继续派发子 Agent 的问题。
Kimi Code CLI
v0.34.0 2026 年 8 月 6 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-34-0-2026-%E5%B9%B4-8-%E6%9C%88-6-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### Kimi Computer Use 支持 Windows [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-computer-use-%E6%94%AF%E6%8C%81-windows)
Kimi Computer Use 新增 Windows x64 支持(Windows 10 1903+ / Windows 11),在 `/plugins` 的 Official 标签页回车即可安装。→ [Kimi Computer Use](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html#kimi-computer-use)
#### 缓存过期提醒 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E7%BC%93%E5%AD%98%E8%BF%87%E6%9C%9F%E6%8F%90%E9%86%92)
恢复长时间未活动的会话、或长时间空闲后发送消息时,会提醒上下文缓存可能已过期,可选择先压缩或新建会话;将 [`cache_expiry_hint`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#tui-toml)
设为 `false` 可关闭。
#### `kimi web` 稳定性与体验增强 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-web-%E7%A8%B3%E5%AE%9A%E6%80%A7%E4%B8%8E%E4%BD%93%E9%AA%8C%E5%A2%9E%E5%BC%BA)
模型请求失败时会话内保留失败卡片,可一键恢复;侧边栏会话列表新增平铺视图;子 Agent 任务显示所用模型与思考等级;自动重试期间工作状态显示重试进度(第 N/M 次)。
此外:安装 Kimi WebBridge 后会显示浏览器扩展链接与激活步骤;支持读取 UTF-16 编码的文本文件;`/feedback` 对所有已登录用户开放;修复 `kimi -p` 未等待后台任务与子 Agent 完成就退出的问题;修复移除 MCP server 会破坏进行中会话的问题(其工具保留可见,调用返回移除提示)。
Kimi Code CLI
v0.33.0 2026 年 8 月 5 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-33-0-2026-%E5%B9%B4-8-%E6%9C%88-5-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### 官方内置插件:Kimi Computer Use 与 Kimi WebBridge [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%AE%98%E6%96%B9%E5%86%85%E7%BD%AE%E6%8F%92%E4%BB%B6-kimi-computer-use-%E4%B8%8E-kimi-webbridge)
`/plugins` 市场的 Official 标签页新增两个官方内置能力,回车即可一键部署托管运行时,安装中断后可重试,升级时自动备份旧版 WebBridge 技能。→ [安装与管理](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html#%E5%AE%89%E8%A3%85%E4%B8%8E%E7%AE%A1%E7%90%86)
#### 默认启用 agent-core-v2 引擎 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E9%BB%98%E8%AE%A4%E5%90%AF%E7%94%A8-agent-core-v2-%E5%BC%95%E6%93%8E)
交互式 TUI、`kimi -p`、`kimi acp` 等 CLI 界面默认运行在 agent-core-v2 引擎上;如遇问题,设置 `KIMI_CODE_LEGACY_FLAG=1` 可回退旧引擎。→ [环境变量](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html)
#### `kimi web` 界面增强 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-web-%E7%95%8C%E9%9D%A2%E5%A2%9E%E5%BC%BA)
web 端支持在设置中添加和管理自定义供应商,侧边栏可将会话置顶,会话标题支持设置 emoji,并显示登录账号信息与套餐用量。
此外:新增 `/bug` 命令作为 `/feedback` 的别名;启动时询问是否信任当前文件夹;修复 MCP OAuth 重新授权总是因 `Invalid redirect URI` 失败的问题。
Kimi Code CLI
v0.32.0 2026 年 8 月 4 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-32-0-2026-%E5%B9%B4-8-%E6%9C%88-4-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### 四个新的 hook 事件 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%9B%9B%E4%B8%AA%E6%96%B0%E7%9A%84-hook-%E4%BA%8B%E4%BB%B6)
新增 `TurnStarted`、`UserPromptQueued`、`TaskStarted` 和 `SessionHeartbeat` 四个 hook 事件,在 `config.toml` 的 `[[hooks]]` 下配置,即可监听回合开始、用户输入排队、子任务启动与会话心跳。→ [事件一览](https://www.kimi.com/code/docs/kimi-code-cli/customization/hooks.html#%E4%BA%8B%E4%BB%B6%E4%B8%80%E8%A7%88)
#### `loop_control` 配置键改名 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#loop-control-%E9%85%8D%E7%BD%AE%E9%94%AE%E6%94%B9%E5%90%8D)
`max_retries_per_step` 改为 `max_attempts_per_step`,`max_steps_per_run` 改为 `max_steps_per_turn`;旧键不再生效,启动时会有改名警告,请及时更新配置。→ [loop\_control](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#loop-control)
#### 本地估算 token 用量 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%9C%AC%E5%9C%B0%E4%BC%B0%E7%AE%97-token-%E7%94%A8%E9%87%8F)
新增 `[token_counting]` 配置节:供应商不上报 token 用量时,可将上下文大小显示切换为本地估算。→ [token\_counting](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#token-counting)
此外:models.dev 目录不可达时回退到内置快照,离线或网络受限时也能导入已知第三方供应商;修复上下文自动压缩因请求过大反复重试直至失败的问题。
Kimi Code CLI
v0.31.0 2026 年 7 月 30 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-31-0-2026-%E5%B9%B4-7-%E6%9C%88-30-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### 插件可贡献自定义 Agent [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%8F%92%E4%BB%B6%E5%8F%AF%E8%B4%A1%E7%8C%AE%E8%87%AA%E5%AE%9A%E4%B9%89-agent)
Plugin 现在可以携带自己的 Agent:在 manifest 的 `agents` 字段声明目录,或直接在插件根下放置 `agents/` 目录,其中的 Agent 文件会在插件启用期间被主 Agent 自动发现并用于子 Agent 委派。→ [插件 Agent](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html#%E6%8F%92%E4%BB%B6-agent)
#### 插件可向系统提示词注入指令 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%8F%92%E4%BB%B6%E5%8F%AF%E5%90%91%E7%B3%BB%E7%BB%9F%E6%8F%90%E7%A4%BA%E8%AF%8D%E6%B3%A8%E5%85%A5%E6%8C%87%E4%BB%A4)
`kimi.plugin.json` 新增 `systemPrompt` 与 `systemPromptPath` 字段,插件启用期间可向 Agent 的系统提示词提供指令,TUI、`kimi -p` 与 `kimi web` 均生效。→ [系统提示词指令](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html#%E7%B3%BB%E7%BB%9F%E6%8F%90%E7%A4%BA%E8%AF%8D%E6%8C%87%E4%BB%A4)
#### TUI 支持 Markdown 定义的自定义 Agent [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#tui-%E6%94%AF%E6%8C%81-markdown-%E5%AE%9A%E4%B9%89%E7%9A%84%E8%87%AA%E5%AE%9A%E4%B9%89-agent)
此前仅限 `kimi web` 的 Markdown Agent 文件,现在在 TUI 中同样可用:Frontmatter 声明名称、描述与工具权限,正文即系统提示词。→ [自定义 Agent](https://www.kimi.com/code/docs/kimi-code-cli/customization/agents.html#%E8%87%AA%E5%AE%9A%E4%B9%89-agent)
此外:新增 `/secondary_model` 斜杠命令,可配置子 Agent 使用的辅助模型(实验性功能,需先在 `/experiments` 中开启);TaskOutput 工具改为始终非阻塞并立即返回快照,后台任务完成仍会通过自动通知送达。
Kimi Code CLI
v0.30.0 2026 年 7 月 29 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-30-0-2026-%E5%B9%B4-7-%E6%9C%88-29-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### 自定义底部状态栏 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%BA%95%E9%83%A8%E7%8A%B6%E6%80%81%E6%A0%8F)
`tui.toml` 新增 `[status_line]` 配置:用 `items` 排列内置槽位(模式、目标、模型、任务、Git 等),或用 `command` 接入自定义状态栏命令,底部信息栏随心定制。→ [配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#tui-toml)
#### 额度耗尽立即报错 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E9%A2%9D%E5%BA%A6%E8%80%97%E5%B0%BD%E7%AB%8B%E5%8D%B3%E6%8A%A5%E9%94%99)
账户额度或余额耗尽时,不再静默重试约 3 分钟,现在会立即报错,不再空等。
此外:安装计入套餐额度的官方插件(如 Kimi Datasource)后会显示额度说明,会话中使用的插件有可用更新时会提示运行 `/plugins` 升级;工具调用反复无效时不再无限重试,会终止当前回合。
Kimi Code CLI
v0.29.1 2026 年 7 月 24 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-29-1-2026-%E5%B9%B4-7-%E6%9C%88-24-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### 网页搜索与网页抓取无需 OAuth [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E7%BD%91%E9%A1%B5%E6%90%9C%E7%B4%A2%E4%B8%8E%E7%BD%91%E9%A1%B5%E6%8A%93%E5%8F%96%E6%97%A0%E9%9C%80-oauth)
v0.29.1 新增 `KIMI_WEB_SEARCH_*` 与 `KIMI_WEB_FETCH_*` 环境变量,可直接配置网页搜索和网页抓取服务,无需 OAuth 登录。→ [环境变量](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E8%BF%90%E8%A1%8C%E6%97%B6%E5%BC%80%E5%85%B3)
#### 全局默认 MCP 服务器超时 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%85%A8%E5%B1%80%E9%BB%98%E8%AE%A4-mcp-%E6%9C%8D%E5%8A%A1%E5%99%A8%E8%B6%85%E6%97%B6)
`config.toml` 与环境变量现支持配置全局默认 MCP 服务器超时时间,无需逐个 server 设置。→ [配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#mcp)
此外:新增实验性子 Agent 辅助模型绑定;修复部分 OpenAI 兼容端点因 reasoning 字段名不一致导致思考内容丢失的问题。
Kimi Code CLI
v0.29.0 2026 年 7 月 22 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-29-0-2026-%E5%B9%B4-7-%E6%9C%88-22-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### Web:Markdown 文件定义 Agent [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#web-markdown-%E6%96%87%E4%BB%B6%E5%AE%9A%E4%B9%89-agent)
现在可以用 Markdown 文件定义自己的 Agent:顶部 Frontmatter 声明名称、描述和工具权限,正文就是系统提示词。自定义 Agent 会被主 Agent 自动发现,与内置子 Agent 并列委派。→ [Agent 与子 Agent](https://www.kimi.com/code/docs/kimi-code-cli/customization/agents.html#%E8%87%AA%E5%AE%9A%E4%B9%89-agent)
#### Web:SYSTEM.md 永久覆盖主 Agent 系统提示词 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#web-system-md-%E6%B0%B8%E4%B9%85%E8%A6%86%E7%9B%96%E4%B8%BB-agent-%E7%B3%BB%E7%BB%9F%E6%8F%90%E7%A4%BA%E8%AF%8D)
把 `$KIMI_CODE_HOME/SYSTEM.md` 写成纯 Markdown 即可永久覆盖默认主 Agent 的系统提示词,无需每次启动都传 `--agent` 或 `--agent-file`;显式传入的 Agent 文件仍会优先。→ [Agent 与 subagent](https://www.kimi.com/code/docs/kimi-code-cli/customization/agents.html#%E7%94%A8-system-md-%E8%A6%86%E7%9B%96-main-agent-%E7%9A%84%E7%B3%BB%E7%BB%9F%E6%8F%90%E7%A4%BA%E8%AF%8D)
#### 配置文件统一开关工具 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E7%BB%9F%E4%B8%80%E5%BC%80%E5%85%B3%E5%B7%A5%E5%85%B7)
`config.toml` 新增 `[tools]` 配置,可在所有会话中统一启用或禁用指定工具,避免每次手动调整。→ [配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#tools)
此外:附加到提示词的视频现在会随提示词一起送达模型;ACP 客户端也支持选择思考强度;v0.29.1 新增网页搜索与网页抓取服务的环境变量配置(无需 OAuth 登录),并支持在 `config.toml` 中配置全局默认 MCP 服务器超时时间。
Kimi Code CLI
v0.28.0 2026 年 7 月 20 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-28-0-2026-%E5%B9%B4-7-%E6%9C%88-20-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### `kimi web` 改为前台运行,`kimi server` 整体废弃 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-web-%E6%94%B9%E4%B8%BA%E5%89%8D%E5%8F%B0%E8%BF%90%E8%A1%8C-kimi-server-%E6%95%B4%E4%BD%93%E5%BA%9F%E5%BC%83)
`kimi web` 现在在当前终端前台运行并自动打开浏览器,按 `Ctrl+C` 即可停止;旧的 `kimi server` 命令树已整体废弃,相关子命令均已移除,仅保留 `kimi server kill` 作为停止 0.28.0 之前后台服务的回退。→ [kimi web](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-web)
#### 思考强度持久化更保守 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%80%9D%E8%80%83%E5%BC%BA%E5%BA%A6%E6%8C%81%E4%B9%85%E5%8C%96%E6%9B%B4%E4%BF%9D%E5%AE%88)
模型切换后,思考强度设置现在仅保留低于该模型最高档(`max`)的档位,避免因旧 `max` 值不被支持而出现空白或无响应的选择器。→ [模型配置](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#models)
此外:Web 模型切换器现在会提示切换模型或思考强度将使已有提示词缓存失效;修正了 YOLO 与 Auto 权限模式的描述,明确 YOLO 自动批准工具但仍可能提问,而 Auto 完全自主、不会提问。
Kimi Code CLI
v0.27.0 2026 年 7 月 17 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-27-0-2026-%E5%B9%B4-7-%E6%9C%88-17-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### `/copy` 复制上一条回复 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#copy-%E5%A4%8D%E5%88%B6%E4%B8%8A%E4%B8%80%E6%9D%A1%E5%9B%9E%E5%A4%8D)
新增 `/copy` 斜杠命令,一键把上一条 AI 回复复制到剪贴板,长答案不必再手动选中。→ [斜杠命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html)
#### API Key 用户自动拉取最新模型列表 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#api-key-%E7%94%A8%E6%88%B7%E8%87%AA%E5%8A%A8%E6%8B%89%E5%8F%96%E6%9C%80%E6%96%B0%E6%A8%A1%E5%9E%8B%E5%88%97%E8%A1%A8)
使用 API key 调用 Kimi 编程模型时,Kimi Code 现在会自动拉取最新模型列表,新模型上线后无需手动改配置即可使用。→ [模型配置](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#models)
此外:OAuth 连接失败时显示底层网络原因(DNS、连接被拒、TLS、超时),不再是笼统的 `fetch failed`;修复内置 URL 抓取工具的网络防护缺陷,恶意构造的域名与重定向链无法再访问回环地址或内网服务。
模型发布
Kimi K3 2026 年 7 月 16 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-k3-2026-%E5%B9%B4-7-%E6%9C%88-16-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
我们迄今能力最强的模型 **Kimi K3** 正式发布并开源,现已接入 Kimi Code。
#### 模型规模与架构 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%A8%A1%E5%9E%8B%E8%A7%84%E6%A8%A1%E4%B8%8E%E6%9E%B6%E6%9E%84)
2.8 万亿参数,基于 KDA 混合线性注意力机制与 Attention Residuals 构建,是全球首个开源的 3 万亿级别模型。
#### 长上下文与多模态 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E9%95%BF%E4%B8%8A%E4%B8%8B%E6%96%87%E4%B8%8E%E5%A4%9A%E6%A8%A1%E6%80%81)
原生支持视觉理解,最高 100 万 token 上下文窗口,可处理大规模代码库与长程连贯推理。
#### 编程与 Agent 优势 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E7%BC%96%E7%A8%8B%E4%B8%8E-agent-%E4%BC%98%E5%8A%BF)
尤其擅长长程编程、游戏 / 3D 与知识类任务;在极少人工监督下即可持续完成长时间工程任务,在 Kernel 优化、GPU 编译器、芯片设计、科研编程等复杂场景中表现出色。
#### 对比表现 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%AF%B9%E6%AF%94%E8%A1%A8%E7%8E%B0)
整体能力稳居第一梯队,已稳定超过 Opus 4.8、GPT 5.5 等主流模型;在 Kernel 优化等高难度编程任务中,表现接近当前最强闭源模型。
#### 会员权限 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E4%BC%9A%E5%91%98%E6%9D%83%E9%99%90)
Moderato 及以上会员可调用 Kimi K3,Allegretto 及以上会员可解锁 100 万上下文。K3 支持 `low` / `high` / `max` 三档思考强度,可按任务复杂度自由切换。→ [模型配置](https://www.kimi.com/code/docs/kimi-code/models.html)
#### 使用建议 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E4%BD%BF%E7%94%A8%E5%BB%BA%E8%AE%AE)
切换模型会使已建立的上下文缓存失效,刚切换时消耗会偏高;建议开启新会话再使用 Kimi K3,效果更好、消耗更少。
Kimi Code CLI
v0.26.0 2026 年 7 月 16 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-26-0-2026-%E5%B9%B4-7-%E6%9C%88-16-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### coder 子 Agent 能力对齐主 Agent [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#coder-%E5%AD%90-agent-%E8%83%BD%E5%8A%9B%E5%AF%B9%E9%BD%90%E4%B8%BB-agent)
coder 子 Agent 现在支持后台任务、待办列表、Plan 模式、Skill 调用与嵌套 Agent,可独立完成更复杂的编码工作流。→ [Agent 与子 Agent](https://www.kimi.com/code/docs/kimi-code-cli/customization/agents.html)
#### `/model` 与 `/effort` 切换缓存提示 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#model-%E4%B8%8E-effort-%E5%88%87%E6%8D%A2%E7%BC%93%E5%AD%98%E6%8F%90%E7%A4%BA)
切换模型或思考程度时会提示已有提示词缓存失效,并建议通过 `/new` 新开会话避免额外 token 开销。→ [斜杠命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html)
此外:修复了上下文大小指示器低估模型实际上下文用量的问题;恢复的会话没有新活动时不再被错误标记为刚更新。
Kimi Code CLI
v0.25.0 2026 年 7 月 16 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-25-0-2026-%E5%B9%B4-7-%E6%9C%88-16-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### Web 聊天支持任意附件 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#web-%E8%81%8A%E5%A4%A9%E6%94%AF%E6%8C%81%E4%BB%BB%E6%84%8F%E9%99%84%E4%BB%B6)
内置 Web UI 的聊天现在支持附加任意类型文件:直接将文件拖放到窗口任意位置即可发送,文件、图片、视频都会以附件标签显示在消息气泡中。→ [在 IDE 中使用](https://www.kimi.com/code/docs/kimi-code-cli/guides/ides.html)
#### 对齐 Anthropic 官方 effort 配置 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%AF%B9%E9%BD%90-anthropic-%E5%AE%98%E6%96%B9-effort-%E9%85%8D%E7%BD%AE)
Anthropic 兼容供应商现在应用官方 effort 配置,未知模型回退到 128k 输出上限,自定义命名模型新会话的思考强度控制也更准确。→ [平台与模型](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html)
此外:模型请求失败时会展示完整诊断信息;修复了 Web 服务器 bearer token 校验可被百分号编码路径绕过、以及会话文件系统 API 可跟随工作区外符号链接导致越权访问的两个安全问题。
Kimi Code CLI
v0.24.2 2026 年 7 月 15 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-24-2-2026-%E5%B9%B4-7-%E6%9C%88-15-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### 内置文档问答 Skill [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%86%85%E7%BD%AE%E6%96%87%E6%A1%A3%E9%97%AE%E7%AD%94-skill)
新增内置 `/check-kimi-code-docs`:直接依据官方文档回答 Kimi Code 的产品问题(CLI 用法、配置、会员、错误码),并在答案中附上来源链接,不确定的用法不必再离开终端翻文档。→ [内置 Skill 命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html#%E5%86%85%E7%BD%AE-skill-%E5%91%BD%E4%BB%A4)
此外:每步 LLM 调用的重试上限从 3 次提高到 10 次,供应商侧 429 / 过载等临时失败会在整轮失败前自动重试;print 模式(`kimi -p`)也不再跑完一轮就退出,只要还有未完成的后台任务就保持运行、把结果回馈给主 Agent 继续处理(`print_background_mode` 默认 `steer`,后台任务与子 Agent 默认不再超时)。
Kimi Code CLI
v0.24.0 2026 年 7 月 14 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-24-0-2026-%E5%B9%B4-7-%E6%9C%88-14-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### 会话导出 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E4%BC%9A%E8%AF%9D%E5%AF%BC%E5%87%BA)
Web 界面新增会话导出:运行 `/export` 或在会话的更多菜单中选择「导出会话」,即可将会话内容与故障排查日志打包为 ZIP 下载(上限 64 MiB),便于存档或反馈问题。→ [导出会话](https://www.kimi.com/code/docs/kimi-code-cli/guides/sessions.html#%E5%AF%BC%E5%87%BA%E4%BC%9A%E8%AF%9D)
#### 前台命令超时后转入后台 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%89%8D%E5%8F%B0%E5%91%BD%E4%BB%A4%E8%B6%85%E6%97%B6%E5%90%8E%E8%BD%AC%E5%85%A5%E5%90%8E%E5%8F%B0)
前台 `Bash` 命令触及超时后不再被直接终止,而是自动转入后台继续运行,完成时回报结果,长耗时命令不会再半途丢失。如需恢复超时即终止的行为,将 `[background]` 的 `bash_auto_background_on_timeout` 设为 `false`。→ [内置工具 · Shell](https://www.kimi.com/code/docs/kimi-code-cli/reference/tools.html#shell)
此外:会话 fork 现在完整保留媒体附件、plan 文件、后台任务输出与 cron 任务,fork 失败也不再留下残缺副本;`kimi web` 默认切换到重构后的 Agent 引擎。
Kimi Code
高速版 & 加油包上线 2026 年 7 月 9 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E9%AB%98%E9%80%9F%E7%89%88-%E5%8A%A0%E6%B2%B9%E5%8C%85%E4%B8%8A%E7%BA%BF-2026-%E5%B9%B4-7-%E6%9C%88-9-%E6%97%A5)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#### ⚡ 高速版正式上线 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E2%9A%A1-%E9%AB%98%E9%80%9F%E7%89%88%E6%AD%A3%E5%BC%8F%E4%B8%8A%E7%BA%BF)
Kimi Code 现提供**普通版**与**高速版**两档:同一模型、编码能力一致,高速版**输出速度约为普通版的 5–6 倍**。CLI 内输入 `/model` 一键切换,第三方工具将 model ID 配置为 `kimi-for-coding-highspeed` 即可。高速版需订阅 [Allegretto](https://www.kimi.com/membership/pricing?from=kfc_membership_topbar&track_id=a7764d49-73ad-4d08-b2f3-a8d7433917f8)
及以上档位会员。→ [如何切换模型](https://www.kimi.com/code/docs/kimi-code/models.html#switch-model)
#### 加油包(Extra Usage)上线 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%8A%A0%E6%B2%B9%E5%8C%85-extra-usage-%E4%B8%8A%E7%BA%BF)
订阅额度用尽后,可用加油包余额继续发起请求,**无视会员的月 / 周 / 小时额度限制**——任意额度触顶时都能用,使用时只扣加油包余额,不影响会员额度刷新。仅订阅会员可开启,入口在 Kimi 主页 → 设置 → 会员计划 → 我的额度。→ [了解加油包](https://www.kimi.com/code/docs/kimi-code/membership.html#extra-usage)
Kimi Code CLI
v0.23.0 2026 年 7 月 6 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-23-0-2026-%E5%B9%B4-7-%E6%9C%88-6-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### 已归档会话 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%B7%B2%E5%BD%92%E6%A1%A3%E4%BC%9A%E8%AF%9D)
Web 界面新增「已归档会话」页面,可浏览并一键恢复已归档的会话,前往「设置 → 已归档」即可查看。
#### 思考内容跨轮次保留 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%80%9D%E8%80%83%E5%86%85%E5%AE%B9%E8%B7%A8%E8%BD%AE%E6%AC%A1%E4%BF%9D%E7%95%99)
Kimi 模型开启 Thinking 时,现在默认在多轮之间保留推理内容,让模型延续此前的思路;如需关闭,可设置 `[thinking] keep = "off"`。→ [模型配置](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#thinking)
#### 压缩摘要一键查看 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%8E%8B%E7%BC%A9%E6%91%98%E8%A6%81%E4%B8%80%E9%94%AE%E6%9F%A5%E7%9C%8B)
上下文压缩完成后,TUI 会显示本次压缩摘要;按 `Ctrl-O` 即可在压缩块中显示或隐藏摘要,与折叠工具输出共用同一快捷键。→ [交互与输入](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA%E6%9C%9F%E9%97%B4)
此外:新增实验性的按需工具加载(`select_tools`),开启 `tool-select` 标志后,支持的模型会按需加载 MCP 工具而非每次发送全部,以保留供应商的 prompt cache;并修复了会话已存在于磁盘却在列表中缺失、或直接访问返回 404 的问题,服务器现在会在启动时重建会话索引。
Kimi Code CLI
v0.22.0 2026 年 7 月 2 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-22-0-2026-%E5%B9%B4-7-%E6%9C%88-2-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### 自动压缩超大图片 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E8%87%AA%E5%8A%A8%E5%8E%8B%E7%BC%A9%E8%B6%85%E5%A4%A7%E5%9B%BE%E7%89%87)
上传的图片若超过模型限制,Kimi Code 会在送达模型前自动降采样并重新编码,降低视觉 token 成本,同时避免供应商因图片过大而报错。
#### 模型配置覆盖 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%A8%A1%E5%9E%8B%E9%85%8D%E7%BD%AE%E8%A6%86%E7%9B%96)
新增 `[models."".overrides]` 配置项,可覆盖供应商刷新后的模型元数据(如思考强度档位、默认 effort 等),让自定义模型配置在刷新后仍然生效。→ [模型配置](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#%E6%A8%A1%E5%9E%8B%E8%A6%86%E7%9B%96%E9%A1%B9)
#### Web UI 全新设计系统 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#web-ui-%E5%85%A8%E6%96%B0%E8%AE%BE%E8%AE%A1%E7%B3%BB%E7%BB%9F)
内置 web 界面采用新的设计系统,包括更新的配色、字体排版、间距、明暗调色板,以及更细腻的进入/退出与展开/折叠动画,整体视觉和交互更统一。
此外:新增 Cmd/Ctrl+K 会话搜索面板,可按标题、工作区和最近提示词快速定位会话;连续工具调用现在会归组为可折叠堆栈,diff 行数与图片/视频/音频结果都能更紧凑地展示。
Kimi Code CLI
v0.21.0 2026 年 7 月 1 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-21-0-2026-%E5%B9%B4-7-%E6%9C%88-1-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### 插件可提供斜杠命令 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%8F%92%E4%BB%B6%E5%8F%AF%E6%8F%90%E4%BE%9B%E6%96%9C%E6%9D%A0%E5%91%BD%E4%BB%A4)
插件现可在 manifest 的 `commands` 字段中声明斜杠命令,注册为 `:` 形式,调用时展开 `$ARGUMENTS`,无需额外配置就能把常用工作流做成命令。→ [插件斜杠命令](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html#%E6%8F%92%E4%BB%B6%E6%96%9C%E6%9D%A0%E5%91%BD%E4%BB%A4)
#### Web 聊天支持 Mermaid 图表 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#web-%E8%81%8A%E5%A4%A9%E6%94%AF%E6%8C%81-mermaid-%E5%9B%BE%E8%A1%A8)
助手回复中的 `mermaid` 代码块会在内置 web UI 中渲染为图表;KaTeX 数学公式与 Mermaid 的解析改到 Web Worker 执行,流式输出时界面更跟手。
Kimi Code CLI
v0.20.2 2026 年 6 月 29 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-20-2-2026-%E5%B9%B4-6-%E6%9C%88-29-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### 视频输入与 Anthropic 兼容协议 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E8%A7%86%E9%A2%91%E8%BE%93%E5%85%A5%E4%B8%8E-anthropic-%E5%85%BC%E5%AE%B9%E5%8D%8F%E8%AE%AE)
Kimi Code 现已支持 Anthropic 兼容协议;配合 `ReadMediaFile` 工具,可将视频作为多模态内容发送给具备视觉能力的模型,能力随模型的 `image_in` / `video_in` 而定。→ [内置工具](https://www.kimi.com/code/docs/kimi-code-cli/reference/tools.html#%E6%96%87%E4%BB%B6%E7%B1%BB)
#### Web 完成提示音与通知 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#web-%E5%AE%8C%E6%88%90%E6%8F%90%E7%A4%BA%E9%9F%B3%E4%B8%8E%E9%80%9A%E7%9F%A5)
内置 web UI 新增完成提示音、完成通知与问题通知,并在设置中分别提供开关。问题通知默认关闭,仅在你主动开启后,才会把问题文本推送到桌面。
#### 自定义出站请求头 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E5%87%BA%E7%AB%99%E8%AF%B7%E6%B1%82%E5%A4%B4)
新增 `KIMI_CODE_CUSTOM_HEADERS` 环境变量,可为出站 LLM 请求自定义请求头(按行写 `Name: Value`),并会向非 Kimi 供应商发送 `User-Agent` 请求头。
此外:遇到供应商 413 上下文溢出时,现在会先压缩再重试以恢复,并默认将压缩输出限制在 128k token,避免触发供应商的 `max_tokens` 错误。
Kimi Code CLI
v0.20.0 2026 年 6 月 26 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-20-0-2026-%E5%B9%B4-6-%E6%9C%88-26-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### Shell 模式 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#shell-%E6%A8%A1%E5%BC%8F)
在输入框中键入 `!` 即可进入 Shell 模式,不离开对话就能运行终端命令,输出会写入上下文供后续轮次使用;对于长时间运行的命令,按 `Ctrl+B` 可将其移至后台。例如运行 `!gh auth login` 登录 GitHub CLI,无需新开终端。→ [Shell 模式](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#shell-%E6%A8%A1%E5%BC%8F)
#### 将 Web 服务暴露到互联网 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%B0%86-web-%E6%9C%8D%E5%8A%A1%E6%9A%B4%E9%9C%B2%E5%88%B0%E4%BA%92%E8%81%94%E7%BD%91)
`kimi web` 新增 `--host` 选项,可将 web 服务器暴露到本机以外,并配套加固了 token 鉴权、限流等安全措施,便于在远程机器上访问会话界面。→ [kimi web](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-web)
#### 全新的插件管理面板 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%85%A8%E6%96%B0%E7%9A%84%E6%8F%92%E4%BB%B6%E7%AE%A1%E7%90%86%E9%9D%A2%E6%9D%BF)
`/plugins` 重新设计为单个标签页面板:**Installed** 管理已安装插件、**Official** 浏览 Kimi 官方 marketplace、**Third-party** 浏览第三方 marketplace、**Custom** 从 GitHub URL、zip 或本地路径安装,用 `Tab` / `Shift-Tab` 切换;安装第三方插件前会先弹出确认提示。→ [Plugins](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html#%E5%AE%89%E8%A3%85%E4%B8%8E%E7%AE%A1%E7%90%86)
此外:修复了 Linux 上由原生剪贴板错误导致的启动崩溃;`/reload` 现在会刷新插件 Skill,使插件变更在当前会话即时生效,无需新开会话。
Kimi Code CLI
v0.19.0 2026 年 6 月 22 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-19-0-2026-%E5%B9%B4-6-%E6%9C%88-22-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### 额外工作区目录 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E9%A2%9D%E5%A4%96%E5%B7%A5%E4%BD%9C%E5%8C%BA%E7%9B%AE%E5%BD%95)
现在可以为会话添加工作目录之外的额外目录:用 `/add-dir ` 添加到当前会话,或在启动时用 `kimi --add-dir ` 添加。选择"记住此目录"时,路径会写入项目级的 `.kimi-code/local.toml`,在该项目的每个会话中自动生效。→ [项目级本地配置](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#%E9%A1%B9%E7%9B%AE%E7%BA%A7%E6%9C%AC%E5%9C%B0%E9%85%8D%E7%BD%AE)
#### 后台任务 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%90%8E%E5%8F%B0%E4%BB%BB%E5%8A%A1)
用 `Ctrl+B` 可将长时间运行的前台命令和子 Agent 转入后台,腾出会话继续操作,并通过 `/tasks` 面板查看它们的状态。→ [会话管理](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html#%E4%BC%9A%E8%AF%9D%E7%AE%A1%E7%90%86)
此外:现在会显示供应商安全策略拦截,而非静默当作已完成轮次;并优化了文件提及体验。
Kimi Code CLI
v0.18.0 2026 年 6 月 18 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-18-0-2026-%E5%B9%B4-6-%E6%9C%88-18-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### Web 会话筛选与懒加载 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#web-%E4%BC%9A%E8%AF%9D%E7%AD%9B%E9%80%89%E4%B8%8E%E6%87%92%E5%8A%A0%E8%BD%BD)
Web 侧边栏新增会话筛选,可按标题和最近一条用户提示词过滤;聊天视图在向上滚动时懒加载更早的消息,浏览长会话更顺畅。→ [kimi web](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-web)
#### 限制 AgentSwarm 初始并发 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E9%99%90%E5%88%B6-agentswarm-%E5%88%9D%E5%A7%8B%E5%B9%B6%E5%8F%91)
新增 `KIMI_CODE_AGENT_SWARM_MAX_CONCURRENCY` 环境变量,可限制 AgentSwarm 在初始提速阶段同时运行的子 Agent 数量,让大型 swarm 更不容易触发供应商的速率限制。→ [运行时开关](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E8%BF%90%E8%A1%8C%E6%97%B6%E5%BC%80%E5%85%B3)
此外:修复了 web 应用此前只加载最近 20 个会话的问题;web 设置中现在会显示当前版本。
Kimi Code CLI
v0.17.0 2026 年 6 月 17 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-17-0-2026-%E5%B9%B4-6-%E6%9C%88-17-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### Kimi Code Web 模式 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-code-web-%E6%A8%A1%E5%BC%8F)
新增 Web 模式,可通过 `kimi web` 或 CLI 内的 `/web` 启动,在浏览器的聊天界面中继续当前会话。`kimi web` 是 `kimi server run --open` 的别名——后台启动本地服务并自动打开 web UI。→ [kimi web](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-web)
此外:当 OAuth token 刷新在内部重试后仍失败时,显示底层连接错误而不是误提示重新登录;并修复了 `kimi web` 无法在后台启动的问题(v0.17.1)。
Kimi Code CLI
v0.16.0 2026 年 6 月 16 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-16-0-2026-%E5%B9%B4-6-%E6%9C%88-16-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### `kimi vis` 会话可视化 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-vis-%E4%BC%9A%E8%AF%9D%E5%8F%AF%E8%A7%86%E5%8C%96)
新增内置的 `kimi vis` 命令,在浏览器中启动会话可视化工具并指向本地会话,直观查看一次会话的全过程。支持 `--port`/`--host`、`--no-open`,以及用 `kimi vis ` 直接深链到指定会话。→ [kimi vis](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-vis)
此外:阻止 Anthropic 兼容供应商读取环境中的 Anthropic shell 凭证和自定义 header,避免凭证意外泄漏;修复上下文仍超过阻塞阈值时的重复压缩问题。
Kimi Code CLI
v0.15.0 2026 年 6 月 15 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-15-0-2026-%E5%B9%B4-6-%E6%9C%88-15-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### 全会话选择器 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%85%A8%E4%BC%9A%E8%AF%9D%E9%80%89%E6%8B%A9%E5%99%A8)
新增跨工作目录的全会话选择器视图,支持按名称搜索、分页浏览,并能为其他工作目录中的会话一键生成可复制的恢复命令,找回历史会话更顺手。
#### 推理过程跟随用户语言 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%8E%A8%E7%90%86%E8%BF%87%E7%A8%8B%E8%B7%9F%E9%9A%8F%E7%94%A8%E6%88%B7%E8%AF%AD%E8%A8%80)
同语言规则现已扩展到模型的推理过程,思考内容会跟随你使用的语言,同时保留代码和技术术语的原始形式。
此外:MCP 新增对旧式 SSE server 的支持,与 stdio、streamable HTTP 传输并存(→ [接入方式](https://www.kimi.com/code/docs/kimi-code-cli/customization/mcp.html#%E6%8E%A5%E5%85%A5%E6%96%B9%E5%BC%8F)
);窄终端下 TUI 组件会自动换行、压缩或截断超宽内容,避免布局错乱。
模型发布
Kimi K2.7 Code 2026 年 6 月 12 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-k2-7-code-2026-%E5%B9%B4-6-%E6%9C%88-12-%E6%97%A5)
---------------------------------------------------------------------------------------------------------------------------------------------------
我们最新的代码模型 **Kimi K2.7 Code** 正式发布并开源,现已在 Kimi For Coding 中上线,新模型仅在 Thinking On(开启思考模式)状态下生效。
#### 编码与智能体能力较 K2.6 全面提升 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E7%BC%96%E7%A0%81%E4%B8%8E%E6%99%BA%E8%83%BD%E4%BD%93%E8%83%BD%E5%8A%9B%E8%BE%83-k2-6-%E5%85%A8%E9%9D%A2%E6%8F%90%E5%8D%87)
Program-Bench 提升 10.4%,MCP Mark Verified 提升 11.4%,SWE Marathon 提升 76.2%。
#### 推理效率 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%8E%A8%E7%90%86%E6%95%88%E7%8E%87)
改善过度思考问题,推理 token 用量较 K2.6 降低 30%。
#### 长程编码 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E9%95%BF%E7%A8%8B%E7%BC%96%E7%A0%81)
指令遵循能力提升,端到端编码任务成功率更高。
#### ⚡ Kimi K2.7 Code 高速版(即将开始内测) [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E2%9A%A1-kimi-k2-7-code-%E9%AB%98%E9%80%9F%E7%89%88-%E5%8D%B3%E5%B0%86%E5%BC%80%E5%A7%8B%E5%86%85%E6%B5%8B)
同一个模型,输出速度约为普通版的 5-6 倍。
Kimi Code CLI
v0.14.0 2026 年 6 月 10 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-14-0-2026-%E5%B9%B4-6-%E6%9C%88-10-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### `Interrupt` hook 事件 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#interrupt-hook-%E4%BA%8B%E4%BB%B6)
用户中断当前轮次时(例如按下 Esc),hooks 现在能收到专门的 `Interrupt` 事件——此时 `Stop` 不再触发,由它替代,外部工具不会再误以为轮次仍在运行。超时等程序性中断不会触发该事件。→ [事件一览](https://www.kimi.com/code/docs/kimi-code-cli/customization/hooks.html#%E4%BA%8B%E4%BB%B6%E4%B8%80%E8%A7%88)
#### Kimi Datasource 新增法律法规数据 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-datasource-%E6%96%B0%E5%A2%9E%E6%B3%95%E5%BE%8B%E6%B3%95%E8%A7%84%E6%95%B0%E6%8D%AE)
官方数据插件升级到 v3.2.0,新增中国法律法规与司法案例查询,现已覆盖股票行情、宏观经济、企业工商、学术文献、法律法规五大数据源。→ [插件介绍](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html#kimi-datasource)
此外:修复了 OpenAI 兼容 Chat Completions 下工具输出中的图像丢失问题;v0.13.1 起 `/undo` 不带参数会打开交互式选择器,按条挑选要撤销的提示词(→ [会话管理](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html#%E4%BC%9A%E8%AF%9D%E7%AE%A1%E7%90%86)
)。
Kimi Code CLI
v0.13.0 2026 年 6 月 10 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-13-0-2026-%E5%B9%B4-6-%E6%9C%88-10-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------
#### 自定义颜色主题 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E9%A2%9C%E8%89%B2%E4%B8%BB%E9%A2%98)
内置 dark / light 配色之外,现在可以用 JSON 文件定义自己的调色板——只写想改的颜色,其余沿用基准配色,文件名就是主题名。也可以直接运行 `/custom-theme` 让 Kimi 帮你选色、生成主题文件并写入 `~/.kimi-code/themes/`。→ [自定义主题](https://www.kimi.com/code/docs/kimi-code-cli/customization/themes.html)
#### `/import-from-cc-codex` 一键导入 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#import-from-cc-codex-%E4%B8%80%E9%94%AE%E5%AF%BC%E5%85%A5)
从 Claude Code 和 Codex 导入选定的指令、Skills 和 MCP 设置,迁移到 Kimi Code 不用逐项手动重配。→ [内置 Skill 命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html#%E5%86%85%E7%BD%AE-skill-%E5%91%BD%E4%BB%A4)
此外:marketplace 列表会标出已安装 plugin 的可用更新,选中按 `Enter` 即可升级(→ [Plugins](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html#%E5%AE%89%E8%A3%85%E4%B8%8E%E7%AE%A1%E7%90%86)
);设备登录在浏览器无法打开时保持 URL 和验证码可见。
Kimi Code CLI
v0.12.0 2026 年 6 月 9 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-12-0-2026-%E5%B9%B4-6-%E6%9C%88-9-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### `/swarm` 多 Agent 并行任务 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#swarm-%E5%A4%9A-agent-%E5%B9%B6%E8%A1%8C%E4%BB%BB%E5%8A%A1)
用 `/swarm <任务>` 启动群组模式——多个 Agent 并行拆解同一目标,带实时进度展示和速率限制自动重试,任务完成后自动退出群组模式。→ [斜杠命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html#%E6%A8%A1%E5%BC%8F%E4%B8%8E%E8%BF%90%E8%A1%8C%E6%8E%A7%E5%88%B6)
#### 代理支持 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E4%BB%A3%E7%90%86%E6%94%AF%E6%8C%81)
现在完整识别 `HTTP_PROXY`、`HTTPS_PROXY`、`ALL_PROXY`、`NO_PROXY` 标准环境变量,SOCKS 代理也可用(`socks5://`、`socks4://` 等 scheme)。本地回环地址始终直连,配置代理不会影响 localhost 上的 MCP 服务。→ [环境变量](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html)
#### Goal / 后台问题 / Sub-Skill 正式发布 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#goal-%E5%90%8E%E5%8F%B0%E9%97%AE%E9%A2%98-sub-skill-%E6%AD%A3%E5%BC%8F%E5%8F%91%E5%B8%83)
这三项功能不再需要实验功能 flag,默认可用。微压缩(micro compaction)同步默认开启——自动清理较旧的大型工具结果,减少上下文占用;如需关闭,在 `config.toml` 中设置 `experimental.micro_compaction = false`。(该功能已于 v0.22.1 移除。)
此外:Homebrew 安装时自动用 `brew upgrade kimi-code` 更新;`KIMI_CODE_HOME` 设置后 Skills 和全局 Agent 指令从该目录加载;审批面板超长 shell 命令自动折行展示完整内容;多项 Goal 模式和 ACP 路由修复。
Kimi Code CLI
v0.11.0 2026 年 6 月 5 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-11-0-2026-%E5%B9%B4-6-%E6%9C%88-5-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### 内置 Skill 直接变为斜杠命令 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%86%85%E7%BD%AE-skill-%E7%9B%B4%E6%8E%A5%E5%8F%98%E4%B8%BA%E6%96%9C%E6%9D%A0%E5%91%BD%E4%BB%A4)
内置 Skill(如 `update-config`)现在直接出现在斜杠命令面板里,不再需要加 `skill:` 前缀——输入 `/` 即可看到,排在外部 Skill 前面。→ [斜杠命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html#skill-%E5%8A%A8%E6%80%81%E5%91%BD%E4%BB%A4)
#### Sub-Skill 发现机制(实验) [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#sub-skill-%E5%8F%91%E7%8E%B0%E6%9C%BA%E5%88%B6-%E5%AE%9E%E9%AA%8C)
新增实验性 Sub-Skill 系统,内置 `sub-skill.review`(审查现有 Skill)和 `sub-skill.consolidate`(将 Skill 整合为层级分组)。通过 `KIMI_CODE_EXPERIMENTAL_SUB_SKILL=1` 启用。→ [Agent Skills](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html)
此外:YOLO 模式下启动 Goal 前会先确认并建议切换到 Auto 模式;子 Agent 超时后显示 resume 提示;Goal 队列修复多处 bug。
Kimi Code CLI
v0.10.0 2026 年 6 月 4 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-10-0-2026-%E5%B9%B4-6-%E6%9C%88-4-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### Goal 队列 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#goal-%E9%98%9F%E5%88%97)
用 `/goal next <目标>` 提前排好后续任务,当前 Goal 完成后自动衔接,不用守着等、不用手动触发。`/goal next manage` 打开交互管理器,随时调整顺序。→ [使用目标模式](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E7%9B%AE%E6%A0%87%E6%A8%A1%E5%BC%8F)
#### 实验功能面板(`/experiments`) [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%AE%9E%E9%AA%8C%E5%8A%9F%E8%83%BD%E9%9D%A2%E6%9D%BF-experiments)
TUI 内输入 `/experiments` 打开可视化开关面板,勾选后自动写入 `config.toml` 并重载会话,无需手改配置文件。
#### 新增内置 `update-config` Skill [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%96%B0%E5%A2%9E%E5%86%85%E7%BD%AE-update-config-skill)
现在可以让 Kimi 直接编辑它自己的配置文件了。
此外:`/reload` 修改配置后原地重载会话(→ [斜杠命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html#%E8%B4%A6%E5%8F%B7%E4%B8%8E%E9%85%8D%E7%BD%AE)
);`kimi doctor` 一条命令校验配置文件格式(→ [kimi doctor](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-doctor)
);Windows 缺少 Git Bash 时启动前提前报错。
Kimi Code CLI
v0.9.0 2026 年 6 月 3 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-9-0-2026-%E5%B9%B4-6-%E6%9C%88-3-%E6%97%A5)
---------------------------------------------------------------------------------------------------------------------------------
#### `kimi acp` 子命令 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-acp-%E5%AD%90%E5%91%BD%E4%BB%A4)
通过 ACP(Agent Client Protocol)协议把 CLI 接入 IDE——Zed、JetBrains AI Chat 等编辑器可直接驱动 Kimi 的会话和工具调用,无需在浏览器或终端切换。→ [在 IDE 中使用](https://www.kimi.com/code/docs/kimi-code-cli/guides/ides.html)
#### `/btw` 旁路对话 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#btw-%E6%97%81%E8%B7%AF%E5%AF%B9%E8%AF%9D)
不打断当前主轮次的情况下开一个侧通道对话——临时提问、补充信息,Agent 的主任务不受影响。不带内容直接输入 `/btw` 会先打开面板等你输入。→ [斜杠命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html#%E4%BF%A1%E6%81%AF%E4%B8%8E%E7%8A%B6%E6%80%81)
此外:修复 Windows 上 `Ctrl-G` 外部编辑器调用;统一 TUI 对话框与选择器的交互体验。
Kimi Code CLI
v0.8.0 2026 年 6 月 2 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-8-0-2026-%E5%B9%B4-6-%E6%9C%88-2-%E6%97%A5)
---------------------------------------------------------------------------------------------------------------------------------
#### 自主 Goal 模式(实验) [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E8%87%AA%E4%B8%BB-goal-%E6%A8%A1%E5%BC%8F-%E5%AE%9E%E9%AA%8C)
用 `/goal <目标>` 启动后,Kimi 会跨多个轮次持续推进同一个目标,直到完成或遇到需要你决策的阻塞。→ [自主 goal](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html#%E7%9B%AE%E6%A0%87%E6%A8%A1%E5%BC%8F)
#### 后台结构化提问 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%90%8E%E5%8F%B0%E7%BB%93%E6%9E%84%E5%8C%96%E6%8F%90%E9%97%AE)
Agent 遇到需要你做选择的问题时,会挂到后台继续处理其他步骤,不再因为一个小问题卡住整个流程。→ [AskUserQuestion](https://www.kimi.com/code/docs/kimi-code-cli/reference/tools.html#%E5%8D%8F%E4%BD%9C%E7%B1%BB)
#### `kimi provider` 子命令 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-provider-%E5%AD%90%E5%91%BD%E4%BB%A4)
在终端直接增删供应商,无需进入 TUI,适合脚本和 CI 场景。→ [kimi provider](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-provider)
此外:**后台自动更新**默认开启,可在 `tui.toml` 中关闭;**上下文压缩**([`/compact`](https://www.kimi.com/code/docs/kimi-code-cli/guides/sessions.html#%E4%B8%8A%E4%B8%8B%E6%96%87%E5%8E%8B%E7%BC%A9)
)时待办列表会附在摘要里,防止 Agent 忘记中断前的进度。
Kimi Code CLI
v0.7.0 2026 年 6 月 2 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-7-0-2026-%E5%B9%B4-6-%E6%9C%88-2-%E6%97%A5)
---------------------------------------------------------------------------------------------------------------------------------
#### `/provider` 交互式供应商管理器 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#provider-%E4%BA%A4%E4%BA%92%E5%BC%8F%E4%BE%9B%E5%BA%94%E5%95%86%E7%AE%A1%E7%90%86%E5%99%A8)
TUI 内输入 `/provider` 打开可视化界面,查看、新增、删除供应商,切换模型不再需要手改配置文件。→ [平台与模型](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#provider-%E2%80%94-%E4%BA%A4%E4%BA%92%E5%BC%8F%E4%BE%9B%E5%BA%94%E5%95%86%E7%AE%A1%E7%90%86)
#### `KIMI_MODEL_ADAPTIVE_THINKING` 环境变量 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-model-adaptive-thinking-%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F)
接自定义端点时,可强制指定是否启用 adaptive thinking,不再依赖模型名自动推断。→ [模型字段](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#models)
此外:定时任务触发时间改为按**本地时区**显示。
Kimi Code CLI
v0.6.0 2026 年 5 月 29 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-6-0-2026-%E5%B9%B4-5-%E6%9C%88-29-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### `KIMI_MODEL_*` 环境变量通道 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#kimi-model-%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E9%80%9A%E9%81%93)
只需设置几个环境变量就能临时切换模型,完全不用改配置文件,重启后自动失效,适合测试或 CI 场景。→ [用环境变量定义模型](https://www.kimi.com/code/docs/kimi-code-cli/configuration/env-vars.html#%E7%94%A8%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E5%AE%9A%E4%B9%89%E6%A8%A1%E5%9E%8B-kimi-model)
#### 从 GitHub URL 直接安装 Plugin [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E4%BB%8E-github-url-%E7%9B%B4%E6%8E%A5%E5%AE%89%E8%A3%85-plugin)
粘贴仓库链接即可安装社区插件,支持锁定特定版本,Plugin 管理器会标注来源信任等级。→ [安装与管理](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html#%E5%AE%89%E8%A3%85%E4%B8%8E%E7%AE%A1%E7%90%86)
#### 移除默认步数上限 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E7%A7%BB%E9%99%A4%E9%BB%98%E8%AE%A4%E6%AD%A5%E6%95%B0%E4%B8%8A%E9%99%90)
取消了每轮 1000 步的限制,长任务不再被强制中断。→ [loop\_control](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#loop-control)
Kimi Code CLI
v0.5.0 2026 年 5 月 28 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-5-0-2026-%E5%B9%B4-5-%E6%9C%88-28-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### 定时任务 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)
用自然语言设定定时计划或一次性提醒,Kimi 到点自动执行,无需守着。→ [定时任务](https://www.kimi.com/code/docs/kimi-code-cli/reference/tools.html#%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)
#### `/auto` 权限模式 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#auto-%E6%9D%83%E9%99%90%E6%A8%A1%E5%BC%8F)
比 `/yolo` 更克制的自动化模式——工具审批自动处理,但 Agent 不会向你提问,适合无人值守但不想完全放开的场景。→ [交互与输入](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E4%B8%89%E7%A7%8D%E6%9D%83%E9%99%90%E6%A8%A1%E5%BC%8F)
Kimi Code CLI
v0.4.0 2026 年 5 月 27 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-4-0-2026-%E5%B9%B4-5-%E6%9C%88-27-%E6%97%A5)
-----------------------------------------------------------------------------------------------------------------------------------
#### Plugin 系统上线 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#plugin-%E7%B3%BB%E7%BB%9F%E4%B8%8A%E7%BA%BF)
可安装携带 Skills 和 MCP server 的插件包,官方 marketplace 同步上线,Kimi Datasource 数据插件已上架。→ [Plugins](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html)
#### 会话导出 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E4%BC%9A%E8%AF%9D%E5%AF%BC%E5%87%BA-1)
将对话记录导出为 Markdown 文件,或打包为 ZIP 提交反馈。→ [会话与上下文](https://www.kimi.com/code/docs/kimi-code-cli/guides/sessions.html#%E5%AF%BC%E5%87%BA%E4%BC%9A%E8%AF%9D)
#### 权限系统重构 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#%E6%9D%83%E9%99%90%E7%B3%BB%E7%BB%9F%E9%87%8D%E6%9E%84)
工作目录外的只读操作不再触发审批,减少不必要的确认打断。→ [权限配置](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#permission)
Kimi Code CLI
v0.2.0 – v0.3.0 2026 年 5 月 26 日 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-2-0-%E2%80%93-v0-3-0-2026-%E5%B9%B4-5-%E6%9C%88-26-%E6%97%A5)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
#### OpenAI 兼容推理模型开箱即用 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#openai-%E5%85%BC%E5%AE%B9%E6%8E%A8%E7%90%86%E6%A8%A1%E5%9E%8B%E5%BC%80%E7%AE%B1%E5%8D%B3%E7%94%A8)
DeepSeek、Qwen、One API 等带 thinking 的模型无需额外配置即可使用。→ [openai 供应商](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html#openai)
#### `/logout` 支持选择供应商 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#logout-%E6%94%AF%E6%8C%81%E9%80%89%E6%8B%A9%E4%BE%9B%E5%BA%94%E5%95%86)
退出时弹出选择器,避免误退出其他供应商的登录态。
#### `/connect` 命令 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#connect-%E5%91%BD%E4%BB%A4)
从公共目录搜索供应商并一键配置,无需手写配置文件。(v0.7.0 起已升级为 `/provider`。)
Kimi Code CLI
v0.1.0 2026 年 5 月 [](https://www.kimi.com/code/docs/kimi-code/whats-new.html#v0-1-0-2026-%E5%B9%B4-5-%E6%9C%88)
-----------------------------------------------------------------------------------------------------------------
**Kimi Code CLI 新版首发**,底层从 Python / uv 完整重写为 TypeScript / Node.js。这不是一次渐进式更新,而是一个新起点——核心架构、安装方式、配置格式全面升级。
与旧版 kimi-cli 的主要区别:
| 对比项 | 旧版 kimi-cli | 新版 Kimi Code CLI |
| --- | --- | --- |
| 运行时 | Python + uv | Node.js(无 Python 依赖) |
| 安装 | `uv tool install` | 一行 `curl` 脚本或 `npm install -g` |
| 配置文件 | `~/.kimi/config.toml` | `~/.kimi-code/config.toml`(格式不兼容) |
| 终端界面 | 基础文本输出 | 全功能 TUI(对话视图 + 状态栏 + 审批面板) |
| 启动速度 | 较慢(Python 冷启动) | 更快(Node.js 原生二进制) |
| 多供应商支持 | 有限 | 内置 Anthropic / OpenAI / Gemini / Vertex 等 |
| Agent 子任务 | 不支持 | 内置 coder / explore / plan 三种子 Agent |
| Plugin 系统 | 不支持 | 支持(v0.4.0 起) |
| 定时任务 | 不支持 | 支持(v0.5.0 起) |
已有 kimi-cli 数据(配置、会话、MCP 声明)可通过 `kimi migrate` 一键迁移。→ [版本升级](https://www.kimi.com/code/docs/kimi-code-cli/guides/migration.html)
---
# 使用桌面端 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html#VPContent)
Return to top
使用桌面端 [](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html#%E4%BD%BF%E7%94%A8%E6%A1%8C%E9%9D%A2%E7%AB%AF)
=============================================================================================================================
桌面端在一个窗口中覆盖从对话到交付的完整流程:描述需求、跟踪执行、审查验证、管理项目。本页按功能类型介绍这些能力;从安装到第一个任务的最短路径见[快速开始](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html)
。
选择任务模式 [](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html#%E9%80%89%E6%8B%A9%E4%BB%BB%E5%8A%A1%E6%A8%A1%E5%BC%8F)
---------------------------------------------------------------------------------------------------------------------------------------
不同任务适合不同的推进方式。开始任务前,可以根据任务类型,在输入框左下角 **+** 中选择合适的任务模式:
* **普通任务**:适合边界清楚、容易验证的修改。
* **计划模式**:适合影响范围不确定、需要先确认方案的修改。Agent 会先分析并给出计划,确认后再执行。
* **目标模式**:适合需要多轮执行和检查的长任务。目标会显示在输入框上方,可持续暂停、恢复或取消。
* **Swarm 模式**:适合可以拆成多个独立子任务的调查或修改,进度会显示在 Tasks 或 Subagent 区域。
给 Agent 提供上下文 [](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html#%E7%BB%99-agent-%E6%8F%90%E4%BE%9B%E4%B8%8A%E4%B8%8B%E6%96%87)
-----------------------------------------------------------------------------------------------------------------------------------------------------
上下文越具体,Agent 越不容易偏离目标。先描述目标,再按下表补充材料:
| 入口 | 触发方式 | 作用 |
| --- | --- | --- |
| 添加附件 | 粘贴、拖拽或点击 **+** | 上传截图、文档、图片、视频或其他材料,作为当前任务的上下文 |
| 插入 `@` 提及 | 输入 `@` | 引用工作区中的文件或文件夹,让 Agent 定位相关代码或资料 |
| 插入 `/` 命令 | 输入 `/` | 调用内置命令或已保存的扩展命令,复用固定流程;有效的行首命令会高亮 |
| 截屏 | macOS:`Shift + Command + S` Windows:`Shift + Ctrl + S` | 点击 **+** 开启截屏功能,根据提示打开权限,框选屏幕区域并添加序号和评论,帮助 Agent 定位页面位置或错误信息 |
| 评论并添加到对话 | 选中内容后选择“评论”或“添加到对话” | 把对话中的文字、代码或工具结果作为引用补充到当前任务,便于继续追问或调整方向 |
也可以直接提供错误日志、复现步骤、期望行为、验证命令,以及不希望修改的目录、文件或行为。
追问与调整方向 [](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html#%E8%BF%BD%E9%97%AE%E4%B8%8E%E8%B0%83%E6%95%B4%E6%96%B9%E5%90%91)
-------------------------------------------------------------------------------------------------------------------------------------------------
任务执行过程中,Agent 的工具调用和思考过程会显示在会话中,可以随时查看。你可以继续输入补充要求来调整方向,例如缩小范围、补充约束、要求先解释原因、要求停止当前操作,或让 Agent 按新的要求继续。需要回退时,可以使用 `/undo` 回退最近的修改。
与当前任务不直接相关的疑问,可以在侧边聊天中讨论,无需离开主会话。
审查改动 [](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html#%E5%AE%A1%E6%9F%A5%E6%94%B9%E5%8A%A8)
-------------------------------------------------------------------------------------------------------------------
任务产生修改后,需要先确认改了哪些文件、每处改成什么样。
* **改动**:右侧面板的改动标签页按文件列出所有变化,可检查单个文件或单次修改的差异;改动标签页是单例,已打开时新建菜单会隐藏该入口。
* **Git 状态**:改动面板顶部显示当前分支、领先 / 落后状态和文件变化数量,也可以查看拉取请求状态。
* **文件预览**:预览 Markdown、JSON、HTML、PDF、CSV、图片以及代码或文本文件,并支持复制、下载、在系统中显示和在外部应用中打开;带 frontmatter 的 Markdown 会显示元数据卡片。会话中提到的文件路径也可以直接点开预览,右键文件名可复制路径或在文件夹中显示。

右侧面板的改动标签页可以按文件查看每次修改的具体差异。

改动面板顶部显示当前分支和文件变化数量,列表中的每个文件可以展开查看改动详情。
验证修改 [](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html#%E9%AA%8C%E8%AF%81%E4%BF%AE%E6%94%B9)
-------------------------------------------------------------------------------------------------------------------
修改后的结果如需要运行检查确认,支持终端或网页形式。底部终端面板是桌面端原生终端,可通过会话右上角的终端按钮打开,也可以按 Ctrl + 反引号显示或隐藏。它支持多个 tab,并在当前工作区的 `cwd` 中运行命令,适合执行项目已有的构建、测试、格式检查和其他验证命令,也可以查看 Git 命令输出。

底部终端面板可直接运行构建、测试等验证命令并查看输出。
需要验证网页效果时,可以在右侧面板打开内置浏览器:标签页随会话常驻,页面信息与 Agent 共享,启动本地服务后即可在应用内查看页面,无需切到其他窗口;点击会话中的本地 HTML 文件,也会在内置浏览器中按真实网页打开。还可以标注网页中的元素或区域,自动捕获元素信息并附上截图和评论,让 Agent 准确定位要修改的位置。

内置浏览器中标注网页元素:自动捕获元素信息,可附截图和评论加入输入框。
管理后台任务 [](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html#%E7%AE%A1%E7%90%86%E5%90%8E%E5%8F%B0%E4%BB%BB%E5%8A%A1)
---------------------------------------------------------------------------------------------------------------------------------------
桌面端支持在主会话继续时运行后台任务。输入框上方的工作条会显示后台 Bash、后台 Agent 等后台工作的运行状态和数量,点击可展开任务列表(可按最近、进行中、已完成、全部筛选),你可以在这里:
* 查看后台 Bash 和工具任务的状态、输出和运行时长;
* 查看后台 Agent 的模型、思考强度、状态和结果;
* 打开具体任务或子代理的详情——后台 Agent 会在右侧打开任务详情标签页,展示执行摘要、思考过程和工具调用;
* 停止运行中的任务。
后台任务和后台 Agent 是两类不同的工作:前者用于查看命令和工具执行,后者用于查看子代理的独立工作。
管理项目与会话 [](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html#%E7%AE%A1%E7%90%86%E9%A1%B9%E7%9B%AE%E4%B8%8E%E4%BC%9A%E8%AF%9D)
-------------------------------------------------------------------------------------------------------------------------------------------------
桌面端按工作区整理会话,工作区对应一个本地项目文件夹。工作区内的会话支持新建、切换、重命名、归档、恢复、删除、Fork、导出、置顶和搜索。多个会话可以用标签页并行打开,并支持批量管理;全局搜索可跨工作区查找会话。首轮对话后会自动生成标题,也可以在会话项中重新生成,或在设置中关闭自动生成。
Fork 用于保留当前会话并尝试另一种方向;归档、搜索、恢复和导出用于管理历史会话。
使用外部应用 [](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html#%E4%BD%BF%E7%94%A8%E5%A4%96%E9%83%A8%E5%BA%94%E7%94%A8)
---------------------------------------------------------------------------------------------------------------------------------------
文件预览用于查看文件并执行复制、下载、在系统中显示或在外部应用中打开。顶部菜单用于在外部应用中打开当前项目或文件,可以选择 VS Code、Cursor、Zed、Xcode、系统终端,以及 Finder 或 Explorer 等系统文件管理器,也可以复制当前路径。
使用插件扩展能力 [](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html#%E4%BD%BF%E7%94%A8%E6%8F%92%E4%BB%B6%E6%89%A9%E5%B1%95%E8%83%BD%E5%8A%9B)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
插件用于把特定工具、流程或外部服务接入桌面端。你可以在设置中的插件区域浏览插件市场,安装、启用、更新或移除插件,也可以添加自定义插件来源。
当前可用的官方扩展能力包括:
* **Kimi Computer Use**:让 Agent 在 macOS 上操作本机应用和界面。
* **Kimi Browser Extension**:让 Agent 操作你的真实浏览器并复用已有登录状态;缺少浏览器扩展时,插件区域会提供 Chrome 或 Edge 扩展安装入口。
* **Kimi Datasource**:为 Agent 提供数据查询和数据源相关能力,适合需要查询外部数据或接入数据源的任务。
插件的添加方式、插件市场和自定义来源说明见[Plugins](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html)
。
调整设置 [](https://www.kimi.com/code/docs/kimi-code-desktop/using-desktop.html#%E8%B0%83%E6%95%B4%E8%AE%BE%E7%BD%AE)
-------------------------------------------------------------------------------------------------------------------
设置面板包含通用、账号、智能体与会话、模型供应商、插件、快捷键、关于、实验室和已归档会话等区域,用于管理模型、模型供应商、消息折叠、账号、权限、快捷键、协议入口和实验性选项。

设置面板左侧是通用、账户、供应商、插件等主要区域入口,右侧展示当前区域的配置项。
下一步可以从[快速开始](https://www.kimi.com/code/docs/kimi-code-desktop/getting-started.html)
回到最短操作路径。
---
# Model Context Protocol | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-cli/customization/mcp.html#VPContent)
Return to top
Model Context Protocol [](https://www.kimi.com/code/docs/kimi-code-cli/customization/mcp.html#model-context-protocol)
=======================================================================================================================
[Model Context Protocol(MCP)](https://modelcontextprotocol.io/)
是一个开放协议,让模型可以安全地调用外部进程或服务暴露的工具:读取 GitHub issues、查询数据库、操作本地文件系统。Kimi Code CLI 作为 MCP client 接入这些外部工具,把它们与内置工具一起暴露给 Agent 使用,行为上没有差异。
MCP 工具结果可以包含文本(`content`)和结构化数据(`structuredContent`)。Kimi Code CLI 会将两者提供给 Agent,只有能够确认某个文本块已包含同一份完整 JSON 值时,才省略重复的结构化内容。文本摘要和媒体不会替代结构化记录。
Kimi Code CLI 会保留因格式或大小限制而无法直接交付的内嵌 MCP 附件。内嵌图片、音频和视频即使能够原样交付也会保存,因为后续供应商协议转换或历史精简可能省略它们。模型支持相应内容时,即使工作区文件系统不可用,也仍可读取会话附件。原件随会话保存在媒体存储中,不会被图片缓存淘汰。保存的原件(包括图片压缩前的原图)均提供绝对路径和稳定的 `kimi-file://` 引用。将引用作为 `path` 传给 `Read` 或 `ReadMediaFile`,即使工作区 runtime 无法访问会话存储,也能直接从当前会话存储读取字节。分页续读会保留该引用,包括 fork 后的会话。对于 `Read` 无法打开的二进制格式,错误信息会在可用时提供服务端本地路径;外部转换工具必须能够访问该文件系统。CSV、HTML、JSON 和普通 SVG 等文本附件使用可读取的扩展名。
附件路径和压缩说明共用工具输出预算。较长的清单会保存为文本文件,结果中保留简短指针,即使伴随的文本被截短,该指针仍然可见;Agent 可将清单的 `kimi-file://` 引用传给 `Read`,分页读取完整内容。取消工具调用会停止后续附件处理,并通知正在进行的写入操作。如果解码或保存失败,结果会明确说明原件未能保留,并保留其他可用输出。资源链接不会被自动下载。
接入方式 [](https://www.kimi.com/code/docs/kimi-code-cli/customization/mcp.html#%E6%8E%A5%E5%85%A5%E6%96%B9%E5%BC%8F)
-------------------------------------------------------------------------------------------------------------------
Kimi Code CLI 支持三种 MCP server 接入方式:
* **stdio**:CLI 以子进程方式启动本地 MCP server,通过标准输入输出通信。适合本地命令行工具。
* **HTTP**:CLI 连接一个已在运行的 HTTP 端点。适合远程服务或需要持久运行的进程。
* **SSE**:CLI 连接旧式 HTTP+SSE 端点。新 MCP server 优先使用 HTTP;只有服务仍仅暴露旧式 SSE 传输时,才设置 `transport: "sse"`。
配置 [](https://www.kimi.com/code/docs/kimi-code-cli/customization/mcp.html#%E9%85%8D%E7%BD%AE)
-----------------------------------------------------------------------------------------------
MCP server 配置写在 `mcp.json` 中,分两层:
* **用户级**:`~/.kimi-code/mcp.json`(或 `$KIMI_CODE_HOME/mcp.json`),跨项目共享
* **项目级**:工作目录下的 `.kimi-code/mcp.json`,只对当前仓库生效
同名条目以项目级为准,覆盖用户级。
在 TUI 中运行 `/mcp-config` 可以交互式地新增、编辑或删除 server,无需手动编辑 JSON 文件。运行 `/mcp` 可查看当前所有 server 的连接状态。
从配置中删除某个 server 不会打断进行中的会话:该 server 在 `/mcp` 中仍显示为 `removed`,其工具在这些会话中保持可见,但调用会失败并返回移除提示;新会话则完全不会注册这些工具。反过来,编辑 `mcp.json` 或安装 plugin 新增的 server 也不会注册到已打开的会话,只会加入之后创建的会话。
当 Kimi Code 在不受信任的文件夹中发现项目级 MCP server 时,工作区信任提示会显示每个 server 的传输方式和启动目标。提示默认选中 `Trust this folder`;核对列出的命令与参数或远程 URL 后确认即可,选择 `Don't trust` 则该工作区的项目级 MCP server 不会启用。
`mcp.json` 的结构:
json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
},
"linear": {
"url": "https://mcp.linear.app/mcp"
},
"legacy-events": {
"transport": "sse",
"url": "https://mcp.example.com/sse"
}
}
}
含 `command` 字段的条目为 stdio server;含 `url` 字段且未写 `transport` 的条目为 HTTP server。旧式 SSE server 需要显式把 `transport` 设为 `"sse"`。
可选字段:
| 字段 | 类型 | 适用方式 | 说明 |
| --- | --- | --- | --- |
| `env` | `Record` | stdio | 注入子进程的环境变量 |
| `cwd` | `string` | stdio | 子进程工作目录 |
| `headers` | `Record` | HTTP、SSE | 附加到每次请求的静态请求头 |
| `bearerTokenEnvVar` | `string` | HTTP、SSE | 存放 bearer token 的环境变量名 |
| `enabled` | `boolean` | 全部 | 设为 `false` 可禁用该 server |
| `deferred` | `boolean` | 全部 | 实验功能:设为 `true` 时该 server 的工具由模型按需加载,默认 `false`(始终直接暴露)。前提与行为见 [按需加载工具](https://www.kimi.com/code/docs/kimi-code-cli/customization/mcp.html#%E6%8C%89%E9%9C%80%E5%8A%A0%E8%BD%BD%E5%B7%A5%E5%85%B7) |
| `startupTimeoutMs` | `number` | 全部 | 连接超时,取值范围为 `1` 到 `2147483647` 毫秒,默认 `30000` |
| `toolTimeoutMs` | `number` | 全部 | 单次工具调用超时,取值范围为 `1` 到 `2147483647` 毫秒 |
| `enabledTools` | `string[]` | 全部 | 工具白名单 |
| `disabledTools` | `string[]` | 全部 | 工具黑名单 |
连接超时和单次工具调用超时的默认值都不必逐个 server 设置:`config.toml` 的 `[mcp] startup_timeout_ms` / `[mcp] tool_timeout_ms` 或环境变量 `KIMI_MCP_STARTUP_TIMEOUT_MS` / `KIMI_MCP_TOOL_TIMEOUT_MS` 可以调整全局默认值,优先级为 server 字段 > 环境变量 > `config.toml` > 内置默认。详见 [配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#mcp)
。
HTTP 与 SSE server 支持通过 `headers` 或 `bearerTokenEnvVar` 提供静态凭证。需要 OAuth 时,运行 `/mcp-config login ` 完成浏览器授权。
Plugins 也可以在 manifest 中声明 MCP servers。Plugin 声明的 servers 默认启用,可以在 `/plugins` 中禁用或重新启用:禁用或移除后,已打开会话中的工具调用会失败并返回移除提示;新增或启用 server 会立即连接到已打开的会话。详见 [Plugins](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html#plugin-%E4%B8%AD%E7%9A%84-mcp-servers)
。
注意
项目级 `.kimi-code/mcp.json` 中的 stdio 条目会在会话启动时执行本地命令,只在你信任的仓库里启用。
按需加载工具 [](https://www.kimi.com/code/docs/kimi-code-cli/customization/mcp.html#%E6%8C%89%E9%9C%80%E5%8A%A0%E8%BD%BD%E5%B7%A5%E5%85%B7)
---------------------------------------------------------------------------------------------------------------------------------------
默认情况下,server 的所有工具都会直接进入模型的顶层工具列表;接入的 server 较多、或单个 server 暴露的工具较多时,这些工具定义会持续占用上下文。把 server 标记为 deferred 后,它的工具不再进入顶层工具列表:模型先看到一份可加载工具清单,需要时通过内置的 `select_tools` 工具加载完整定义,加载后同一轮即可调用。
按需加载是实验功能,同时满足两个前提才会生效:
* 启用 `tool-select` 实验标志:设置环境变量 `KIMI_CODE_EXPERIMENTAL_TOOL_SELECT=1`,或在 `config.toml` 的 `[experimental]` 下写 `tool-select = true`;总开关 `KIMI_CODE_EXPERIMENTAL_FLAG=1` 会一并启用。
* 当前模型声明了 `dynamically_loaded_tools` 能力:官方模型自动声明;其他模型可在 `config.toml` 的 `capabilities` 中追加,见 [配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#models)
。
满足前提后,在 `mcp.json` 的 server 条目里设 `deferred: true`:
json
{
"mcpServers": {
"github": {
"url": "https://mcp.example.com/mcp",
"deferred": true
}
}
}
未设置 `deferred` 的 server 不受影响,工具始终直接暴露;前提不满足时该字段被忽略,行为相同。需要 OAuth 授权的 server 在完成授权前暴露的认证工具也遵循这个字段。
工具命名与权限 [](https://www.kimi.com/code/docs/kimi-code-cli/customization/mcp.html#%E5%B7%A5%E5%85%B7%E5%91%BD%E5%90%8D%E4%B8%8E%E6%9D%83%E9%99%90)
-------------------------------------------------------------------------------------------------------------------------------------------------
MCP 工具按 `mcp____` 格式命名,例如 `mcp__github__create_issue`。权限规则中支持 `*` 和 `**` 通配,例如 `mcp__github__*` 命中该 server 下所有工具。MCP 工具参数不参与权限匹配。
未命中权限规则的调用会触发审批请求;在审批弹窗中选择“Approve for this session”后,本次会话内的后续同类调用自动放行。
也可以在 `config.toml` 的 `[[permission.rules]]` 中预置永久规则:
toml
[[permission.rules]]
decision = "allow"
pattern = "mcp__github__*"
[[permission.rules]]
decision = "deny"
pattern = "mcp__filesystem__write_file"
权限规则的完整语法见 [配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#permission)
。
安全性 [](https://www.kimi.com/code/docs/kimi-code-cli/customization/mcp.html#%E5%AE%89%E5%85%A8%E6%80%A7)
---------------------------------------------------------------------------------------------------------
接入外部 MCP server 时需注意:
* 只接入可信来源的 server
* 在审批请求中核查工具名与参数是否合理
* 对高风险工具(写文件、执行命令等)维持手动审批,避免用 `mcp__*` 通配放行全部工具
注意
在 [YOLO 模式](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E4%B8%89%E7%A7%8D%E6%9D%83%E9%99%90%E6%A8%A1%E5%BC%8F)
下,MCP 工具调用会被自动批准。仅在完全信任所接入的 MCP server 时使用此模式。
下一步 [](https://www.kimi.com/code/docs/kimi-code-cli/customization/mcp.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
---------------------------------------------------------------------------------------------------------
* [Plugins](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html)
— 在 plugin manifest 中声明 MCP server,一键打包和分发
* [配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#permission)
— 权限规则的完整字段参考
---
# Agent Skills | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html#VPContent)
Return to top
Agent Skills [](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html#agent-skills)
======================================================================================================
Agent Skills 是 Kimi Code CLI 扩展模型能力的轻量机制。一个 Skill 就是一份带 YAML frontmatter 的 Markdown 文档,描述某项专业知识或工作流程:项目的代码风格规范、PR review 流程、提交消息格式。
与每次把同样的指引粘到提示词里相比,Skill 把内容沉淀在文件里,可以跨项目和团队复用,既可以通过斜杠命令一键加载,也可以让模型在需要时自动调用。
创建 Skill [](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html#%E5%88%9B%E5%BB%BA-skill)
--------------------------------------------------------------------------------------------------------------
Skill 文件需放在[已知的扫描目录](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html#skill-%E5%AD%98%E6%94%BE%E4%BD%8D%E7%BD%AE)
中。支持两种文件结构:
* **目录形式(推荐)**:在 Skills 目录下创建一个子目录,主文件命名为 `SKILL.md`,可在同目录下放置脚本、参考资料等辅助文件。
* **扁平形式**:不建子目录,把一个 `.md` 文件直接放在 Skills 目录下,适合不需要辅助文件的简单 Skill。
两种结构都会注册出 Skill,区别只在文件组织方式:
text
skills/
├── review-pr/ # 目录形式 → Skill 名 review-pr
│ ├── SKILL.md # 主文件
│ └── checklist.md # 辅助文件,正文用 ${KIMI_SKILL_DIR} 引用
└── commit.md # 扁平形式 → Skill 名 commit
Skill 名的推导规则:
* 目录形式取 frontmatter 的 `name` 字段(必填,见下文表格);惯例让子目录名与 `name` 保持一致——`review-pr/SKILL.md` 里写 `name: review-pr`,注册为 `review-pr`。
* 扁平形式的 `name` 可省略,省略时取文件名去掉 `.md` 扩展名:`commit.md` 注册为 `commit`。注意「去掉 `.md`」只发生在注册后的 Skill 名上——磁盘上的文件必须带 `.md` 扩展名才会被扫描到,不要真的创建一个没有扩展名的 `commit` 文件。
* 同一目录下 `/SKILL.md` 与 `.md` 同时存在时,以目录形式为准,扁平文件被忽略。
扁平形式还有两点限制:
* 只有直接放在 Skills 目录顶层的 `.md` 文件会被识别;子目录里散放的 `.md`(`SKILL.md` 除外)不会被当作 Skill。
* 扁平 Skill 没有自己的目录,`${KIMI_SKILL_DIR}` 指向 Skills 目录本身,不便携带辅助文件——需要辅助文件时请改用目录形式。
### 文件格式 [](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html#%E6%96%87%E4%BB%B6%E6%A0%BC%E5%BC%8F)
`SKILL.md` 由 YAML frontmatter 和 Markdown 正文两部分组成:
markdown
---
name: code-style
description: 项目代码风格规范,定义命名、缩进、注释和文件组织
type: prompt
whenToUse: 当用户让我编写、修改或审查项目源代码时
disableModelInvocation: false
arguments:
- target
- mode
---
请按下述规范处理代码:
- 缩进使用 2 空格
- 变量名使用 `camelCase`,类型名使用 `PascalCase`
- 公开函数必须带 TSDoc 注释
- 单行不超过 100 字符
### Frontmatter 字段 [](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html#frontmatter-%E5%AD%97%E6%AE%B5)
| 字段 | 说明 |
| --- | --- |
| `name` | Skill 名称,大小写不敏感。目录型 `SKILL.md` 必填;扁平 `.md` 省略时取文件名(不含 `.md` 扩展名) |
| `description` | 一行总结,模型用它判断何时使用。目录型必填,扁平 `.md` 省略时取正文第一行非空内容(截至 240 字符) |
| `type` | 类型:`prompt`(默认)、`inline`(同 `prompt`)、`flow`(仅手动调用)。其他值被跳过 |
| `whenToUse` | 触发场景描述,也接受 `when-to-use`、`when_to_use` 写法 |
| `disableModelInvocation` | 设为 true 禁止模型自动调用,也接受 `disable-model-invocation`、`disable_model_invocation` 写法 |
| `arguments` | 命名参数列表,字符串数组或空白分隔字符串(如 `arguments: target mode`)。声明后正文可用 `$` 读取 |
注意
目录型 `SKILL.md` 中 `name` 和 `description` **必须**显式填写,省略任意一项均会导致解析失败。
### 正文占位符 [](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html#%E6%AD%A3%E6%96%87%E5%8D%A0%E4%BD%8D%E7%AC%A6)
正文在发送给模型前会展开少量占位符:
* `$ARGUMENTS`:调用时附带的完整原始参数字符串
* `$ARGUMENTS[0]`、`$ARGUMENTS[1]` 及简写 `$0`、`$1`:按空白分词后的位置参数(从 0 开始)
* `$`:`arguments` 中声明的命名参数
* `${KIMI_SKILL_DIR}`:当前 Skill 文件所在目录
位置参数支持单双引号包裹:在 `/skill:commit "fix login" patch` 中,`$0` 展开为 `fix login`。若正文不含任何参数占位符,调用时附带的文本会以 `\n\nARGUMENTS: <文本>` 的形式追加到正文末尾。
Skill 存放位置 [](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html#skill-%E5%AD%98%E6%94%BE%E4%BD%8D%E7%BD%AE)
----------------------------------------------------------------------------------------------------------------------------------
Kimi Code CLI 按作用域分四档扫描,越具体的作用域优先级越高:**Project > User > Extra > Built-in**。
**用户级**(对所有项目生效):
* `$KIMI_CODE_HOME/skills/`(默认:`~/.kimi-code/skills/`)
* `~/.agents/skills/`
Kimi 专属用户级 Skill 目录会随 `KIMI_CODE_HOME` 移动,隔离数据根时也会隔离 Kimi 专属 Skills。通用 `~/.agents/skills/` 目录仍放在真实 OS home 下,以便跨工具共享。
**项目级**(项目根 = 工作目录向上最近的含 `.git` 的目录):
* `.kimi-code/skills/`
* `.agents/skills/`
**额外目录**:通过 `config.toml` 顶层的 `extra_skill_dirs` 声明:
toml
extra_skill_dirs = ["~/team-skills", ".agents/team-skills"]
**内置 Skills** 随 CLI 一起分发,优先级最低,为常见任务提供开箱即用的工作流,例如配置 MCP server、定制 TUI 主题和编辑配置文件。完整列表详见[内置 Skill 命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html#%E5%86%85%E7%BD%AE-skill-%E5%91%BD%E4%BB%A4)
。其中介绍 Kimi Code 自身的部分可以通过顶层 [`builtin_product_skills`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#%E9%A1%B6%E5%B1%82%E5%AD%97%E6%AE%B5)
字段关闭。
调用 Skill [](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html#%E8%B0%83%E7%94%A8-skill)
--------------------------------------------------------------------------------------------------------------
用户通过斜杠命令主动调用:
/skill:code-style
/skill:git-commits 修复登录接口的并发问题
模型也可以根据 `description` 和 `whenToUse` 自动调用 Skill。`disableModelInvocation` 设为 true 或 `type` 设为 flow 时不自动调用。Skill 调用最多允许嵌套 3 层,超过后会被终止。
完整示例 [](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html#%E5%AE%8C%E6%95%B4%E7%A4%BA%E4%BE%8B)
----------------------------------------------------------------------------------------------------------------------
markdown
---
name: review-pr
description: 按团队标准审查一个 Pull Request,输出结构化的 review 报告
type: prompt
whenToUse: 当用户让我审查 PR、检查代码变更或评估提交质量时
arguments:
- pr_ref
---
请按照以下流程审查用户指定的 PR:$pr_ref
1. 拉取并阅读 `$pr_ref` 的全部 diff。
2. 对照以下检查项逐条核对:
- 是否包含对应的测试用例
- 公开 API 是否有文档更新
- 是否引入了新的依赖;若有,说明引入理由
- 错误处理是否覆盖了边界情况
3. 参考同目录下的检查清单:`references/checklist.md`
4. 输出一份 review 报告,包含:
- 总体结论(approve / request changes / comment)
- 必须修改项(blocking)
- 建议改进项(non-blocking)
- 值得肯定的地方
将文件保存为 `$KIMI_CODE_HOME/skills/review-pr/SKILL.md`,未设置 `KIMI_CODE_HOME` 时为 `~/.kimi-code/skills/review-pr/SKILL.md`。检查清单放在同目录的 `references/checklist.md`。重开会话后即可调用,例如 `/skill:review-pr #1234`,其中的参数会展开到 `$pr_ref`。
下一步 [](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
------------------------------------------------------------------------------------------------------------
* [Plugins](https://www.kimi.com/code/docs/kimi-code-cli/customization/plugins.html)
— 把 Skills 打包成可安装单元,与团队共享
* [Agent 与 subagent](https://www.kimi.com/code/docs/kimi-code-cli/customization/agents.html)
— Skills 如何影响 subagent 的行为
---
# kimi 命令 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#VPContent)
Return to top
kimi 命令 [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-%E5%91%BD%E4%BB%A4)
==============================================================================================================
`kimi` 是 Kimi Code CLI 的主命令,用于在终端中启动一次交互式会话。不带任何参数运行时,它会在当前工作目录下开启一个新会话;配合不同的 flag,可以续上历史会话、跳过审批、从 Plan 模式开始,或者指定自定义的 Skills 目录。
sh
kimi [options]
kimi [options]
主命令选项 [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#%E4%B8%BB%E5%91%BD%E4%BB%A4%E9%80%89%E9%A1%B9)
----------------------------------------------------------------------------------------------------------------------------------
所有 flag 都是可选的,直接运行 `kimi` 即可进入交互式会话:
| 选项 | 简写 | 说明 |
| --- | --- | --- |
| `--version` | `-V` | 打印版本号并退出 |
| `--help` | `-h` | 显示帮助信息并退出 |
| `--session [id]` | `-S` | 恢复一个会话。带 ID 时直接打开指定会话;不带 ID 时进入交互式选择器 |
| `--continue` | `-c` | 继续当前工作目录下最近一次的会话,无需手动指定 ID |
| `--model ` | `-m` | 为本次启动指定模型别名。省略时新会话使用配置文件中的 `default_model` |
| `--prompt ` | `-p` | 非交互执行单次 prompt,并把 Assistant 输出流式写到 stdout。该模式不会打开 TUI |
| `--output-format ` | | 设置非交互输出格式,支持 `text` 与 `stream-json`。仅可与 `--prompt` 一起使用,默认 `text` |
| `--yolo` | `-y` | 以 "Ask When Needed" 模式启动:常规修改和命令自动完成;高危操作、提问和计划仍会问你 |
| `--auto` | | 以 "Never Ask" 模式启动:完全不打断,所有操作和判断自动完成 |
| `--plan` | | 以 Plan 模式启动新会话,AI 会优先使用只读工具进行探索和规划 |
| `--skills-dir ` | | 从指定目录加载 Skills,替换自动发现的用户和项目目录。可重复传入 |
| `--agent ` | | 以指定 Agent 作为 main agent 启动新会话。不能与 `--session`/`--continue` 同时使用 |
| `--agent-file ` | | 从 Markdown 文件加载自定义 Agent 并为新会话选中它。不可重复传入,也不能与 `--agent`、`--session` 或 `--continue` 同时使用 |
| `--add-dir ` | | 为本次会话添加额外的工作目录。相对路径按当前工作目录解析。可重复传入 |
`-r` / `--resume` 是 `--session` 的隐藏别名;`--yes` 和 `--auto-approve` 是 `--yolo` 的隐藏别名,在帮助信息中不显示。
注意
`--yolo` 会跳过普通工具调用的人工确认,包括文件写入和 Shell 命令执行,请只在受信任的工作目录下使用。Plan 模式的退出审批不会被 `--yolo` 跳过;Plan 模式下的 `Bash` 按普通放行规则处理。
### flag 冲突规则 [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#flag-%E5%86%B2%E7%AA%81%E8%A7%84%E5%88%99)
以下组合会在启动时被拒绝:
* `--continue` 与 `--session` 互斥——两者都表示"恢复历史会话"
* `--yolo` 和 `--auto` 互斥——两种权限模式互斥
* `--prompt` 不能与 `--yolo`、`--auto` 或 `--plan` 同时使用——非交互模式固定使用 `auto` 权限
* `--output-format` 只能与 `--prompt` 一起使用
恢复会话时,可以通过 `--auto`、`--yolo` 或 `--plan` 覆盖原会话保存的权限或计划模式。例如,`kimi --continue --auto` 会恢复最近会话并切换到 "Never Ask" 模式。
典型用法 [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#%E5%85%B8%E5%9E%8B%E7%94%A8%E6%B3%95)
------------------------------------------------------------------------------------------------------------------------
直接运行开启新会话:
sh
kimi
从上次中断的地方继续(自动找到当前目录最近的会话):
sh
kimi --continue
从历史会话列表中挑选,或直接指定已知 ID:
sh
kimi --session
kimi --session 01HZ...XYZ
跳过审批确认,适合已知安全的批处理任务:
sh
kimi --yolo
让 Agent 自行处理一切,不再向用户提问:
sh
kimi --auto
先阅读代码、产出实现计划,而不是立刻动手修改文件:
sh
kimi --plan
### 自定义 Skills 目录 [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#%E8%87%AA%E5%AE%9A%E4%B9%89-skills-%E7%9B%AE%E5%BD%95)
有两种方式指定 Skills 目录,语义不同:
* **`--skills-dir `**(CLI flag):**替换**自动发现的用户和项目目录,仅对本次启动生效。可重复传入以叠加多个目录:
sh
kimi --skills-dir /path/to/team-skills --skills-dir ./local-skills
* **`extra_skill_dirs`**(`config.toml`):**叠加**到自动发现的目录之上,长期生效,适合配置团队共享 Skills。详见 [Agent Skills](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html)
。
### 自定义 Agent [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#%E8%87%AA%E5%AE%9A%E4%B9%89-agent)
`--agent` 和 `--agent-file` 用于选择驱动新会话的 Agent,在 print 模式(`kimi -p`)和交互式 TUI 中均可使用:
sh
kimi --agent reviewer
kimi -p --agent reviewer "审查这个分支上的改动"
`--agent-file` 以最高优先级注册单个 Agent 文件(仅本次启动)并选中它;该 flag 不可重复传入,`--agent` 与 `--agent-file` 互斥。两个 flag 都仅在新建会话时有效——都不能与 `--session`/`--continue` 组合,因为 Agent 在会话创建时绑定,恢复会话时会自动还原已绑定的 Agent。选择在会话首次绑定后即固定,之后不可切换;在 TUI 中,这些 flag 只绑定启动时的会话,之后在同一进程内新建的会话(例如通过 `/new`)使用默认 Agent。Agent 文件格式与发现目录详见 [Agent 与 subagent](https://www.kimi.com/code/docs/kimi-code-cli/customization/agents.html#%E8%87%AA%E5%AE%9A%E4%B9%89-agent)
。
非交互执行 [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#%E9%9D%9E%E4%BA%A4%E4%BA%92%E6%89%A7%E8%A1%8C)
----------------------------------------------------------------------------------------------------------------------------------
在脚本或 CI 中运行单次 prompt 时,使用 `-p`:
sh
kimi -p "Summarize the current repository status"
输出采用 transcript 样式:thinking 内容和 Assistant 正文都以 `•` 开头,换行后两个空格缩进。Assistant 正文输出到 stdout;thinking、工具进度和"恢复会话"提示输出到 stderr。`-p` 模式不会请求人工审批,普通工具调用按 `auto` 权限策略处理,静态 deny 规则仍然生效。
临时切换模型:
sh
kimi -m kimi-code/kimi-for-coding -p "Explain the latest diff"
需要结构化读取输出时,使用 `stream-json` 格式——stdout 每行都是一个 JSON 对象:
sh
kimi -p "List changed files" --output-format stream-json
`stream-json` 模式下,普通回复输出 Assistant 消息;模型调用工具时,先输出带 `tool_calls` 的 Assistant 消息,再输出对应的 Tool 消息,最后继续输出后续 Assistant 消息。thinking 内容不会写入 JSONL;工具进度和恢复会话提示仍写到 stderr。
子命令 [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#%E5%AD%90%E5%91%BD%E4%BB%A4)
--------------------------------------------------------------------------------------------------------------
`kimi` 提供以下子命令:`login`(非交互式登录)、`acp`(ACP IDE 模式)、`web`(前台运行本地 REST/WebSocket/web 服务并打开 web UI)、`doctor`(校验配置文件)、`export`(导出会话)、`migrate`(迁移旧版数据)、`upgrade`(检查更新)、`provider`(管理供应商)。
### `kimi login` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-login)
通过 RFC 8628 device-code 流程登录 Kimi Code OAuth,无需进入 TUI。命令会发起一次 device authorization 请求,将验证地址和用户码打印到 stderr,然后轮询直到浏览器侧完成授权。生成的 token 写入与 TUI `/login` 相同的本地位置,下次启动 `kimi` 时会自动加载。
sh
kimi login
该子命令没有任何 flag。在轮询期间随时按 `Ctrl-C` 可取消登录;取消或失败时退出码为 `1`,成功为 `0`。
### `kimi acp` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-acp)
把 Kimi Code CLI 切换到 ACP(Agent Client Protocol)模式,在标准输入/输出上以 JSON-RPC 形式与 IDE 对话,让编辑器直接驱动 kimi 的会话和工具调用。通常不需要手动运行——IDE 会把它作为子进程入口启动。配置方式见[在 IDE 中使用](https://www.kimi.com/code/docs/kimi-code-cli/guides/ides.html)
,技术细节见 [kimi acp 参考](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-acp.html)
。
sh
kimi acp
### `kimi web` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-web)
在当前终端前台运行本地 Kimi 服务 —— 同一个进程同时挂载 REST + WebSocket API 与 web UI —— 并在服务就绪后用默认浏览器打开 web UI。命令会一直挂在终端,直到收到 `SIGINT` / `SIGTERM`(如 `Ctrl-C`)时干净退出。
服务运行时,`GET /openapi.json` 会返回 REST OpenAPI 文档,`GET /asyncapi.json` 会返回本地 WebSocket 协议的 AsyncAPI 文档。用 API 驱动会话的完整流程见[服务 API:用 API 驱动一个会话](https://www.kimi.com/code/docs/kimi-code-cli/reference/server-api.html#%E7%94%A8-api-%E9%A9%B1%E5%8A%A8%E4%B8%80%E4%B8%AA%E4%BC%9A%E8%AF%9D)
,协议细节见[服务 API](https://www.kimi.com/code/docs/kimi-code-cli/reference/server-api.html)
。
sh
kimi web # 前台运行服务并打开浏览器
kimi web --no-open # 不打开浏览器
kimi web --port 58628 # 指定绑定端口
同一 home 目录下可以同时运行多个实例:每个实例注册到 `~/.kimi-code/server/instances/`,端口被占用时自动 +1 重试(58628、58629……)。
| 选项 | 说明 |
| --- | --- |
| `--port ` | 绑定端口;默认 `58627`;被占用时自动 +1 重试 |
| `--host [host]` | 绑定地址;缺省 `127.0.0.1`(仅本机),裸 `--host` 绑 `0.0.0.0`(所有网卡) |
| `--allowed-host ` | DNS 重绑定检查额外允许的 Host 头,可重复或逗号分隔 |
| `--log-level ` | 按所选级别开启服务日志;默认不输出 |
| `--debug-endpoints` | 挂载 `/api/v1/debug/*` 调试路由(默认关闭) |
| `--dangerous-bypass-auth` | 关闭所有 REST 与 WebSocket 路由的 bearer token 鉴权,使 web UI 无需 token 即可连接;仅用于可信网络或自有鉴权代理之后 |
| `--web-title ` | 自定义 web UI 的浏览器标签页标题;默认为工作区目录名 |
| `--no-open` | 就绪后不自动打开浏览器 |
`kimi web` 默认只绑定本机 loopback 地址,并在启动横幅中打印 bearer token;web UI 通过 URL 的 `#token=` 片段自动完成鉴权。
提示
`kimi server` 命令树已废弃:任何 `kimi server …` 调用(含全部旧子命令)只会打印弃用提示并以退出码 1 结束,请改用 `kimi web`。唯一的例外是 `kimi server kill`,它仍然可用,仅用于停止 0.28.0 之前版本启动的服务。该提示将在 Kimi Code 下个大版本移除。
警告
`--dangerous-bypass-auth` 会彻底关闭鉴权。任何能访问该端口的人都能完全控制你的会话、文件系统和 shell。请仅在可信网络或自有鉴权反向代理之后使用,用完后按 `Ctrl+C` 停止服务。
#### `kimi server kill` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-server-kill)
已废弃——仅用于停止 0.28.0 之前的 Kimi Code 版本启动的服务。那些版本可能在后台遗留服务进程,记录在 legacy 单实例锁文件 `~/.kimi-code/server/lock` 中;该命令先请求 `POST /api/v1/shutdown` 优雅退出,再对锁中记录的 pid 发 SIGTERM、必要时升级为 SIGKILL,并在确认进程退出后删除锁文件。`kimi web` 启动的服务在前台运行,直接用 `Ctrl+C` 停止即可。
#### `kimi web rotate-token` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-web-rotate-token)
生成新的持久化 bearer token(写入 `~/.kimi-code/server.token`),旧 token 立即失效。token 是整个 home 目录共享的,所有运行中的实例会在下一次鉴权校验时自动换用新 token,无需重启。
### `kimi install-desktop` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-install-desktop)
打印 Kimi Code 桌面端页面地址并在默认浏览器中打开,无需离开终端即可下载并安装桌面端应用。页面地址随当前区域而定:国内区域为 `https://www.kimi.com/code`,全球区域为 `https://www.kimi.ai/code`。
sh
kimi install-desktop
该子命令没有任何选项。旧名称 `kimi install-app` 仍可作为隐藏别名使用。在 TUI 中也可以通过斜杠命令 `/desktop`(别名 `/install-desktop`)打开同一页面。
### `kimi doctor` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-doctor)
校验 `config.toml` 和 `tui.toml`,不会启动 TUI,也不会修改任一文件。默认检查 `KIMI_CODE_HOME` 下的文件;未设置该环境变量时检查 `~/.kimi-code`。默认路径缺失时会显示为跳过,因为内置默认值仍可生效。
sh
kimi doctor
| 命令 | 说明 |
| --- | --- |
| `kimi doctor` | 校验默认 `config.toml` 和 `tui.toml` |
| `kimi doctor config [path]` | 只校验 `config.toml`;传入 `path` 时使用该文件而不是默认文件 |
| `kimi doctor tui [path]` | 只校验 `tui.toml`;传入 `path` 时使用该文件而不是默认文件 |
显式传入路径时,文件必须存在。所有被检查的文件都有效或被跳过时,退出码为 `0`;任何指定文件缺失或配置无效时,退出码为 `1`。
sh
# 检查默认配置文件
kimi doctor
# 只检查默认运行时配置
kimi doctor config
# 替换正式 TUI 配置前,先检查候选文件
kimi doctor tui ./tui.toml
### `kimi export` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-export)
把一个会话打包成 ZIP 文件,便于分享、归档或提交问题反馈。
sh
kimi export [sessionId] [options]
| 参数 / 选项 | 简写 | 说明 |
| --- | --- | --- |
| `sessionId` | | 要导出的会话 ID。省略时自动选择当前工作目录下最近一次的会话,并要求确认 |
| `--output ` | `-o` | 输出 ZIP 文件路径。省略时写入当前目录下的默认文件名 |
| `--yes` | `-y` | 跳过默认会话的确认提示,直接导出 |
| `--no-include-global-log` | | 不打包全局诊断日志。默认包含 |
导出包含目标会话目录内的所有文件。全局诊断日志(`~/.kimi-code/logs/kimi-code.log`)默认包含,因为它可能含有其他会话或项目的事件;不想分享时加 `--no-include-global-log`。
sh
# 导出当前工作目录最近一次会话,跳过确认
kimi export -y
# 导出指定会话到自定义路径
kimi export 01HZ...XYZ -o ./bug-report.zip
# 排除全局诊断日志
kimi export 01HZ...XYZ -o ./bug-report.zip --no-include-global-log
### `kimi migrate` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-migrate)
将旧版 kimi-cli 的本地数据迁移到 kimi-code,包括历史会话和配置文件。纯交互式运行,会引导你完成全流程。
sh
kimi migrate
完整迁移说明见[从 kimi-cli 迁移](https://www.kimi.com/code/docs/kimi-code-cli/guides/migration.html)
。
### `kimi upgrade` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-upgrade)
立即检查最新版本并展示更新提示,选择操作后退出。也可以使用别名 `kimi update`。
sh
kimi upgrade [-y]
对全局 npm、pnpm、yarn、bun 安装,`kimi upgrade` 会展示更新选项;选择 `Install update now` 后运行对应的前台安装命令。对 native 安装(含 Windows),会在前台下载并校验新二进制,并在下次启动时替换生效。当前安装方式无法自动升级时,改为打印手动更新命令。传入 `-y, --yes` 可跳过确认提示,直接安装更新。
### `kimi vis` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-vis)
在浏览器中启动会话可视化工具,直观查看一次会话的全过程。命令会启动一个指向本地会话的进程内服务器,打印访问地址并打开浏览器,持续运行直到你按下 `Ctrl-C`。
sh
kimi vis [sessionId] [options]
| 参数 / 选项 | 说明 |
| --- | --- |
| `sessionId` | 直接打开指定会话的可视化页面。省略时打开列出所有会话的首页 |
| `--port ` | 绑定的端口。默认自动挑选一个空闲端口 |
| `--host ` | 绑定的主机。默认 `127.0.0.1` |
| `--no-open` | 不自动打开浏览器,仅打印访问地址 |
sh
# 启动可视化工具并在浏览器中打开首页
kimi vis
# 直接打开指定会话
kimi vis 01HZ...XYZ
# 绑定固定主机和端口且不打开浏览器(例如在远程主机上)
kimi vis --host 0.0.0.0 --port 8123 --no-open
### `kimi provider` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-provider)
在 shell 中管理供应商,相当于 TUI 中 `/provider` 的非交互版本。适合脚本化部署、CI 初始化,以及在新机器上一行完成配置。
sh
kimi provider [options]
包含五个动作:
#### `kimi provider add ` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-provider-add-url)
从自定义 registry(`api.json`)批量导入所有供应商。命令会拉取 registry,为每个条目创建 `[providers.]` 和 `[models.]`,并写入 `source` 元数据,使 TUI 下次启动时自动刷新同一 registry 地址下的供应商和模型。当 registry 条目声明了 `env` 字段时,命令会打印一条提示,指明声明的变量名——想用就在 `config.toml` 里设置 `api_key_env`,详见[平台与模型](https://www.kimi.com/code/docs/kimi-code-cli/configuration/providers.html)
。
| 参数 / 选项 | 说明 |
| --- | --- |
| `` | Registry 地址 |
| `--api-key ` | 访问 registry 时携带的 Bearer token。未传时回退到环境变量 `KIMI_REGISTRY_API_KEY`;可选,两者都不传即可导入公开 registry |
sh
kimi provider add https://registry.example.com/v1/models/api.json --api-key YOUR_KEY
# 或通过环境变量(适合 CI / .envrc)
KIMI_REGISTRY_API_KEY=YOUR_KEY kimi provider add https://registry.example.com/v1/models/api.json
# 公开 registry:无需密钥
kimi provider add https://registry.example.com/v1/models/api.json
如果某个 provider id 已存在,会先删除再重新写入。不会自动设置默认模型,后续可用 `-m` 或 TUI 内的 `/model` 选择。
#### `kimi provider remove ` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-provider-remove-providerid)
删除指定供应商及其所有模型 alias。如果被删除的供应商正好是 `default_model` 所属,则同时清空 `default_model`。
sh
kimi provider remove kohub
#### `kimi provider list` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-provider-list)
按行打印每个已配置的供应商,含类型、模型数量、来源。加 `--json` 可输出原始的 `providers` 和 `models` 表,便于程序化处理。
sh
kimi provider list
kimi provider list --json | jq '.providers | keys'
#### `kimi provider catalog list [providerId]` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-provider-catalog-list-providerid)
在不修改任何配置的情况下浏览公开的 [models.dev](https://models.dev/)
模型目录。不传参数时列出所有供应商及协议类型和模型数量;传 `providerId` 时列出该供应商下所有模型的上下文窗口和能力。目录地址不可达时会使用内置目录快照。
| 参数 / 选项 | 说明 |
| --- | --- |
| `[providerId]` | 可选,要查看的供应商 id |
| `--filter ` | 按 id 或 name 大小写不敏感子串过滤 |
| `--url ` | 覆盖 catalog 地址,默认 `https://models.dev/api.json` |
| `--json` | 以 JSON 形式输出匹配片段 |
sh
kimi provider catalog list
kimi provider catalog list --filter anthropic
kimi provider catalog list anthropic
#### `kimi provider catalog add ` [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#kimi-provider-catalog-add-providerid)
按 id 从 catalog 直接导入一个已知供应商,协议类型、base URL、模型信息均由 catalog 提供,只需提供 API key。catalog 未声明协议的供应商(如 xai、openrouter 这类厂商专用 SDK)按 OpenAI 兼容协议导入,并在输出中标注 "guessed";catalog 未提供可用端点时需用 `--base-url` 显式指定。专有协议(如 Amazon Bedrock)无法导入。公共目录不可达时会回退到内置目录快照,离线或网络受限环境下也能导入。
| 参数 / 选项 | 说明 |
| --- | --- |
| `` | catalog 中的供应商 id,如 `anthropic`、`openai` |
| `--api-key ` | 供应商 API key。未传时回退到 `KIMI_REGISTRY_API_KEY`,必填 |
| `--default-model ` | 可选,导入后把 `default_model` 设为 `/` |
| `--base-url ` | 覆盖 catalog 声明的端点;catalog 未提供端点(或仅有环境变量占位符)时必填 |
| `--url ` | 覆盖 catalog 地址,默认 `https://models.dev/api.json` |
sh
kimi provider catalog list anthropic # 先看可选的模型
kimi provider catalog add anthropic --api-key sk-ant-... --default-model claude-opus-4-7
下一步 [](https://www.kimi.com/code/docs/kimi-code-cli/reference/kimi-command.html#%E4%B8%8B%E4%B8%80%E6%AD%A5)
--------------------------------------------------------------------------------------------------------------
* [斜杠命令](https://www.kimi.com/code/docs/kimi-code-cli/reference/slash-commands.html)
— 交互式 TUI 内的控制命令速查
* [配置文件](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html)
— `default_model`、权限模式等启动参数的持久化配置
* [Agent Skills](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html)
— `--skills-dir` 加载的 Skill 文件格式
* [Agent 与 subagent](https://www.kimi.com/code/docs/kimi-code-cli/customization/agents.html)
— 内置 subagent、自定义 Agent 文件与通过 `--agent` 选择 main agent
---
# 配置文件 | Kimi Code 文档
[Skip to content](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#VPContent)
Return to top
配置文件 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6)
============================================================================================================================
Kimi Code CLI 的长期偏好都写在 `~/.kimi-code/` 下的 TOML 文件里:运行时设置放 `config.toml`,终端界面偏好放配套的 `tui.toml`。
配置文件位置 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E4%BD%8D%E7%BD%AE)
------------------------------------------------------------------------------------------------------------------------------------------------
CLI 从 `~/.kimi-code/config.toml` 读取配置,首次运行时自动创建。如需把数据目录迁移到别处,可用 `KIMI_CODE_HOME` 环境变量覆盖:
sh
export KIMI_CODE_HOME=/path/to/kimi-home
此时配置文件路径变为 `$KIMI_CODE_HOME/config.toml`。无论目录在哪里,文件名固定是 `config.toml`。
TIP
TOML 字段名一律用下划线(snake\_case),如 `default_model`、`max_context_size`。字段名里若含 `.`,需用引号包住,例如 `[models."gpt-4.1"]`;否则 TOML 会把 `.` 解释为嵌套表分隔符。
完整示例 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#%E5%AE%8C%E6%95%B4%E7%A4%BA%E4%BE%8B)
----------------------------------------------------------------------------------------------------------------------------
以下示例覆盖最常用的配置项,可直接复制后按需修改:
toml
default_model = "kimi-code/k3"
default_permission_mode = "manual"
default_plan_mode = false
merge_all_available_skills = true
telemetry = true
[providers."managed:kimi-code"]
type = "kimi"
base_url = "https://api.kimi.com/coding/v1"
api_key = ""
[models."kimi-code/k3"]
provider = "managed:kimi-code"
model = "k3"
max_context_size = 1048576
capabilities = [ "thinking", "always_thinking", "image_in", "video_in", "tool_use" ]
display_name = "K3"
support_efforts = [ "low", "high", "max" ]
default_effort = "max"
[models."kimi-code/kimi-for-coding"]
provider = "managed:kimi-code"
model = "kimi-for-coding"
max_context_size = 262144
capabilities = [ "thinking", "always_thinking", "image_in", "video_in", "tool_use" ]
[models."kimi-code/kimi-for-coding-highspeed"]
provider = "managed:kimi-code"
model = "kimi-for-coding-highspeed"
max_context_size = 262144
capabilities = [ "thinking", "always_thinking", "image_in", "video_in", "tool_use" ]
[thinking]
enabled = true
effort = "high"
keep = "all"
[loop_control]
max_attempts_per_step = 10
reserved_context_size = 50000
[background]
max_running_tasks = 4
keep_alive_on_exit = false
[services.moonshot_search]
base_url = "https://api.kimi.com/coding/v1/search"
api_key = ""
[services.moonshot_fetch]
base_url = "https://api.kimi.com/coding/v1/fetch"
api_key = ""
[[permission.rules]]
decision = "allow"
pattern = "Read"
[[permission.rules]]
decision = "deny"
pattern = "Bash(rm -rf*)"
[[hooks]]
event = "PreToolUse"
matcher = "Bash"
command = "node ~/.kimi-code/hooks/check-bash.mjs"
timeout = 5
顶层字段 [](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#%E9%A1%B6%E5%B1%82%E5%AD%97%E6%AE%B5)
----------------------------------------------------------------------------------------------------------------------------
配置文件里的字段分两类:**顶层标量**直接控制默认行为,**嵌套表**(`providers`、`models`、`thinking` 等)各有独立结构,在下文各节单独说明。
| 字段 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| `default_model` | `string` | — | 默认模型别名,必须在 `models` 中定义 |
| `default_permission_mode` | `string` | `manual` | 新会话的默认权限模式,可选 `yolo` / `auto`,见 [交互与权限](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#%E4%B8%89%E7%A7%8D%E6%9D%83%E9%99%90%E6%A8%A1%E5%BC%8F) |
| `default_plan_mode` | `boolean` | `false` | 新会话是否默认以 [Plan 模式](https://www.kimi.com/code/docs/kimi-code-cli/guides/interaction.html#plan-%E6%A8%A1%E5%BC%8F) 启动 |
| `merge_all_available_skills` | `boolean` | `true` | 是否合并所有目录中的 Agent Skills |
| `extra_skill_dirs` | `array` | — | 额外 Skill 搜索目录,叠加到默认目录之上 |
| `extra_agent_dirs` | `array` | — | 额外自定义 Agent 搜索目录,叠加到默认目录之上 |
| `builtin_product_skills` | `boolean` | `true` | 是否向模型提供介绍 Kimi Code 自身的内置 Skills |
| `telemetry` | `boolean` | `true` | 是否启用匿名遥测;显式设为 `false` 时关闭 |
| `auto_session_title` | `boolean` | `true` | 是否允许客户端自动生成会话标题;显式设为 `false` 时关闭 |
| [`providers`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#providers) | `table` | `{}` | API 供应商表 |
| [`models`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#models) | `table` | — | 模型别名表 |
| [`thinking`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#thinking) | `table` | — | Thinking 模式默认参数 |
| [`loop_control`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#loop-control) | `table` | — | Agent 循环控制参数 |
| [`background`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#background) | `table` | — | 后台任务运行参数 |
| [`tools`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#tools) | `table` | — | 全局工具开关 |
| [`image`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#image) | `table` | — | 图片压缩参数 |
| [`services`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#services) | `table` | — | 内置外部服务配置 |
| [`permission`](https://www.kimi.com/code/docs/kimi-code-cli/configuration/config-files.html#permission) | `table` | — | 初始权限规则 |
| [`hooks`](https://www.kimi.com/code/docs/kimi-code-cli/customization/hooks.html) | `array