Skip to content

The apply_diff tool fails with "Missing value for required parameter 'path'" under two conditions #12312

@german-mar

Description

@german-mar

Problem (one or two sentences)

The apply_diff tool fails with "Missing value for required
parameter 'path'" under two conditions:

  1. When the "diff" parameter appears before "path" in the
    parameter list (even with a single diff call).

  2. When 2+ apply_diff calls are batched in a single message
    (even with correct parameter order).


STEPS TO REPRODUCE


TEST RESULTS (4 scenarios)

Test 1: Single diff, path first .......... PASS
Test 2: Single diff, diff first .......... FAIL (Missing path)
Test 3: 2 diffs, path first in both ..... FAIL (Missing path)
Test 4: 2 diffs, diff first in both ..... FAIL (Missing path)


WORKAROUND

Context (who is affected and when)

When AI apply a diff

Reproduction steps

  • OS: Windows 10
  • Shell: cmd.exe
  • Java project (Maven)
  • Workspace: local filesystem

Bug 1 — Parameter order:

  1. Send a single apply_diff where "diff" is the first
    parameter and "path" is second.
  2. Expected: diff is applied.
  3. Actual: "Missing value for required parameter 'path'".

Bug 2 — Batching:

  1. Send 2 apply_diff calls in a single message, both with
    "path" as the first parameter.
  2. Expected: both diffs are applied.
  3. Actual: both fail with "Missing value for required
    parameter 'path'".

Note: Earlier in the same session, multi-diff messages DID
work. The bug started manifesting mid-session, suggesting
state corruption in the message parser.

Expected result

diff executed

Actual result

Test 1: Single diff, path first .......... PASS Test 2: Single diff, diff first .......... FAIL (Missing path) Test 3: 2 diffs, path first in both ..... FAIL (Missing path) Test 4: 2 diffs, diff first in both ..... FAIL (Missing path)

Variations tried (optional)

No response

App Version

0.0.8162

API Provider (optional)

None

Model Used (optional)

No response

Roo Code Task Links (optional)

No response

Relevant logs or errors (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions