Documentation Multi-file edits

Multi-file edits

The agent can read and write multiple files in a single response. This is useful for refactors, feature additions that span several components, or any change where consistency across files matters.

What multi-file edits handle well
  • Adding a new page that requires a component, a route entry, and a nav link
  • Renaming a type or interface that's used across multiple files (whole-word, text-based rename across src/)
  • Extracting a repeated pattern into a shared component and updating all call sites
  • Writing a migration for a new database table and updating the queries that depend on it (the migration file is created, not applied — you apply it)
  • Changing a prop name across a component and all its usages
Note
CloudCode sends your project file tree, plus the contents of attached and auto-context files, automatically. You don't need to copy-paste file contents into the chat — the agent opens any other file it needs with its read tools.
Reviewing changes

With Tools ON, edits are saved as each tool runs — there is no accept/reject step. Each tool call and its result appear in the chat as the agent works. To undo a change, restore an earlier version from the file's version history, or ask the agent to revise. If you want to review code before it touches your files, turn Tools OFF and apply the code blocks yourself.