Skip to content

[FEATURE]: GitHub / Git Worktree & Branch Picker — open branch/worktree from Desktop/Web UI #13343

Closed

Description

@bensheed

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Willing to Pay / Sponsor This Feature

I am willing to financially support / sponsor development of this feature if needed.
This is a high-impact UX improvement that I would personally pay for.


Summary

OpenCode would benefit massively from a first-class GitHub repository + branch selection workflow built directly into the Desktop/Web UI.

Today, users must:

  • Manually create a local folder
  • Ask the agent to clone a repo
  • Open that folder afterward

This creates friction compared to other IDEs and coding agents. A native GitHub integration would allow users to select a repo, choose a branch, and have OpenCode automatically clone/pull and open the project, with future-proofing for richer Git worktree UX.


🎯 Goals

  • Allow users to connect GitHub via:
    • OAuth (like many IDEs)
    • Personal Access Token (like OpenHands)
    • Potentially reuse the same GitHub configuration used for GitHub Models
  • Browse public and private GitHub repositories
  • Select a branch before opening
  • Automatically:
    • Clone (or fetch)
    • Create/select a worktree
    • Open the project in OpenCode
  • Eliminate the need to manually pre-create a local folder
  • Lay the foundation for a future first-class worktree UI

🧠 Proposed UX (High-Level)

  1. User clicks “Open Repository” (or similar)
  2. OpenCode shows connected GitHub accounts
  3. User selects:
    • Repository
    • Branch
  4. OpenCode:
    • Creates an intelligent local folder structure
    • Pulls/clones the repo
    • Opens it immediately in the app

This mirrors workflows users already expect from modern IDEs and agent platforms.


📁 Local Filesystem & Folder Strategy

Because OpenCode relies on the local filesystem, some lightweight but intentional structure would be needed, for example:

~/opencode/
github/
org-name/
repo-name/
main/
feature-branch/

This also naturally supports:

  • Multiple branches
  • Git worktrees
  • Parallel agent workflows
  • Clear project/session separation

Worktree-Aware by Design (Future-Friendly)

This feature does not need to fully implement a worktree UI immediately, but it should:

  • Be compatible with git worktrees
  • Treat each branch/worktree as a distinct OpenCode project/session
  • Avoid overwriting or collapsing multiple worktrees into one project

Several existing issues show strong community interest in worktrees; this feature would serve as a UX entry point for those efforts.


Major Added Benefit: Private Repos

A key benefit not currently available:

  • OpenCode would gain native access to private GitHub repositories
  • This is increasingly important for professional and commercial usage
  • Token/OAuth support unlocks real-world workflows that aren’t possible today

Why This Is Not a Duplicate Request

There are several existing issues related to git worktrees and workspace handling, but none address:

  • GitHub account integration
  • Repo browsing in UI
  • Branch selection before opening
  • Automated clone + open workflows

This request sits above those issues as a UX and product-level feature that complements and unlocks them.


Related Issues

These issues demonstrate strong existing demand for better git/worktree handling and workspace UX:


Closing Thoughts

This feature would:

  • Dramatically reduce onboarding friction
  • Align OpenCode with user expectations set by modern IDEs
  • Unlock private repo workflows
  • Create a clean foundation for richer worktree UX in the future

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Feb 12, 2026
  2. github-actions commented on Feb 12, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of or closely related to existing issues. Please check:

    These issues all focus on improving GitHub integration workflows. Consider cross-referencing them and potentially collaborating on a unified solution.

  3. bensheed commented on Feb 12, 2026

    @bensheed
    Author

    This issue might be a duplicate of or closely related to existing issues. Please check:

    These issues all focus on improving GitHub integration workflows. Consider cross-referencing them and potentially collaborating on a unified solution.

    Yeah it looks like #10104 had the right idea but the PR ( #10107 ) was closed without merging

  4. iamhenry commented on Feb 13, 2026

    @iamhenry

    def need this. hard to tell which branch im on in the gui

  5. syntheticgio commented on Feb 13, 2026

    @syntheticgio

    I agree this - especially with worktree support (I know this is more foundational) would be really helpful.

  6. syntheticgio commented on Feb 13, 2026

    @syntheticgio

    @bensheed I just discovered (thanks kind person on reddit!) that you can hover over the project name and there is a three dots menu available to the right of it (for the life of me I couldn't seem to find this). In there you can enable workspaces which might cover at least some of what you're requesting. Your request is more expansive but just wanted to give you the heads up in case you (like me) had missed this.

  7. iamhenry commented on Feb 13, 2026

    @iamhenry

    right, on hover you should see something like the screenshot

    Image

    i would still love to be able to switch branches via some dropdown menu tho

  8. kwickramasekara commented on Feb 14, 2026

    @kwickramasekara

    +1. Definitely would love to be able to do the following:

    • Switch branch (at minimum)
    • Create new branches
    • Commit and push
  9. bensheed commented on Feb 17, 2026

    @bensheed
    Author

    +1. Definitely would love to be able to do the following:

    • Switch branch (at minimum)
    • Create new branches
    • Commit and push

    Agreed. I am currently using the workspace feature that @syntheticgio and @iamhenry mentioned, but it still requires the User to create a local directory before pulling down from GH. And there is still no support for private repos.

  10. nacholupotti commented on Feb 22, 2026

    @nacholupotti

    Would love to see this, Claude code already has this

  11. github-actions commented on Apr 24, 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.

  12. kwickramasekara commented on Apr 24, 2026

    @kwickramasekara

    Petition to reopen this! Very much needed!

  13. nevmerzhitsky commented on Aug 28, 2026

    @nevmerzhitsky

    Hello! Please, refix that. I cannot use new Web UI in OpenCode 1. Forced to seat on the previous Web UI version.

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

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussionwebRelates to opencode on web / desktop

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions