Загрузка видео...
Не удалось загрузить видео
new feature in opencode: warping never worry about whether or not you should work in a worktree again! now you can move sessions between worktrees and your local projects by warping them. it also brings any local changes with it!
123,775 просмотров • 6 месяцев назад •via X (Twitter)
Комментарии: 52

workspaces are still behind a flag: export OPENCODE_EXPERIMENTAL_WORKSPACES=true we plan on ungating it soon!

cool feature name

😬 I see you! haha, didn't even think about that

@zachlloydtweets you are using the warp terminal for this demo...

@zachlloydtweets nope. iTerm2

Commenting for more reach!

hahah replying for reach

This is how we beat dax

You guys keep making great new features, but the documentation never gets updated, and you also have 78 pages of issues on Github. Can you please work on some of your tech debt?

we're a very big OSS project so issues are going to be large, but we have some things planned to help and yes we have docs updates planned too, aligning with some larger work that's getting done

Very cool. Codex-like. Can we control the creation of the worktree? Like: 1. Where it puts it 2. What it names it 3. What it branches from

not yet, but I'm about to land another PR that recognizes worktrees created externally. So you can use any tool you want to create worktrees outside of it, with any config you want!

Very cool. That's one of the major hang ups with Codex and Claude Code... lack of control over worktree specifics.

what happens if you have commits in a worktree and warp back to main? is only current diff moved? if so maybe a worflow like /new-workspace and /merge-workspace would be better, so they move the commits and the diff. I have this worflow already for kimaki and I use it often (only supports worktrees now)

@iamdavidhill yeah right now we are focusing on the simple use case of making worktree and having AI do a bunch of changes once you start committing you need something more advanced. we will probably have better way which actually try to merge from the common ancestor commit too

Oh, the UX is amazing! It’s one of the easiest ways to use worktree that I’ve seen

rename it to larping

are worktree hardcodes to use git or can it be configured to work with jj workspaces ?

git right now. would need to see a lot more demand for jj

Sickk. Can we get /side next?

gonna enjoy making remote worktrees work with this!

@thdxr That’s cool

@savram8 whoa

@kitlangton Saw the command and got super confused on account of @warpdotdev existing. 😫

Thanks for the feature, already using the /sync/history API and it's way better than my own custom solution I had before for syncing 🙏🏼 It just works™

oh cool, how are you using it?

I have smth like GitHub runners that automatically fix errors or do issues and those can run anywhere so if the network drops at some point or idk, they just randomly crash, I needed some way to sync it back for retrying. I tried out combining the event stream and the manual messages endpoint and it worked, but just waaaay easier with the built-in sync

this is such a life saver. love it!

How does it handle conflicts or merging when warping back, eg when the main branch also has moved on?

if it can’t cleanly apply, it doesn’t move the session and aborts and tells you. It’s up to you then to figure out if you want to commit and resolve with another flow

Can anyone from OpenCode help me with this question?

tf is a worktree

@thdxr Do subagents get worktrees too or do you just rely on the orchestrator to properly manage the division of code?

@thdxr right now subagents can't dispatch to separate worktrees, but no real reason we couldn't do that. mostly a UX issue. we'll see

Been waiting to adopt worktrees so long. Conceptually they make so much sense especially with forking agent convo.

If the changes were done through shell usage by the agent, for example: npm run build > build.log" That build.log `change` won't be recognized as `changes` and won't be transferred back when warping back to initial worktree? Correct? This is true in windsurf for example.

it uses `git status` to enumerate changes to move so I think it would be. is that desirable?

Yes, that is expected behavior 👍

@thdxr That solves a real problem for me

Damn! So cool stuff - I urgently need GB10 machine to do parallel coding stuff 🚀

Cool! I was looking into how to use a working tree in OpenCode. And now it's here. That's awesome!

some times I need a session to work with multiple projects. I just instruct the model to do so, but I wonder if it makes sense to have a support for it

that's a bigger architectural problem, not sure we'll support that as it was make everything much more complex for a few use cases. in that case you can still tell the agent to work across folders, just might need to go through some annoying permissions

awesome thx for the video

@iamdavidhill is this basically stash + create worktree + unstash?

@iamdavidhill a little different, it generates a patch file from changes (including new files) and tries to apply it, but yeah conceptually similar

@thdxr so you folks star track fans not star wars fans, got it

Can we sync sessions between machines pls 🥹

Is there a video or tutorial that displays how to use git worktrees? Its super simple with Claude code just to use the --worktree flag. Can't find anything in the opencode docs

@thdxr Loving it

omg perfect

@iamdavidhill 🔥

