BLOG / BUILDING WITH AI

AI Pair Programming with a Coding Agent

A developer reviewing a coding agent patch beside test results
A developer reviewing a coding agent patch beside test results

AI pair programming works best when the developer and the coding agent each have a clear part in the work. You bring the product context, design decisions, and responsibility for the result. The agent can help inspect code, draft a change, run checks, and explain what it did. Treat the exchange as a working session, not a handoff of responsibility.

Agree on the problem before asking for code

Describe the behavior you want, why it matters, what should stay as it is, and how you will know the change works. Share the smallest useful example, error, or design reference. For an unfamiliar area, ask the agent to inspect the code and suggest a plan before it edits anything.

If the plan misses an assumption, correct it while the task is still small. This is often faster than accepting a large implementation and trying to steer it back afterward. Keep the conversation tied to a specific outcome rather than asking for a sweeping cleanup alongside the feature.

Work in short turns and inspect the evidence

After each meaningful change, read the diff and ask what the agent changed and why. Run the test or command that checks the behavior. If the result is wrong, provide the failure output and a narrower next step instead of asking it to repeat the entire task.

A coding agent can be useful for exploring alternatives, but the developer still decides which tradeoffs fit the product. Ask it to state uncertainty, note skipped checks, and separate facts from assumptions. That keeps the pairing conversation grounded in the repository and its behavior.

  1. Write one goal with observable acceptance checks.
  2. Ask the agent to inspect and plan when the area is unfamiliar.
  3. Review each meaningful patch before expanding the scope.
  4. Finish with tests, a clean diff, and a note about anything unverified.

Choose a CLI, editor, or a mix of both

An editor assistant can be convenient for a local change. A terminal agent may fit work that needs repository searches, commands, or several related files. Some developers use both, but they should keep track of which tool changed the code and what model or account handled the request.

LucentraCode provides a terminal workflow for coding tasks. Try it on a contained issue in a project you can restore, then compare the result with the way you already pair with an editor assistant.

Sources and further reading