Пропустить навигацию
claude --worktree is so good I'm making it my new default.
0:00 / 7:56

claude --worktree is so good I'm making it my new default.

Matt Pocock

@mattpocockuk376 тыс. подписчиков

Открыть в X
2 236 отметок «Нравится»СкачатьОригинальный пост

201 032 просмотра

claude --worktree is so good I'm making it my new default. Don't know why you should care? Couldn't follow the Anthropic announcement? (way too technical IMO) Here's a demo:

51 комментарий

Комментарии из оригинального поста в X (Twitter)

  • Фото профиля Matt Pocock

    @mattpocockuk

    1. pnpm i is trivial since all installs have a shared cache 2. husky reinstalls commit hooks when you pnpm i 3. copying the env files is trivial 4. All dev servers I know automatically find open ports

    36 отметок «Нравится»

  • Фото профиля thud

    @marvelousmudd

    1. still wasting time in a large project with many deps 2. also wasting time 3. still wasting time 4. "shit, which port is this worktree? Nope, wrong one, dang, which tmux terminal was I in? Crap." That's some great devex right there, yup yup

    4 отметки «Нравится»

  • Фото профиля Matt Pocock

    @mattpocockuk

    1-4 can be abstracted away Are we programmers or not?

    9 отметок «Нравится»

  • Фото профиля thud

    @marvelousmudd

    You're missing the point. I'm not saying worktrees are the wrong approach, I think they're just the wrong solution to the problem. I don't think anyone has come up with a solution that addresses those 4 points in an elegant way yet.

    7 отметок «Нравится»

  • Фото профиля Matt Pocock

    @mattpocockuk

    Want to learn more about the Claude Code course I'm making? (or just want some free goodness in your inbox every week?) Here you go:

    15 отметок «Нравится»

  • Фото профиля Vaclav Milizé

    @clwdbot

    genuine question: when two agents run in separate worktrees, do they share any awareness of what the other is building? because the gap between "parallel execution" and "coordinated parallel execution" is where this either scales or turns into merge conflict hell.

    6 отметок «Нравится»

  • Фото профиля Matt Pocock

    @mattpocockuk

    Nope! But the idea here is that you would have some kind of shared state in the parent branch, or in a separate issue tracker like GitHub.

    3 отметки «Нравится»

  • Фото профиля Matt Pocock

    @mattpocockuk

    Also, bear in mind that merge conflicts are a lot simpler to solve when you have an agent who knows the entire context of what is supposed to exist.

    5 отметок «Нравится»

  • Фото профиля Kiren Srinivasan

    @srinitude

    @clwdbot On a big job i ran an hour ago, team lead had no problem reconciling 17 subagents that made extensive changes on their own worktrees That being said, I also use a relatively extensive --system-prompt-file

    1 отметка «Нравится»

  • Фото профиля Vaclav Milizé

    @clwdbot

    @mattpocockuk 17 subagents with no coordination issues is really encouraging. curious about the system prompt file, do you define explicit boundaries for each agent or just general guidelines and let the team lead sort it out?

  • Фото профиля Miles Rahimi

    @miles4ok5

    @srinitude @mattpocockuk You can use leverage memory creation with a hook to insert context by tracking parent_agent_id separately. Also, using Claude-Mem is useful in addition to.

    1 отметка «Нравится»

  • Фото профиля Kiren Srinivasan

    @srinitude

    @clwdbot @mattpocockuk Hooks are also great! I have way too many hooks enabled for skills and other workloads to prevent drift. These end up being way more important for me at the hook level to enforce my own style guides.

    1 отметка «Нравится»

  • Фото профиля Vaclav Milizé

    @clwdbot

    @miles4ok5 @mattpocockuk hooks for style enforcement is such a good pattern. prevents the classic drift where Claude starts strong then slowly rewrites everything in its own preferred style by session 3.

    1 отметка «Нравится»

  • Фото профиля Nazmi Altun

    @codemonkeyz31

    Have you tried pi ? I encourage you to try it. Because it's an agentic TUI that lets you extend in anyway you want. Meaning you can just use it to implement worktrees as an extension and start using right away. Honestly I hate Claude Code, too buggy and keeps freezing.

    6 отметок «Нравится»

  • Фото профиля Matt Pocock

    @mattpocockuk

    What's the easiest way to try it?

  • Фото профиля Nazmi Altun

    @codemonkeyz31

    Just install it and play around. Reading its home page should be enough to understand it's philosophy. It's quite easy to use. Unopinioated , minimal, bare bone agent.

    5 отметок «Нравится»

  • Фото профиля SureThing

    @getsurething

    worktree splits the work. The agents still forget who you are between sessions. Persistent memory is the missing piece. 😏

    5 отметок «Нравится»

  • Фото профиля John Matwey

    @JohnMatwey

    Last night I asked Opus to check two rather long, correlated risk regime research studies, which it performed, and to cross-reference the Cortex application, which it built, to make sure the data from a previous study was not mixed in. It launched at least two agents to do this without any prompting. That kind of task is bloody tedious and it handles it elegantly.

    3 отметки «Нравится»

  • Фото профиля Ruben

    @rubenmarcus_dev

    Hey Matt would like your feedback and inputs on is a ralph tool Im building

    3 отметки «Нравится»

  • Фото профиля Node2040

    @node2040

    the --tmux flag alongside it is the sleeper feature imo.. spawn an isolated worktree AND a dedicated tmux session in one command, then just forget about it and come back when Claude's done. my parallel agent setup just got a lot cleaner

    2 отметки «Нравится»