TECHNOLOGY

Aider one-shot CLI edits then exits while its Python API has no compatibility guarantee

In this article
THE QUICK TAKE

One-shot execution completes an instruction-and-edit interaction, while repository correctness still requires the intended checks and a reviewed result.

Choose the automation boundary

A maintenance job needs a narrow source edit without leaving an interactive terminal conversation open. Aider’s scripting guide documents a command-line message that processes an instruction, applies edits, and exits. This is a useful automation boundary, but it should not be described as an independently verified completion of the maintenance goal. Specify the files and observable result before constructing the job.

Separate direct text from an instruction file

The options reference provides --message and --message-file for a single instruction followed by exit from noninteractive processing. An instruction file can keep the request reproducible and avoid fragile shell quoting. It does not freeze the repository contents, dependency environment, or chosen configuration. Record those inputs separately when comparing two runs or preparing a result for review.

Preserve the verification step

The command reference documents checks and feedback in interactive use; an unattended one-shot job does not gain a human’s follow-up review merely by exiting. Configure relevant checks deliberately and preserve their outcomes with the diff. A generated explanation saying that the code now works is weaker evidence than executing the changed path. Avoid using an unconditional final shell success to hide a failed validation stage in a wrapper.

Treat Python scripting as a different stability choice

The scripting page also demonstrates constructing a coder object and invoking it from Python, but explicitly calls that API unsupported and potentially incompatible across releases. A short import example is not a stable integration contract. If the task only needs a bounded command-line edit, do not assume the internal Python interface is required. An integration choosing it should track the tested version and its own compatibility checks rather than promising future behavior from a sample.

Deliver a reviewable repository result

Keep the task instruction, starting revision, selected configuration, final diff, and meaningful check output together. The task-contract guide defines the finish line; tool observations distinguish process completion from established behavior. Report an incomplete validation honestly even if Aider produced edits successfully. Automation is useful when the outcome remains reviewable, including which parts of the requested result were actually verified.

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.

Explore GPU hosting
← All articles