Skip to content

Git Changes panel is stuck on the main worktree when the agent switches to a new worktree #36301

Closed as not planned

Description

@FrknKoseoglu

Description

Description:
In the OpenCode Desktop version, when I prompt the agent to create a new git worktree and switch to it, the Git Changes screen on the right panel fails to track the new context. Instead of observing the active worktree, it continues to monitor only the main worktree and the main branch.

Expected Behavior:
The Git Changes panel needs to be worktree-aware. Whichever worktree the agent is currently operating in, the panel should dynamically switch to track the uncommitted changes and git status of that specific worktree.

Steps to Reproduce:

Ask the agent to create a new worktree (e.g., git worktree add) and navigate into it.

Have the agent make file modifications within the new worktree.

Check the "Git Changes" panel on the right.

Observe that the panel does not show the changes from the new worktree, but remains locked onto the main branch/worktree.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Jul 10, 2026

    @github-actions
    Contributor

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

  2. github-actions commented on Sep 9, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions