From df1dab13d0f4fd9216edd980a10ab09e001f474b Mon Sep 17 00:00:00 2001 From: "Anna.Zhdan" Date: Mon, 2 Feb 2026 14:40:19 +0100 Subject: [PATCH 1/4] Added file-delete.mdx --- docs/rfds/file-delete.mdx | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 docs/rfds/file-delete.mdx diff --git a/docs/rfds/file-delete.mdx b/docs/rfds/file-delete.mdx new file mode 100644 index 00000000..e8bc2f6f --- /dev/null +++ b/docs/rfds/file-delete.mdx @@ -0,0 +1,57 @@ +--- +title: "Diff event for the case of deleted file" +--- + +Author(s): [anna239](https://github.com/benbrandt) + +## Elevator pitch + +> What are you proposing to change? + +Add flag `deleted` to [Diff](https://agentclientprotocol.com/protocol/tool-calls#diffs) entity type for the case of a deleted file. + +## Status quo + +> How do things work today and what problems does this cause? Why would we change things? + +Currently, in Diff entity type `newText` is not nullable, so it's not possible to distinguish between a deleted file and empty file. + +## What we propose to do about it + +> What are you proposing to improve the situation? + +Add flag `deleted` to [Diff](https://agentclientprotocol.com/protocol/tool-calls#diffs) entity type for the case of a deleted file. + +Note: we would ideally make newText nullable, but that would break existing clients. + +## Shiny future + +> How will things will play out once this feature exists? + +It is possible for the agent to distinguish between a deleted file and an empty file. + +## Implementation details and plan + +> Tell me more about your implementation. What is your detailed implementation plan? + + + +## Frequently asked questions + +> What questions have arisen over the course of authoring this document or during subsequent discussions? + + + +### What alternative approaches did you consider, and why did you settle on this one? + +We considered making newText nullable, but that would break existing clients. + +## Revision history + + From 7b8245ddf8180848550ca30f62425d759ecae1a4 Mon Sep 17 00:00:00 2001 From: "Anna.Zhdan" Date: Wed, 4 Feb 2026 09:40:26 +0100 Subject: [PATCH 2/4] add json example --- docs/rfds/file-delete.mdx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/rfds/file-delete.mdx b/docs/rfds/file-delete.mdx index e8bc2f6f..efc76a91 100644 --- a/docs/rfds/file-delete.mdx +++ b/docs/rfds/file-delete.mdx @@ -22,6 +22,29 @@ Currently, in Diff entity type `newText` is not nullable, so it's not possible t Add flag `deleted` to [Diff](https://agentclientprotocol.com/protocol/tool-calls#diffs) entity type for the case of a deleted file. +**Current structure (cannot distinguish deleted file from empty file):** + +```json +{ + "type": "diff", + "path": "/home/user/project/src/config.json", + "oldText": "{\n \"debug\": false\n}", + "newText": "" +} +``` + +**Proposed structure with `deleted` flag:** + +```json +{ + "type": "diff", + "path": "/home/user/project/src/config.json", + "oldText": "{\n \"debug\": false\n}", + "newText": "", + "deleted": true +} +``` + Note: we would ideally make newText nullable, but that would break existing clients. ## Shiny future From a6e55ed0c05d10c770ae7bbc22a1e72dc3153e59 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Fri, 20 Feb 2026 13:06:28 +0100 Subject: [PATCH 3/4] Clean up --- docs/rfds/file-delete.mdx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/rfds/file-delete.mdx b/docs/rfds/file-delete.mdx index efc76a91..bccdc05f 100644 --- a/docs/rfds/file-delete.mdx +++ b/docs/rfds/file-delete.mdx @@ -1,5 +1,5 @@ --- -title: "Diff event for the case of deleted file" +title: "Represent deleted files in diff" --- Author(s): [anna239](https://github.com/benbrandt) @@ -57,19 +57,17 @@ It is possible for the agent to distinguish between a deleted file and an empty > Tell me more about your implementation. What is your detailed implementation plan? - +Adding the new field will be a non-breaking change, and clients that update can better distinguish between deleted and empty files. ## Frequently asked questions > What questions have arisen over the course of authoring this document or during subsequent discussions? - +**Do we need to represent moved files?** + +An agent could represent that with a deleted file at the old path and a new file at the new path. + +We need to rework the entire diff structure to handle more cases, and binary files, but in the meantime this provides a stop-gap until we can implement a more comprehensive solution. ### What alternative approaches did you consider, and why did you settle on this one? @@ -77,4 +75,4 @@ We considered making newText nullable, but that would break existing clients. ## Revision history - +2026-02-20: Initial draft From 0c6e7ecc6fac99690b2acba39fdd59a62d066753 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Fri, 20 Feb 2026 13:10:59 +0100 Subject: [PATCH 4/4] Update website --- docs/docs.json | 3 ++- docs/rfds/{file-delete.mdx => diff-delete.mdx} | 0 docs/updates.mdx | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) rename docs/rfds/{file-delete.mdx => diff-delete.mdx} (100%) diff --git a/docs/docs.json b/docs/docs.json index 783220c1..7ad41e69 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -119,7 +119,8 @@ "rfds/rust-sdk-v1", "rfds/logout-method", "rfds/session-delete", - "rfds/message-id" + "rfds/message-id", + "rfds/diff-delete" ] }, { diff --git a/docs/rfds/file-delete.mdx b/docs/rfds/diff-delete.mdx similarity index 100% rename from docs/rfds/file-delete.mdx rename to docs/rfds/diff-delete.mdx diff --git a/docs/updates.mdx b/docs/updates.mdx index 76a08d0d..1bcc4b80 100644 --- a/docs/updates.mdx +++ b/docs/updates.mdx @@ -4,6 +4,13 @@ description: Updates and announcements about the Agent Client Protocol rss: true --- + +## Delete in Diff RFD moves to Draft stage + +The RFD for indicating whether a diff resulted in a file deletion has been moved to Draft stage. Please review the [RFD](./rfds/diff-delete) for more information on the current proposal and provide feedback as work on the implementation begins. + + + ## Sergey Ignatov is now a Lead Maintainer