Skip to content

Batch

batch_operations and project_replace are ultra only. They are not in strict or agent.

Pass one of request, pipeline, or rename. Legacy string adapters are request_json, pipeline_json, and rename_json. Do not send conflicting native and JSON forms.

Operation types: write, edit, search_and_replace, copy, move, delete, create_dir, extract.

extract moves lines [start_line, end_line] from source to destination. The bytes written are the bytes removed. Optional append.

atomic:true rolls the file operations back together in-process if one fails. It is not crash-durable. create_dir is rejected when atomic is true. Create the directory first, or use a non-atomic batch, then atomic file writes.

validate_only:true does not write.

operation_id plus retry_contract:"e3-v1" opts into a 24-hour receipt. Persist receipts across restart with --receipt-dir. The receipt namespace is per allowed-paths. Do not replay a mutation when retryable is false.

Rollback status is complete, partial, or failed. Codes: ROLLBACK_COMPLETE, ROLLBACK_PARTIAL, ROLLBACK_FAILED. recovery is check_already_applied. retryable is false.

Twelve actions: search, read_ranges, count_occurrences, edit, multi_edit, regex_transform, copy, rename, delete, aggregate, diff, merge.

Flags: dry_run, force, stop_on_error, create_backup, verbose, parallel. A regex step expands {{file.name}} and {{file.stem}} per file. $1 remains a capture.

HIGH and CRITICAL pipeline risk is blocked unless force:true.

Fields include path, mode, find, replace, prefix, suffix, pattern, extension, start_number, padding, recursive, file_pattern, preview, case_sensitive. preview does not write.

One find / replace across a tree, or the same pair on an explicit paths list. preview:true is the dry-run. literal defaults to true. Set it false for a regex.

A HIGH or CRITICAL apply without force:true is a preview only. Nothing is written. The result is marked blocked.

detail: summary and normal are counters in compact mode. full includes the per-file list.