Search⌘ K
AI Features

Introducing Cascade: Your Coding Agent

Explore how Cascade operates in Write and Chat modes to streamline coding tasks and assist with debugging. Understand the use of web search for updated info and learn how to deploy apps via Netlify directly from Windsurf. This lesson helps you confidently manage coding workflows and deployments within the IDE.

You’ve now used Cascade to handle small tasks like renaming classes, refactoring files, or recalling functions from your codebase. That was a glimpse of Cascade’s basic functionality. This section will look more closely at how it works under the hood.

Cascade operates in two main modes: Write mode and Chat mode (sometimes called Read mode). While both use the same underlying model, they’re optimized for different workflows. Knowing when to switch between them is key to working efficiently.

We’ll start by explaining how each mode works. Then, we’ll explore two powerful features: Web Search, which brings in real-time external knowledge, and App Deploys, which simplifies shipping your application.

By the end of this section, you’ll be able to move smoothly between continuing your work and asking Cascade for help with issues, like understanding a React hook error, without needing to provide excessive context. You’ll also know how and when to use Cascade to deploy code directly from your environment.

What is Windsurf’s “Write” mode?

Write mode is Cascade with a screwdriver in hand. Whatever instruction you hand over becomes an action plan: create files, edit sections, run tests, even stage commits. You’ll see a diff preview first, then click “Accept All” or “Reject All.” For example, we give the following prompt to Cascade in Write mode:

Generate a Pagination.ts util with functions to calculate page counts
and SQL LIMIT /OFFSET strings.

In Write mode, Cascade won’t just propose code blocks; it creates the Pagination.ts file with the required logic:

Write mode autogenerates a file with a diff preview
Write mode autogenerates a file with a diff preview

There are a few things to notice here:

  • All Write mode edits appear in a diff ...