Glossary / Code & Repos

Patch

A focused change to a codebase, usually to fix a bug or adjust behavior.

Updated July 2, 2026

A patch is a focused change to a codebase, usually to fix a bug or adjust behavior. The point is restraint: change the specific lines needed to fix one thing without redesigning the system around it. With AI tools, “apply a patch” usually means the agent edits files directly, showing the before and after. A patch often lands as part of a commit, and if it goes wrong, a rollback can undo it.

Patching a small leak in an office ceiling captures it. You find the leak, open the right spot, fix it, and check that no more water comes through, without rebuilding the building. Small doesn’t mean low-risk: a one-square-foot repair above the server closet still matters.

Why you care

Good patches stay specific. If you asked the agent to fix the login error, it shouldn’t also rename half the files and redesign the page; that drift makes review harder and raises the chance of a merge conflict. Ask one simple question: “what exactly did this patch change?” A good agent answers in plain English and points to the files it touched. If it can’t, the patch may be too broad.