Smart Apply
Smart Apply detects stale-file conflicts — where a file changed between the last read and the current edit attempt — and recovers gracefully rather than corrupting the file or silently applying a bad patch.
[options.smart_apply]enabled = trueWhat problem it solves
Section titled “What problem it solves”When an agent reads a file, reasons about it, and then edits it, there’s a window where another process (or a previous agent turn) could have modified the file. Without Smart Apply, a diff-based edit would either fail with a conflict error or silently apply to the wrong line range.
With Smart Apply enabled, BMO detects the mismatch and uses a fuzzy re-anchor strategy to find the correct insertion point even when line numbers have shifted.
When to enable
Section titled “When to enable”Enable Smart Apply when:
- Running multiple concurrent agents that may edit overlapping files
- Working in a codebase with fast-changing files (active CI, other developers)
- Using long-running sessions where context is summarized and re-anchored
It’s safe to leave enabled by default — the overhead is negligible.
Inspect the surface
Section titled “Inspect the surface”bmo config show-apply-patchshows whether Smart Apply is enabled and whether LLM-assisted merge is configured. This is the config-only view./smart-applyand/apply-patchshow the live in-process posture plus the bounded recent event ring shared byapply_patchand Smart Apply.list_recent_apply_patch_eventsexports recentapply_patch.firedandapply_patch.actionrecords as JSON.