New worktree creation is broken for remote envs #8867

Open
opened 2026-02-16 18:11:03 -05:00 by yindo · 2 comments
Owner

Originally created by @kvokka on GitHub (Feb 8, 2026).

Originally assigned to: @thdxr on GitHub.

Description

I'm running the Opencode server in the devContainer and connecting to it via WebUI or DesktopApp with the same issue.

When I create a new worktree (further wt) in the GUI, the wt is created, but when i send any message to it, no updates from either the AI agent, and the chat is created under the main branch instead of wt. But something is happening in the background, and it's completely hidden (i tried to ask the agent to change some files, and it was done, but no conversation updates).

Normally i create the wt like /workspace/.worktree/my-awesome-ws

❯ git worktree list
/workspace                                                                                          75a3564 [main]
/home/vscode/.local/share/opencode/worktree/76375e8e2161fcab1c2a7bce237c74c7870796a8/cosmic-lagoon  a50d593 [opencode/cosmic-lagoon]
/home/vscode/.local/share/opencode/worktree/76375e8e2161fcab1c2a7bce237c74c7870796a8/kind-pixel     75a3564 [opencode/kind-pixel]
/workspace/.worktree/move_to_tf                                                                     66e7729 [move_to_tf]

On the main branch or IF the workspace is inside the /workspace folder, everything works, but it require to create the workspace manually, avoiding the UI

I'm not running OpenCode locally, so i assume that it might be all good there and talking only about remote execution. In the console, of course, all works as it should

I didn't find the config option to set the path for the worktrees (maybe my bad), and it might be the simplest fix for setups like mine. I'm ok to add this setting via pr if the issue becomes approved, or let me know what I'm doing wrong.

Thank you!

Plugins

oh-my-opencode@3.4

OpenCode version

1.1.53

Steps to reproduce

  1. Run opencode in devContainer (or any other Docker image), expose the port
  2. Connect over DesktopApp or WebUI to the Opencode server
  3. Create new worktree (sandbox)
  4. Send any command to the agent and see 0 output (and for some reason it creates under the main group)

Screenshot and/or share link

Image

Operating System

MacOs 15.5 + Ubuntu 24.4 in devContainer

Terminal

iTerm2 3.6

Originally created by @kvokka on GitHub (Feb 8, 2026). Originally assigned to: @thdxr on GitHub. ### Description I'm running the Opencode server in the devContainer and connecting to it via WebUI or DesktopApp with the same issue. When I create a new worktree (further wt) in the GUI, the wt is created, but when i send any message to it, no updates from either the AI agent, and the chat is created under the main branch instead of wt. But something is happening in the background, and it's completely hidden (i tried to ask the agent to change some files, and it was done, but no conversation updates). Normally i create the wt like /workspace/.worktree/my-awesome-ws ```bash ❯ git worktree list /workspace 75a3564 [main] /home/vscode/.local/share/opencode/worktree/76375e8e2161fcab1c2a7bce237c74c7870796a8/cosmic-lagoon a50d593 [opencode/cosmic-lagoon] /home/vscode/.local/share/opencode/worktree/76375e8e2161fcab1c2a7bce237c74c7870796a8/kind-pixel 75a3564 [opencode/kind-pixel] /workspace/.worktree/move_to_tf 66e7729 [move_to_tf] ``` On the main branch or IF the workspace is inside the /workspace folder, everything works, but it require to create the workspace manually, avoiding the UI I'm not running OpenCode locally, so i assume that it might be all good there and talking only about remote execution. In the console, of course, all works as it should I didn't find the config option to set the path for the worktrees (maybe my bad), and it might be the simplest fix for setups like mine. I'm ok to add this setting via pr if the issue becomes approved, or let me know what I'm doing wrong. Thank you! ### Plugins oh-my-opencode@3.4 ### OpenCode version 1.1.53 ### Steps to reproduce 1. Run opencode in devContainer (or any other Docker image), expose the port 2. Connect over DesktopApp or WebUI to the Opencode server 3. Create new worktree (sandbox) 4. Send any command to the agent and see 0 output (and for some reason it creates under the `main` group) ### Screenshot and/or share link <img width="1333" height="861" alt="Image" src="https://github.com/user-attachments/assets/b589bf02-6a0a-4aa9-8afd-7320fab95a54" /> ### Operating System MacOs 15.5 + Ubuntu 24.4 in devContainer ### Terminal iTerm2 3.6
yindo added the bug label 2026-02-16 18:11:03 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 8, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #12726: Git worktrees + stash can cause projectID mismatch (sessions 404 across sandboxes) - related to worktree path/directory handling issues
  • #10468: Worktrees doesn't work well on web - similar symptoms of worktree sessions not working and chat/session updates being disabled on web/remote

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Feb 8, 2026): This issue might be a duplicate of existing issues. Please check: - #12726: Git worktrees + stash can cause projectID mismatch (sessions 404 across sandboxes) - related to worktree path/directory handling issues - #10468: Worktrees doesn't work well on web - similar symptoms of worktree sessions not working and chat/session updates being disabled on web/remote Feel free to ignore if none of these address your specific case.
Author
Owner

@kvokka commented on GitHub (Feb 8, 2026):

The issue is not connected with the problems mentioned above by the bot

@kvokka commented on GitHub (Feb 8, 2026): The issue is not connected with the problems mentioned above by the bot
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8867