Skip to lesson
Exit
Interactive Agent, Plan and Ask Modes1 / 1

2 min lesson

Ask to diagnose, Plan to spec, Agent to execute

Complete "Ask to diagnose, Plan to spec, Agent to execute". Check the final state against the lesson before you move on.

Check your understanding

Run this practice: Cursor CLI — one interactive session, three modes.

Outcome: A stale session resumes easily but can mislead the model; a fresh agent keeps old context from throwing the run off.

Cursor CLI — one interactive session, three modes
Ask to diagnose, Plan to spec, Agent to execute
Typeagent
DoRun agent from the repository root so the session loads your rules and AGENTS.md.
Type@src/auth why does sign-in fail on expired tokens?
DoStart in Ask modeA read-only mode for asking questions about a codebase without changing files; the safe way to explore unfamiliar or legacy code. Press Enter for the full definition. to diagnose.
SeeAsk is read-only: it reads the files you attached with @ and answers with citations, making no edits.
DoSwitch to Plan modeA mode that makes no edits: it researches the codebase and produces an editable plan you review before any code changes. Press Enter for the full definition. for the fix.
SeePlan does the research and writes a spec before any code, so you review the approach first.
DoSwitch to Agent modeCursor's full-capability mode: the AI can read the codebase, write and edit files, move them and run terminal commands. Contrast with Ask mode, which is read-only. Press Enter for the full definition. to execute the plan.
SeeThe review UI shows the diff, so a terminal run keeps the same verification bar as editor work.
Type/summarize
SeeCompaction condenses the thread and preserves the decisions and open risks before you step away.
DoReach for resume or continue only when the task context still matches; otherwise start a fresh agent.
SeeA stale session resumes easily but can mislead the model; a fresh agent keeps old context from throwing the run off.
Learn more

Optional practice

Practice: Ask to diagnose, Plan to spec, Agent to execute

QYou've applied it. What actually proves the work is done, not just a plausible answer?

Finish the check to continue.