New: FixBugs for VS Code is now available. Install from Marketplace 

Plan, fix, apply

Build a Plan from the current Possible Cause, edit it, generate the Fix, and apply or remove it in your workspace.

On this page

Turn the current Possible Cause into a Plan you agree with, then a Fix you can apply to your workspace and remove again. You edit the Plan, not the diff. Nothing touches your files until you select Apply Fix.

Before you start

Build the Plan

  1. Open the current Possible Cause from the Hypothesis step.
  2. Select Build Plan. The button reads Building Plan while FixBugs works; select Cancel to stop it.
  3. When the Plan is ready, select View Plan & Build Fix. Fix Plan opens.

The Plan has a Plan Summary, Observations, an Approach, and one subplan for each part of the change. When Assistant turns shaped this version, its header shows Context used with one chip per turn; select a chip to open that turn in the thread.

Edit the Plan

  1. Select Edit Plan.
  2. Reword the Plan Summary, Observations, or Approach.
  3. Select Save. The Plan gets a new version.

To change one subplan, select Edit Subplan on it, make the change, and select Save.

Steer the Plan from the Assistant

  1. Select Open in Assistant. The Assistant opens with the Plan attached.
  2. State a constraint, for example "Keep the API response shape unchanged", and send it.
  3. If FixBugs asks you to decide something, answer in the thread. FixBugs updates the Plan with your answer.

Build the Fix

  1. On Fix Plan, select Build Fix. The button reads Building Fix while FixBugs writes the change.
  2. Select View Fix. The Fix page shows how many files changed and the lines added and removed.
  3. Expand a file to read its diff.
  4. In the expanded file, select Why this file?. FixBugs lists its reasons for changing that file.

Apply and remove the Fix

  1. Select Apply Fix. The changed files appear in your workspace and in the Source Control view, and the page shows the applied change.
  2. To undo it, select Remove Fix. FixBugs returns the files to how they were before the apply and shows Fix removed.
  3. Select Apply Fix again to put the change back.

Apply Fix does not wait for validation. It is unavailable when the Fix is out of date or its version or apply material is missing; the page then shows Apply unavailable and the reason.

Recover a drifted workspace

If your files changed while FixBugs applied the Fix, the Fix page shows Recovery required and lists each conflicting file.

  1. Select Merge on a file. A merge editor opens.
  2. Resolve the conflict and save the result.
  3. Repeat for each file.
  4. Select Continue Recovery. FixBugs finishes applying the Fix.

What you get

  • A Fix Plan you edited, with its versions.
  • A Fix: the diff for each file and Why this file? for each one.
  • The change applied in your workspace, or removed again.

If something goes wrong

  • Plan is blocked: FixBugs shows the reason. Add guidance in the Assistant, then select Re-run Plan.
  • If Plan or Fix generation fails, the button reads Retry. Select it.
  • Remove fix failed: FixBugs could not remove the change. Read the reason it shows before you try again.
  • Cannot safely remove fix: some files changed after the apply, so FixBugs removed nothing. If FixBugs offers Remove with best effort, select it to remove what it can.

Next steps