Interaction and Input
Kimi Code CLI provides rich interaction features to help you collaborate efficiently with AI.
Agent and shell mode
Kimi Code CLI has two input modes:
- Agent mode: The default mode, where input is sent to the AI for processing
- Shell mode: Execute shell commands directly without leaving Kimi Code CLI
Press Ctrl-X to switch between the two modes. The current mode is displayed in the bottom status bar.
In shell mode, you can execute commands just like in a regular terminal:
$ ls -la
$ git status
$ npm run buildShell mode also supports some slash commands, including /help, /exit, /version, /editor, /changelog, /feedback, /export, /import, and /task.
Note
In shell mode, each command executes independently. Commands that change the environment like cd or export won't affect subsequent commands.
Plan mode
Plan mode is a read-only planning mode that lets the AI design an implementation plan before writing code, preventing wasted effort in the wrong direction.
In plan mode, the AI can only use read-only tools (Glob, Grep, ReadFile) to explore the codebase — it cannot modify any files or execute commands. The AI writes its plan to a dedicated plan file, then submits it to you for approval. You can approve, reject, or provide revision feedback.
Entering plan mode
There are four ways to enter plan mode:
- CLI flag: Use
kimi --planto start a new session directly in plan mode - Keyboard shortcut: Press
Shift-Tabto toggle plan mode - Slash command: Enter
/planor/plan on - AI-initiated: When facing complex tasks, the AI may request to enter plan mode via the
EnterPlanModetool — you can accept or decline
You can also set default_plan_mode = true in the config file to start every new session in plan mode by default. See Configuration files.
When plan mode is active, the prompt changes to 📋 and a blue plan badge appears in the status bar.
Reviewing plans
When the AI finishes its plan, it submits it for approval via ExitPlanMode. The approval panel shows the full plan content, and you can:
- Approve / select an approach: If the plan contains multiple alternative implementation paths, the AI lists 2–3 labeled options (e.g. "Option A", "Option B (Recommended)") for you to choose from — selecting one exits plan mode and tells the AI which path to follow. If the plan has a single path, an Approve button is shown instead.
- Reject: Decline the plan, stay in plan mode, and provide feedback via conversation
- Reject and Exit: Decline the plan and exit plan mode in one step
- Revise: Enter revision notes — the AI will update the plan and resubmit
Press Ctrl-E to view the full plan content in a fullscreen pager.
Managing plan mode
Use the /plan command to manage plan mode:
/plan: Toggle plan mode/plan on: Enable plan mode/plan off: Disable plan mode/plan view: View the current plan content/plan clear: Clear the current plan file
Thinking mode
Thinking mode allows the AI to think more deeply before responding, suitable for handling complex problems.
You can use the /model command to switch models and thinking mode. After selecting a model, if the model supports thinking mode, the system will ask whether to enable it. You can also enable it at startup with the --thinking flag:
kimi --thinkingTIP
Thinking mode requires support from the current model. Some models (like kimi-k2-thinking-turbo) always use thinking mode and cannot be disabled.
Sending messages while running (steer)
While the AI is executing a task, you can type and send follow-up messages in the input box without waiting for the current turn to finish. This feature is called "steering" and allows you to adjust the AI's direction mid-turn.
Steer messages are appended to the context after the current step completes, and the AI will see and respond to your message before the next step begins. Approval requests and question panels are also handled inline with keyboard navigation during agent execution.
TIP
Steer messages do not interrupt the AI's currently executing step — they are processed between steps. To interrupt immediately, use Ctrl-C.
Background tasks
When the AI needs to run long-running commands (such as building a project, running a test suite, or starting a development server), it can launch them as background tasks. Background tasks run in a separate process, allowing the AI to continue handling other requests without waiting for the command to finish.
How background tasks work:
- The AI uses the
Shelltool withrun_in_background=trueto launch the command - The tool immediately returns a task ID, and the AI continues with other work
- When the task completes, if the AI is idle (waiting for user input), the system automatically triggers a new agent turn to process the results — no manual input needed
You can use the /task slash command to open the interactive task browser, where you can view the status and output of all background tasks in real time (including tasks that are still running). See Slash commands reference for details.
TIP
By default, up to 4 background tasks can run simultaneously. This can be adjusted in the [background] section of the config file. All background tasks are terminated when the CLI exits by default. See Configuration files.
Multi-line input
Sometimes you need to enter multiple lines, such as pasting a code snippet or error log. Press Ctrl-J or Alt-Enter to insert a newline instead of sending the message immediately.
After finishing your input, press Enter to send the complete message.
Clipboard and media paste
Press Ctrl-V to paste text, images, or video files from the clipboard.
In agent mode, longer pasted text (over 1000 characters or 15 lines) is automatically collapsed into a [Pasted text #n] placeholder in the input box to keep the interface clean. The full content is still expanded and sent to the model when submitting. When using an external editor (Ctrl-O), placeholders are automatically expanded to the original text; unmodified portions are re-collapsed after saving.
If the clipboard contains an image, Kimi Code CLI caches the image to disk and displays it as an [image:…] placeholder in the input box. After sending the message, the AI can see and analyze the image. If the clipboard contains a video file, its file path is inserted as text into the input box.
TIP
Image input requires the model to support the image_in capability. Video input requires the video_in capability.
Slash commands
Slash commands are special instructions starting with /, used to execute Kimi Code CLI's built-in features, such as /help, /login, /sessions, etc. After typing /, a list of available commands will automatically appear. For the complete list of slash commands, see the slash commands reference.
@ path completion
When you type @ in a message, Kimi Code CLI will auto-complete file and directory paths in the working directory. This allows you to conveniently reference files in your project:
Check if there are any issues with @src/components/Button.tsxAfter typing @, start entering the filename and matching completions will appear. Press Tab or Enter to select a completion.
Structured questions
During execution, the AI may need you to make choices to determine the next direction. In such cases, the AI will use the AskUserQuestion tool to present structured questions and options.
The question panel displays the question description and available options. You can select using the keyboard:
- Use arrow keys (up / down) to navigate options
- Press
Enterto confirm selection - Press
Spaceto toggle selection in multi-select mode - Select "Other" to enter custom text
- Press
Escto skip the question
Each question supports 2–4 predefined options, and the AI will set appropriate options and descriptions based on the current task context. If there are multiple questions to answer, the panel displays them as tabs — use Left/Right arrow keys or Tab to switch between questions. Answered questions are marked as completed, and switching back to an answered question restores the previous selection.
TIP
The AI only uses this tool when your choice genuinely affects subsequent actions. For decisions that can be inferred from context, the AI will decide on its own and continue execution.
Approvals and confirmations
When the AI needs to perform operations that may have an impact (such as modifying files or running commands), Kimi Code CLI will request your confirmation.
The confirmation prompt will show operation details, including shell command and file diff previews. If the content is long and truncated, you can press Ctrl-E to expand and view the full content. You can choose:
- Allow: Execute this operation
- Allow for this session: Automatically approve similar operations in the current session (this decision is persisted with the session and automatically restored when resuming)
- Reject: Do not execute this operation
- Reject with feedback: Decline the operation and provide written feedback telling the agent how to adjust
If you trust the AI's operations, or you're running Kimi Code CLI in a safe isolated environment, you can enable "YOLO mode" to automatically approve all requests:
# Enable at startup
kimi --yolo
# Or toggle during runtime
/yoloYou can also set default_yolo = true in the config file to enable YOLO mode by default on every startup. See Configuration files.
When YOLO mode is enabled, a yellow YOLO badge appears in the status bar at the bottom. Enter /yolo again to disable it.
Note
YOLO mode skips all confirmations. Make sure you understand the potential risks. It's recommended to only use this in controlled environments.