auto_fix
Automatically fix coding errors using pattern-based or AI-generated fixes. Preview changes with suggest mode, or apply fixes directly to files and project-wide.
Instructions
Attempt to automatically fix a coding error detected by the diagnostic watcher.
Byte will try a pattern-based fix first (fast, no AI needed). If the error is too complex, Byte returns a structured AI fix request that can be sent to Claude for an intelligent fix.
Modes:
"suggest": Show the fix without applying it (default, safe)
"apply": Apply the fix directly to the file (use with care)
"apply_all": Fix all auto-fixable errors in the project
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Fix mode: suggest (preview), apply (write to file), or apply_all | suggest |
| file | No | File path to fix errors in (required for suggest/apply) | |
| line | No | Specific line number to fix (optional, fixes first error if omitted) |