Skip to content

apply_diff causes inefficient API usage when making single changes #6054

@KJ7LNW

Description

@KJ7LNW

Version: v3.23.14
API Provider: anthropic
Model: sonnet-3.5

What happened?

The apply_diff tool does not warn models when only one SEARCH/REPLACE block is used, missing opportunities for batching multiple related changes.

Expected behavior

When only one SEARCH/REPLACE block is detected, the tool should warn models that multiple blocks can be more efficient.

Steps to reproduce

  1. Use apply_diff with only one SEARCH/REPLACE block - no efficiency warning appears for the model
  2. Compare with read_file tool which warns models when only one file is read

Additional context

The read_file tool already implements similar efficiency warnings when only one file is read, encouraging models to read multiple files simultaneously for better LLM context efficiency. The apply_diff tool should follow the same pattern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Issue [In Progress]

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions