Overview
A developer’s guide to Composer
Welcome to Composer
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.
Agent
Enable Agent with ⌘.
to get a coding partner that proactively works with your codebase:
- Automatically pull relevant context (try
@Recommended
) - Run terminal commands
- Create and modify files
- Search code semantically
- Execute file operations
Agent can make up to 25 tool calls before stopping. If you need more, let us know at hi@cursor.com!
For now, Agent supports only Claude models.
Each tool operation counts as a separate request toward your quota.
Normal
Normal mode provides core features for code exploration and generation:
- Search through your codebase and documentation
- Use web search
- Create and write files
- Access expanded
@
-symbol commands
Working with Context
Type @
to see context options based on your current work. Navigate with arrow keys, select with Enter, and filter by typing after @
. Use Ctrl/⌘ M
to switch file reading methods. @Recommended
in Agent automatically pulls relevant context.
#
File Selection
Use #
followed by a filename to focus on specific files. Combine this with @
symbols for precise context control.
Context Pills
Pills at the top of your chat show active context. Add or remove pills to adjust what Composer sees. Use #
to select files, which then appear as pills.
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
Every time you generate code, Composer creates a checkpoint. 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
Composer offers two layout modes:
- 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.
Beta Features
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?
Cursor 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.