Introducing Cascade: Your Coding Agent
Learn how Cascade operates in Write and Chat modes to automate changes, suggest fixes, and even deploy your code.
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 countsand SQL LIMIT /OFFSET strings.
In Write mode, Cascade won’t just propose code blocks; it creates the Pagination.ts
file with the required logic:
There are a few things to notice here:
All Write mode edits appear in a diff viewer—you always have veto power.
You can scope Write mode to one file, a folder, or the entire repo with the prompt. As we didn’t specify anything regarding that, it created the file at the root of our current directory. ...