Skip to content

[Feature Request]: GPT 5.1 apply_patch_call harness support on agent level #2212

@priyansh4320

Description

@priyansh4320

Is your feature request related to a problem? Please describe.

The apply_patch tool is a structured code editing interface that allows GPT-5.1 to propose file operations (create, update, delete) using V4A diff format. Unlike traditional code generation where you get unstructured text, apply_patch returns actionable, parseable patches that can be programmatically applied.

How it Works:

  • Your code provides file context → GPT-5.1
  • GPT-5.1 analyzes and proposes patches (apply_patch_call)
  • Your harness applies patches to filesystem
  • You report success/failure back (apply_patch_call_output)
  • Model iterates or explains changes

Key Operations:

  • create_file: Create new file with full content as diff
  • update_file: Modify existing file with additions/deletions
  • delete_file: Remove file entirely

Describe the solution you'd like

class PatchEditor(Protocol):
    """Protocol for implementing file operations for apply_patch."""

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions