version v7.2.
For up-to-date documentation, see the
latest version.
Code Companion - Modes
3 minute read
Modes in Code Companion
Code Companion offers multiple modes for working with your code and interacting with the AI and tools, each for distinct workflows and safety levels. The main modes are Plan, Chat , and Agent.
Plan Mode
Plan Mode is designed for safe, read-only exploration and analysis of your codebase. It restricts the system to non-destructive actions, allowing you to search, read, and analyze code without making changes.
- Only read-only tools are accessible (e.g., read file, search, fetch).
- Ideal for safely exploring unfamiliar projects or planning changes.
- No file modifications or command execution is allowed.
- See Plan Mode documentation for a detailed list of tools and workflows.
Agent Mode
Agent Mode enables full automation and tool usage, allowing the AI to perform actions in your development environment beyond simple code suggestions.
- Supports both read-only and write/execute tools (e.g., create/edit files, run commands).
- The AI can request tool calls, and you can review/approve them before execution.
- Suitable for automating development tasks, codebase modifications, or integrating with external systems.
- For in-depth details, see Agent Mode documentation .
Chat & Edit Modes
You can still use the familiar chat and edit modes from previous versions, providing a conversational interface for interacting with AI in your IDE. Use it to ask questions, review suggestions, or brainstorm ideas about your code and development tasks.
- See chat documentation for more information
Chat Mode (Conversation)
- Accessible from the IDE sidebar.
- Uses selected code, the current file, and conversation history as context.
- Sends your input and context to the AI model; responses are streamed back.
- Code blocks in responses have action buttons:
- Apply to current file
- Insert at cursor
- Copy
- No built-in tools are available in Chat mode.
- Shortcuts:
- VS Code:
Cmd/Ctrl + L - JetBrains:
Cmd/Ctrl + J
- VS Code:
Edit Mode (Inline Code Editing)
Makes inline code changes in your editor via the same conversational AI model.
Uses your highlighted code and the entire current file as context.
Streams the model’s response as a diff directly into the highlighted range.
Accepting the diff applies the changes; rejecting keeps the original code.
Shortcut:
Cmd/Ctrl + I(after selecting code)See edit documentation for more information
Model Configuration
- Both modes use the same chat model by default.
- You can configure a separate model for Edit mode if needed.
Edit Workflow
- Highlight code in your file.
- Trigger Edit Mode (
Cmd/Ctrl + I). - The model receives the highlighted code, the file contents, and your instructions.
- The response is streamed as a diff in your editor.
- Accept or reject the proposed changes.
| Mode | Trigger | Context Used | Output Type |
|---|---|---|---|
| Chat | Cmd/Ctrl + L or J | Selection, file, history | Suggestions, code |
| Edit | Cmd/Ctrl + I | Highlight, full file | Diff, direct edits |
Mode Overview
| Mode | Tool Access | Typical Use | Reference |
|---|---|---|---|
| Plan | Read-only | Safe exploration & planning | Plan Mode |
| Chat | No tools | Conversation & code suggestions; inline edits (Edit Mode) | (this page) |
| Agent | All (read/write) | Automation & codebase modifications | Agent Mode |
For more details on available tools, see Built-in Tools .