code_batch
Apply edits to multiple files in one atomic all-or-nothing call, with dry-run preview by default, so changes either fully succeed or roll back safely.
Instructions
Apply edits to N files in ONE atomic call — all or nothing; single edit → code_patch. New: create:true + content + locator.file_path. dry_run default preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy | No | {all_or_nothing: boolean} (default true). | |
| safety | No | Validation gate: {profile: standard|strict|fast, block_on_validation_error: boolean}. | |
| writes | Yes | Non-empty; per entry: read_ref/locator + one edit payload. | |
| dry_run | No | true = preview; false = apply. | |
| task_id | Yes | Task id. | |
| read_ref | No | Default base; same file only. | |
| request_id | No | Idempotency key. | |
| workspace_dir | Yes | Project root. | |
| allow_unsafe_no_base | No | Force apply without prior file-level reads (default false; gate). | |
| expected_state_revision | No | Guard. |