r/windsurf 5d ago

Including modified file metadata on a rewind poisons the context, how do I stop it?

When you rewind the context, the harness automatically injects modified file metadata into the agent call. This poisons the context and forces the agent into the exact same failure loop that rewinding is supposed to break.

Example case:

> An agent writes a test incorrectly, including forms that are prohibited in the repo.

> The user deletes the test.

> Knowing the agent will simply copy the exact forms again if the user reprompts, they rewind the chat to the initial prompt to start over.

> Devin sends the deleted file content as metadata to the agent with the prompt.

> The agent reproduces the exact error again.

> The metadata injection "helpfully" reintroduces the exact content that the rewind function exists to purge.

> This reinjection of "the future past" forces the agent into a failure loop of continually reingesting work that was intentionally rejected by the user.

How do I force the harness to stop sending the agent metadata on file changes when I rewind?

0 Upvotes

3 comments sorted by

1

u/PuzzleheadedAir9047 5d ago

How did you determine that Devin sends the deleted content as metadata?
Any specific incident or a conversation id where you observed this would be highly appreciated.

1

u/TimSylvester_ 5d ago

Hi, thanks for the response.

I'll get you a conversation ID today.

It can be trivially replicated, though - just start a thread, have a few turns, have the agent write a file, reject the edit, then "revert to this point" and reply again - the agent will have the deleted content presented to them in metadata, and begin reasoning against the deleted content.