Feature hasn't been suggested before.
Describe the enhancement you want to request
Add workspace-level worktree support to the core workspace system: CLI commands (opencode worktree create|list|remove|reset) and TUI dialog integration that lets users switch between working copies via git worktree without leaving their current session.
why it matters
working on multiple branches simultaneously is a common workflow. Previously, users had to either:
- Manually manage separate clones
- Use git worktree externally and relaunch opencode
- Stash/discard uncommitted work manually
None of these preserve session continuity when switching context.
what i did
- CLI: opencode worktree create|list|remove|reset commands
- TUI: Warp dialog to switch between worktrees via stash-based git worktree
- Core: Optional directory field on workspace, VCS stash/stashPop endpoints
- UX: Status indicator, sidebar/footer worktree labels, auto-stash on leave + pop on return
Benefits
- Switch branches without leaving your opencode session
- No manual stash management auto stash on leave, auto-pop on return
- No separate clones needed leverages git worktree
- Workspace continuity: same project context, just different working tree
Feature hasn't been suggested before.
Describe the enhancement you want to request
Add workspace-level worktree support to the core workspace system: CLI commands (opencode worktree create|list|remove|reset) and TUI dialog integration that lets users switch between working copies via git worktree without leaving their current session.
why it matters
working on multiple branches simultaneously is a common workflow. Previously, users had to either:
None of these preserve session continuity when switching context.
what i did
Benefits