WhoBuilt

Cursor: coding agents tutorial (2026)

Apr 15, 2026· 32 min· 96K views·Watch on YouTube

Lee Robinson, Cursor educator at Cursor, explains how developers can use Cursor’s coding agents to understand codebases, build features, debug, review, and customize their workflow.

Prompt well and manage context

Cursor’s agent harness combines instructions, tools, and a model. More specific prompts that refer to codebase patterns or include logs can improve results. Start a fresh conversation for a new feature or when the agent goes off track, and include known relevant files when useful.

Search and understand the codebase

Cursor agents use exact search, Instant Grep, and semantic search to find relevant code. The Explore subagent can search in its own context window and return findings without filling the main conversation with search details. For unfamiliar projects, ask for an architecture diagram, and understand existing patterns before asking the agent to change code.

Plan, build, and debug features

Plan Mode helps research the codebase, clarify requirements, and create an editable implementation plan. In the example, the agent built model pages for a documentation site; the developer tested them locally, supplied a compile error, and used a screenshot to refine the design. For harder bugs, Debug Mode gathers runtime evidence with targeted logging, while basic debugging still depends on reproduction, isolation, hypotheses, and regression tests.

Review changes and strengthen tests

Treat agent-written code to the same review standards as other code. The examples include self-review with Find Issues, BugBot catching a clipped icon and duplicated function, and asking the agent to add unit tests. Agents can also test many user flows; one example ran for about 45 minutes and returned videos and screenshots.

Customize agents and apply the workflow

Use short, shared rules for guidance needed in every conversation, and skills for specialized workflows loaded when relevant. Plugins can bundle rules, skills, MCP servers, and subagents, while agents can also use installed CLI tools such as GitHub CLI, AWS, Kubernetes, and Docker. The closing example applies the approach to checkout discount codes: first understand the system, then plan, build, debug, review, and record useful lessons in shared rules.

Takeaways

  • Give agents concrete goals and useful codebase context; include examples, logs, or relevant files.
  • For unfamiliar code, ask the agent to map the system before requesting changes.
  • Break features into verifiable steps, review the plan, and test the result in the running application.
  • For difficult bugs, reproduce the issue, gather runtime evidence, and verify the proposed root cause before accepting a fix.
  • Keep always-on agent rules concise, and put occasional workflows in skills.

Mentioned in this talk

Search inside this talk

What was claimed 10

  • feature
    Cursor: Built-in coding agent runs inside a harness consisting of instructions, tools, and a model.
    “This agent runs inside what's called a harness”
    YouTube
    Unverified1 source· Talk
  • feature
    Cursor: Instant Grep speeds up agentic searches, particularly on large codebases.
    “using something called Instant Grep, which can speed up agentic searches even more”
    YouTube
    Unverified1 source· Talk
  • uses
    “Cursor transforms your codebase into searchable vectors using an embedding model.”
    YouTube
    Unverified1 source· Talk
  • feature
    Explore: Searches the codebase in its own context window and returns findings to the parent agent.
    “It runs in its own context window, separate from the parent agent”
    YouTube
    Unverified1 source· Talk
  • feature
    Cursor: Automatically indexes the codebase in the background when the application starts.
    “Cursor will automatically index your codebase in the background”
    YouTube
    Unverified1 source· Talk
  • feature
    Cursor: Plan Mode researches a codebase, supports clarifying questions, and produces an editable step-by-step plan.
    “Plan Mode that helps you research your codebase, ask and answer clarifying questions, and produce a step-by-step plan”
    YouTube
    Unverified1 source· Talk
  • feature
    Cursor: Debug Mode collects runtime evidence, forms hypotheses, instruments code with targeted logging, and uses the evidence to target a fix.
    “Debug Mode first collects runtime evidence”
    YouTube
    Unverified1 source· Talk
  • uses
    “use the Sentry MCP to pull runtime error information”
    YouTube
    Unverified1 source· Talk
  • integrates with
    Sentry MCP integrates with MCP
    “you can use the Sentry MCP to pull runtime error information into the agent's context”
    YouTube
    Unverified1 source· Talk
  • feature
    Cursor: BugBot reviews pull requests and can flag issues for the developer to fix.
    “Cursor can review my PR and comment if it finds any errors using a product we call BugBot.”
    YouTube
    Unverified1 source· Talk

Related talks