Skip to content

fix(cloud-task): don't show file_unchanged read sentinel as sidebar content#3065

Merged
tatoalo merged 2 commits into
mainfrom
fix/cloud-agent/agent-fs-access
Jul 1, 2026
Merged

fix(cloud-task): don't show file_unchanged read sentinel as sidebar content#3065
tatoalo merged 2 commits into
mainfrom
fix/cloud-agent/agent-fs-access

Conversation

@tatoalo

@tatoalo tatoalo commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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_unchanged result whose content block is that "Wasted call…" sentinel, not the file body. The cloud file-panel reconstruction (extractCloudFileContent) treated any read tool call's content as the file body, so the sentinel became the displayed content and falsely flipped touched to true.

Changes

packages/core/src/task-detail/cloudToolChanges.ts:

  • capture each tool call's rawOutput in ParsedToolCall / buildCloudEventSummary / mergeToolCall
  • in extractCloudFileContent, skip reads whose rawOutput.type === "file_unchanged" so the dedup sentinel is never treated as content or touched. A real prior read/edit's content is preserved

…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.
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 4cb4601.

@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(cloud-task): don't show file_unchang..." | Re-trigger Greptile

Comment thread packages/core/src/task-detail/cloudToolChanges.test.ts Outdated
@tatoalo tatoalo self-assigned this Jul 1, 2026
@tatoalo tatoalo added the Stamphog This will request an autostamp by stamphog on small changes label Jul 1, 2026
@tatoalo tatoalo marked this pull request as ready for review July 1, 2026 16:18

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Focused bug fix in core task-detail logic — adds a sentinel guard to skip file_unchanged reads in extractCloudFileContent, with full test coverage. No showstoppers; all review comments resolved.

@tatoalo tatoalo enabled auto-merge (squash) July 1, 2026 16:19
@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "chore(cloud-task): fix biome formatting ..." | Re-trigger Greptile

@tatoalo tatoalo merged commit 7f0b580 into main Jul 1, 2026
27 checks passed
@tatoalo tatoalo deleted the fix/cloud-agent/agent-fs-access branch July 1, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant