Description
In the Desktop app, if a session starts in the repo root and the agent later creates/uses a separate git worktree for the task, the File Tree and Review views keep using the original session directory.
The visible result is confusing:
- File Tree
All Files / Changes do not show the files changed in the worktree.
- Review keeps showing changes from the original repo root, or shows
0 changes, even though the agent changed files in the worktree.
- Switching sessions can appear to refresh the UI, but the underlying diff source is still the original root directory.
This seems related to the session retaining its initial session.directory. The agent can do real work in another worktree via shell/tool commands, but the UI still scopes file/diff data to the original session directory.
Related prior discussion:
Plugins
None relevant.
OpenCode version
Desktop app. Also reproduced while testing from dev / origin/dev around 9fbeafb63ed749077e9cc55a47df3629b5b7adc3.
Steps to reproduce
- Open the Desktop app for a git repository from the repo root.
- Start a session while the session/workspace directory is the repo root.
- In that session, ask the agent to create a separate git worktree from the default development branch, for example from
origin/dev, and make changes there.
- Open the File Tree
All Files / Changes views and the Review tab for that session.
- Switch between sessions that worked in different worktrees.
Expected behavior
The File Tree and Review views should reflect the directory/worktree where the selected session actually made changes, or the app should make it explicit that moving a running session's effective workdir into another worktree is unsupported.
Actual behavior
The File Tree and Review views remain scoped to the original session directory. Changes made in the worktree are not shown for that session, while changes from the original repo root can continue to appear.
Screenshot and/or share link
Not available.
Operating System
macOS 26.3.1
Terminal
Desktop app / zsh when running local dev builds.
Description
In the Desktop app, if a session starts in the repo root and the agent later creates/uses a separate git worktree for the task, the File Tree and Review views keep using the original session directory.
The visible result is confusing:
All Files/Changesdo not show the files changed in the worktree.0 changes, even though the agent changed files in the worktree.This seems related to the session retaining its initial
session.directory. The agent can do real work in another worktree via shell/tool commands, but the UI still scopes file/diff data to the original session directory.Related prior discussion:
session.directoryremains the repo root and built-in tools still run from the root.Plugins
None relevant.
OpenCode version
Desktop app. Also reproduced while testing from
dev/origin/devaround9fbeafb63ed749077e9cc55a47df3629b5b7adc3.Steps to reproduce
origin/dev, and make changes there.All Files/Changesviews and theReviewtab for that session.Expected behavior
The File Tree and Review views should reflect the directory/worktree where the selected session actually made changes, or the app should make it explicit that moving a running session's effective workdir into another worktree is unsupported.
Actual behavior
The File Tree and Review views remain scoped to the original session directory. Changes made in the worktree are not shown for that session, while changes from the original repo root can continue to appear.
Screenshot and/or share link
Not available.
Operating System
macOS 26.3.1
Terminal
Desktop app / zsh when running local dev builds.