[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3

Agent Mode Deep Dive

🤖 Composer & Agent Mode 20 min 400 BASE XP⌨ HANDS-ON LAB

Autonomous Coding Agent

The Agent (default mode of the side pane) turns Cursor from an editor into an autonomous coding agent. It follows a reasoning + action loop:

  1. Analyze: Reads your codebase to understand architecture
  2. Plan: Determines which files need changes
  3. Execute: Creates/modifies files and runs commands
  4. Verify: Runs tests or checks for errors
  5. Iterate: If errors occur, it reads the output and fixes them

The Agent's Toolbox

Cursor's agent ships with a full set of tools — and there's no limit on how many tool calls it can make in a session:

ToolWhat It Does
SearchSemantic codebase search plus exact grep matching
Read & EditRead files (including images) and make precise edits
ShellRun terminal commands — install deps, run tests, git operations
WebSearch the web and fetch pages for up-to-date docs
BrowserControl a browser to test and verify UI changes
Image generationGenerate image assets, saved into your project's assets folder
Ask questionsPause and ask you for clarification when requirements are ambiguous

Auto-Run & the Sandbox

What veterans knew as "YOLO Mode" has matured into auto-run with sandboxing. The agent can execute commands without prompting when they run inside Cursor's sandbox; risky or out-of-sandbox operations still require your approval, and an auto-review classifier flags dangerous shell, MCP, and fetch calls before they execute. In the CLI, toggle with /sandbox or the --sandbox enabled|disabled flag.

Scaling Up: The Agents Window

Need more than one agent? Open the Agents Window (Command Palette → "Open Agents Window") — a dedicated multi-agent dashboard where you run parallel agents across multiple workspaces, review diffs, manage PRs, and hand tasks off between your machine and the cloud. Git worktrees give each agent an isolated checkout so parallel work never collides.

Pro Tip: Prefix any prompt with & to hand the task straight to a Cloud Agent — it keeps running after you close the editor. More in the Cloud Agents module.
⌨ HANDS-ON LABManage Agent Sessions Like a Pro
⭐ +150 XP

Yesterday's refactor session got interrupted. Use the Cursor Agent CLI to pick a model explicitly, list previous conversations, and resume where you left off.

1Start an agent run with an explicit model using the --model flag.
2List your previous agent conversations.
3Resume the most recent conversation to continue with full context.
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 3 — type "hint" if stuck
SYNAPSE VERIFICATION
QUERY 1 // 3
How does modern Cursor handle command execution safety (formerly 'YOLO Mode')?
All commands always require approval
Auto-run inside a sandbox, with approval and an auto-review classifier for risky operations
Commands are disabled entirely
Only git commands can run
Agent Mode Deep Dive Tutorial | Composer & Agent Mode — Cursor Academy