Skip to content

[BUG] grok-code-fast-1 has a suggestion #10686

@jcalfee

Description

@jcalfee

Problem (one or two sentences)

The 1st time grok-code-fast-1 tries to change a file this error comes up:

The apply_diff partially succeeded, but there are TS errors because not all changes were applied? No, it says "unable to apply all diff parts", but then "operation":"modified", and "You do not need to re-read the file, as you have seen all changes Proceed with the task using these changes as the new baseline."

Context (who is affected and when)

New sessions

Reproduction steps

Just use grok-code-fast-1 to do something.

Expected result

should work

Actual result

errors, but it retries and figures it out

Variations tried (optional)

I asked the model to give me text to use in future sessions to avoid the issue. It said to provide this:

To avoid partial apply_diff: Use raw <> && (no HTML escapes), exact indents from read_file, re-read/re-apply failed blocks iteratively, small diffs first, check TS errors before completing.

Then I asked if it recommends a better way for Roo Code to handle this. It said:

Workaround is effective, but for Roo Code plugin devs: 1) Robust parser: Normalize whitespace, accept optional escapes (&lt;&gt;), apply blocks independently (not all-or-nothing). 2) Git-style hunks: Context-aware patches with tolerance. 3) Auto-fix/preview: Linter integration to suggest/apply fixes. 4) Fallback: Sequential single-block apply on multi-fail.

App Version

3.38.3

API Provider (optional)

OpenRouter

Model Used (optional)

grok-code-fast-1

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

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions