git worktrees are extremely useful when you're running concurrent coding agents.

Last couple days I made this[1] little `vibe` bash script that you can call like `vibe ~/code/ziggurat "please make me a nostr rely in zig"` and it will

- create a tmux session called "vibe" if one doesn't already exist

- create a tmux window in the "vibe" session

- use gpt-4o-mini to summarize your prompt into 15 chars and use this as git branch, git worktree and tmux window name. neat thing here is that i'm reading the api key out of 1password cli: `OPENAI_API_KEY=$(op read "op://cli/openai/configs" 2>/dev/null)`

- launch claude code with the prompt

Now my workflow is that I usually have ~5 agents running at once in a tmux session. The tmux window name at the bottom changes color when the agent stops running (forgot how i did that lol). Pretty slick.

[1] https://gist.github.com/justinmoon/49004f41817be1e6d757c3abd25e9eb3

Reply to this note

Please Login to reply.

Discussion

Mfw worktrees have been in git for 10 years. Could've used them a lot. How did you learn this sorcery?

My fedi coworker dpc told me about them a couple years back, but I never bothered until wanting to run Claude code more concurrently

git book is a treasure

That's cool

Mind-blowing what you're doing. Isn't it expensive? LLMs also seem to need too much adult supervision to let them work together.