fix(cloud-task): don't show file_unchanged read sentinel as sidebar content#3065
Merged
Conversation
…ontent A Read of an unchanged file returns Claude Code's file_unchanged result whose content is the "Wasted call — file unchanged..." sentinel, not the file body. The cloud file-panel reconstruction treated any read's content as the file, so the sentinel rendered as the file's content and falsely marked it touched. Skip file_unchanged reads via rawOutput.type so real content is preserved.
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "fix(cloud-task): don't show file_unchang..." | Re-trigger Greptile |
Contributor
|
Reviews (2): Last reviewed commit: "chore(cloud-task): fix biome formatting ..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In cloud tasks, opening a file the agent had created and read showed the wrong thing in the file sidebar, root cause: when the agent Reads a file that hasn't changed since its last read, claude returns a
file_unchangedresult whosecontentblock is that "Wasted call…" sentinel, not the file body. The cloud file-panel reconstruction (extractCloudFileContent) treated anyreadtool call's content as the file body, so the sentinel became the displayed content and falsely flippedtouchedto true.Changes
packages/core/src/task-detail/cloudToolChanges.ts:rawOutputinParsedToolCall/buildCloudEventSummary/mergeToolCallextractCloudFileContent, skip reads whoserawOutput.type === "file_unchanged"so the dedup sentinel is never treated as content ortouched. A real prior read/edit's content is preserved