Fast Edits

CFactory edits files with targeted diffs instead of rewriting whole files whenever it can. That keeps changes smaller, faster to review, and cheaper in tokens.

How edits show up in the IDE

When the agent wants to change a file, the IDE shows a permission request with the affected paths and a diff. Approve to apply the patch, or reject to skip it.

CFactory permission request showing an edit with affected files and a diff
A runtime edit request in the IDE sidebar, with files and diff before you approve

Typical tools involved:

  • apply_diff / apply-patch style edits for targeted changes
  • write_to_file when creating a new file or replacing an entire file is clearer
Review before you approve

Even with precise diffs, skim the proposed change. Auto-approve speeds you up, but manual approval is the safest default for unfamiliar code.

Tips for better edits

  • Point at the file with @path/to/file so the agent scopes the change
  • Prefer small, focused requests ("rename this helper and update call sites") over broad rewrites
  • Use Checkpoints when you want an easy restore point before large edits