In this article
When a good code suggestion becomes a poor file change, inspect the Apply role and its actual inputs separately from the model that produced the suggestion.
Locate the failure after generation
A chat response proposes the correct validation condition, but applying it removes a neighboring helper. That failure may occur after the useful proposal was generated. Continue’s Apply role guide describes a model stage that reconciles proposed code with existing content to produce a precise change. Distinguish the desired code from the final file diff before replacing the model responsible for every operation in the editor.
Preserve both sides of the application task
The documented Apply template exposes original_code and new_code. The former supplies the existing file material; the latter supplies the proposed revision. A custom template that presents only the new fragment loses information needed to preserve surrounding behavior. For a targeted fix, make clear which condition changes and which adjacent code should remain. Avoid interpreting an abbreviated chat snippet as a complete replacement file unless the task actually requests that replacement.
Separate Edit selection from Apply selection
The Edit role generates code from an edit instruction and has its own contextual variables. Its guide also describes falling back to the selected chat model when no edit model is specified. That fallback does not erase the separate Apply purpose. The YAML reference defines role assignments and role-specific templates; inspect the active configuration instead of assuming the visible chat selector identifies every stage involved.
Review the resulting file against the proposal
Use a small example with a target condition and an unrelated helper that must survive. Compare the requested behavior, generated proposal and applied diff. If the proposal is wrong, investigate generation context. If the proposal is right but placement or preservation fails, investigate application inputs and template behavior. A syntactically valid final file can still have lost unrelated functionality, so syntax alone is an incomplete acceptance condition.
Keep verification tied to the final artifact
Run the relevant check against the actual applied file rather than citing the correctness of the chat explanation. The task-contract guide defines the intended change and preservation requirements; tool observations separate generated text, application and validation. Record the active role configuration when diagnosing a regression. This makes the repair actionable without turning a role label into a guarantee of correct placement.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.