Composer
AI coding assistant that helps write and edit code directly in your editor with chat and agent modes
Composer is your AI coding assistant that lives in your editor. It helps you explore code, write new features, and modify existing code without leaving your workflow. Use ⌘I
to open it, and ⌘N
to create a new Composer.
Modes
Composer can be used in two different modes
Normal
Read and writes code. Usually faster. Works with all models
Agent
Reasonning capabilities and access to tools to call MCP servers, run terminal commands and manage code
Context
You can use @-symbols to include relevant context in your prompts
Generating & Applying Changes
When Composer suggests changes:
- Review them in the diff view
- Accept or reject changes with the buttons provided
- Use checkpoints to undo if needed
Checkpoints
For every iteration a checkpoint is created. You can return to any previous version by clicking on checkout
near that checkpoint. This is handy if you don’t like the current changes and want to revert to an earlier state.
History
Access previous Composer sessions and chats through the history. Open it from the history icon to the right of Cursor Tab. You’ll see a list of past composers and chats, which you can revisit, rename, or remove.
Open with ⌘+⌥+L
or Ctrl+Alt+L
when Composer is focused.
Layout
- Pane: A sidebar with chat on the left and your code editor on the right.
- Editor: A single editor window, similar to viewing code normally. You can move it around, split it, or even place it in a separate window.
- Floating: A draggable window that you can position where you like
You can change this from the Composer menu > Open as [layout]
Iterate on lints
Composer attempts to fix linting issues in generated code for most programming languages. If Composer detects lint errors, it will try to fix them automatically when this feature is enabled. Currently, only one iteration is supported.
Some languages (like Rust) require files to be saved before lint errors appear, which may limit this feature’s effectiveness in all languages.
FAQ
What’s the difference between Chat and Composer?
Chat helps you search and understand your code. Use it to explore your codebase, ask questions, and get explanations. You can search your code with ⌘⏎
.
Composer helps you write and edit code. It provides a workspace where you can generate new code and apply changes directly to your files.
How are long conversations handled?
For long conversations, Cursor summarize earlier messages with smaller models like cursor-small
and gpt-4o-mini
to keep responses fast and relevant.
This approach helps ensure that even extended conversations remain responsive and coherent, without losing track of key details from earlier exchanges.
Can I access my Composer history on another computer?
Composer history is stored locally on your computer and is not stored on Cursor’s servers or tied to your Cursor account.
This means if you switch to a different computer, you won’t have access to your previous Composer history. You can only access your Composer history on the computer where it was originally created.