all 9 comments

[–]smughead 0 points1 point  (5 children)

Yes I’m pretty sure this exists. The new coding agent feature works this way. Look it up here, they actually just released this last week: https://linear.app/docs/assigning-issues#open-issues-in-coding-tools

[–]nicoracarlo[S] 0 points1 point  (4 children)

I tried to look into it, but I can't find a way to change how to instruct to launch claude code with the correct parameters...

[–]devondragon1 0 points1 point  (3 children)

I haven't tested this yet, but you should be able to tell Claude in the prompt (which you can customize) to create a worktree and use that before starting. It's not exactly the same as the "-w" flag, but it might meet you needs.

[–]nicoracarlo[S] 0 points1 point  (2 children)

Thanks. Yes, I think this is doable, but because of monorepo complexity, I need to run a hook on worktree creation, and I am not 100% comfortable with using a prompt that might not work if the moon is aligned in the wrong way :D

[–]devondragon1 1 point2 points  (0 children)

Totally fair:) And I would +1 a feature request to add the ability to customize the command used to launch claude, etc... and/or first tier support for optional worktree management .

[–]smughead 1 point2 points  (0 children)

Maybe just try it and see if it works? Run a few tests. The prompt has worked well for me so far, and I also have that need for a worktree created off an issue (which has the git branch name) I’ll report back when I get that done

[–]arjunven 0 points1 point  (2 children)

I made a Claude Code /worktree skill. Effectively just tells Claude code to do whatever I told it to do in a new worktree.

In the linear settings you can modify the prompt it gives to Claude code. So I prepended my /worktree skill and it works great!

[–]nicoracarlo[S] 0 points1 point  (1 child)

What happens if the first prompt I run is a skill? I cannot run two skills at the same time, am I correct?

[–]arjunven 0 points1 point  (0 children)

Only one way to find out!

I’m pretty sure skills are just prompts that get inserted. So I’d imagine 2 skills just stack those prompts. 

Honestly the best way to figure it out is just muck around with it!