Set a change-size budget before requesting an AI-generated patch: name the permitted files, allowed behaviour changes, excluded systems, and review checkpoints. Treat any expansion as a new proposal rather than an automatic continuation.
Budget for understanding, not output volume
A small line count can still contain a consequential permissions change. A larger formatting diff may be less consequential but harder to review. Use size limits as warning signals alongside semantic scope, not as proof of safety.
This is editorial process advice independent of agent settings. Cursor documents Run Modes as governing tool-call execution and approvals; Auto-review, Allowlist, and Run Everything differ in approval, sandboxing, and classifier behaviour. That does not establish an automatic patch-size enforcement feature.
Write a patch envelope
Complete these fields in your task brief:
- Objective: One observable behaviour to change.
- Permitted files: Exact paths or a narrow, understandable set.
- Excluded systems: Areas that must remain untouched.
- Size signal: A review threshold for changed files and lines.
- Required evidence: Tests or examples that demonstrate the intended result.
- Checkpoints: When to pause for review.
- Expansion rule: What requires a revised brief.
Also define what counts towards the size signal. Generated files, lockfiles, and formatting changes should not become invisible simply because they are inconvenient to count.
Apply a hypothetical patch budget
Imagine an Ahmedabad developer working in a synthetic shopping-demo repository. The task is to make a basket label show “1 item” for one item and “2 items” for two.
The envelope permits only src/basket-label.js and tests/basket-label.test.js. It excludes dependencies, authentication, payment code, network requests, and unrelated formatting. The illustrative review threshold is two files and 40 changed lines, counted as additions plus deletions.
Acceptance inputs are zero, one, and two, with expected labels explicitly written as “0 items”, “1 item”, and “2 items”. Review the diff and test evidence against all three cases.
If the proposed patch touches a third file or changes a shared pricing helper, pause even if the line count stays under 40. Conversely, crossing 40 lines calls for explanation, not a rushed attempt to compress readable code.
Stop and split an expanding patch
Stop when the patch needs an excluded system, introduces unrelated cleanup, or cannot be explained against the original objective. Next, separate necessary preparatory work into its own reviewed proposal. Do not accept scope creep just because a generated summary sounds confident.
If access is needed, check the coding catalog, confirm access format, and save terms before buying. Marketplace account/code/token offers are not proof of official subscription equivalence or patch-budget enforcement.
Sources and scope
Source material checked 29 October 2026; features/policies may change. Cursor Run Modes documentation establishes mode-dependent tool-call controls. The patch envelope, thresholds, and hypothetical example are editorial advice, not documented agent settings or marketplace guarantees.