Apply Patch
Apply Patch is the staged-diff mutation path behind the apply_patch agent tool. It applies unified diffs into BMO’s staging layer instead of writing directly to the working tree.
What it does
Section titled “What it does”- accepts unified diff input
- validates path safety before staging
- records bounded
apply_patch.firedandapply_patch.actionevents - keeps diff bodies out of the observability surface
apply_patch is available when options.sandbox_mode = "staged". In direct-write mode, the staged apply path is not exposed.
Inspect the surface
Section titled “Inspect the surface”bmo config show-apply-patch— config-only posture/apply-patchor/smart-apply— live in-process posturelist_recent_apply_patch_events— raw JSON ring export for recent apply-patch and smart-apply events
Related
Section titled “Related”- Smart Apply — stale-file recovery for edit/write/multiedit
- Edit Quality — adjacent edit-safety controls