A cloud run handed over from a Mac checkout keeps a git history. Its changes come back as commits on a branch of their own, and nothing touches the branch you were on or the work you have not committed.
What the Mac records at handoff
The branch you are on, the commit you are on, and one more commit of the files as they stand, your uncommitted changes and new files included, so the cloud starts from exactly what you had. That extra commit is made without changing your index, your working tree or any branch, and is kept under refs/letthembuild/ so git does not clean it away.
In the cloud, each change the run saves becomes one commit, named after the step that made it. The history lives outside the folder the run's commands can see, so a command cannot rewrite it.
Pull Back
Pull Back, on the run's card under Tools → Cloud Runs, or /goal cloud pull, applies the run's commits in a temporary worktree and brings them back as one commit on a new branch, cloud/<what it was about>-<run>. The commit is named after the task, and its description lists the run's steps. Your checkout stays on its branch with its uncommitted work. Pull Back again later and the same branch gets one more commit with what the run did since. A change too large to keep as a commit, or a handoff from before this history existed, comes back through /goal cloud review instead.
Open PR
Open PR, or /goal cloud pr, asks first, then pushes that branch to origin and opens a pull request into the branch you handed over from. The push uses the run's short-lived GitHub token when you have connected GitHub, and this Mac's own gh sign-in otherwise.
Move Back to This Mac
Move Back to This Mac, or /goal cloud move, asks first, stops the cloud run, pulls its commits back, and adds what the cloud run said to the discussion. With nothing uncommitted here, the checkout switches to the cloud's branch and the goal carries on on this Mac at once. With uncommitted work, the checkout stays where it is and the goal waits, telling you which branch to switch to before /goal resume.
From the web or the iPhone: a pull request
A run started on the web or the iPhone with a repository under Work on gets the repository's text files at that branch; credentials, dependency folders and binaries stay behind. When it finishes, its changes come back as one commit on its own branch, cloud/<what it was about>-<run>, made from the commit it started at, with a draft pull request into the branch it started from. Nothing is pushed to that branch itself. A run that stopped before finishing has Open PR on its card, on any device. The card then links the pull request; on a Mac, git fetch brings the branch like any other. A run that changed nothing opens none, and the card says so.