fix(cloud): show cloud run file content from session events instead of local file system#1686
Merged
VojtechBartos merged 4 commits intomainfrom Apr 16, 2026
Merged
fix(cloud): show cloud run file content from session events instead of local file system#1686VojtechBartos merged 4 commits intomainfrom
VojtechBartos merged 4 commits intomainfrom
Conversation
…f local filesystem
b748db8 to
348461d
Compare
tatoalo
reviewed
Apr 16, 2026
| if (!enabled || !events) { | ||
| return { content: null, touched: false, isLoading }; | ||
| } | ||
| const summary = buildCloudEventSummary(events); |
Contributor
There was a problem hiding this comment.
can we make this more efficient? users might have multiple tabs during active cloud runs, maybe we can have some hook there
Member
Author
There was a problem hiding this comment.
created share hook for the cloud event summary
tatoalo
reviewed
Apr 16, 2026
| * Combines read tool results and write/edit diffs to reconstruct the latest | ||
| * known content for a file from a cloud session's tool calls. | ||
| */ | ||
| export function extractCloudFileContent( |
Contributor
There was a problem hiding this comment.
if the agent renames or moves a file how would this work? I guess we would end up in a broken state?
Member
Author
There was a problem hiding this comment.
ups, add handle for it
tatoalo
approved these changes
Apr 16, 2026
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
When clicking a file link in an agent message during a cloud run, users see "Failed to load file." This happens because the app tries to read the file from the local filesystem (e.g.,
/tmp/workspace/repos/.../src/App.js), but that path only exists on the remote cloud sandbox — there's no local copy.Solution
For cloud runs, extract file content from the session events instead of the local filesystem. The agent's tool call results already contain file content: read tool calls embed the file text, and write/edit tool calls include
newTextin their diffs.Showcase
code-filelink.mov