OpenCode teases new “warping” feature for Git worktrees

OpenCode’s latest X post spotlights a new feature called “warping”. The pitch: you’ll “never worry” about whether to use a worktree again.

opencode cover

TL;DR

  • OpenCode has introduced Warping, a new feature that allows users to move active AI sessions between different workspaces or Git worktrees using the /warp command.
  • Seamless Transitions: Move a session from a main project to a separate environment (like a new Git worktree) to perform isolated tasks without affecting the original directory.
  • Context Retention: When moving sessions back and forth, OpenCode detects edits and prompts to transfer those changes along with the session.
  • Multi-Workspace Support: Supports creating and warping between multiple worktrees, maintaining a clean local environment while enabling parallel workflows.

The latest version of OpenCode can move sessions across workspaces, via a new feature called "warping". The feature appears to let a session start in one project, be warped into a different environment such as a new Git worktree, and then continue there.

In the presented example, a prompt begins in a main project directory, then gets moved with the /warp command into a Git worktree so other work can continue in the original location. After changes are made in the worktree, running git status in the main project shows no changes, while the worktree contains the edits.

The session can also be moved back. OpenCode detects that changes were made and asks whether they should move along with the session. After confirming, the session returns to the local project and the edits show up there as well.

The screencast also mentions that multiple worktrees can be created and warped between, with changes moving along with them.

Source: OpenCode

Continue the conversation on Slack

Did this article spark your interest? Join our community of experts and enthusiasts to dive deeper, ask questions, and share your ideas.

Join our community