WHAT NEW IN X10.31 SAT

AI collections from X · 22 collections · 61,986 posts

jevVIDEO

Claude Code parallel agents each get their own git worktree

Using git worktrees to isolate three Claude Code sub-agents editing the same repo in parallel, with small decisions routed through Jev in milliseconds.

delost
@thedelostArchived 14 days agoOriginally posted 2026.10.16
delost @thedelostOriginally posted 2026.10.16
Open original on X

THIS IS ABSOLUTE F*CKING BRILLIANT Anthropic just shared one of the best tricks for Claude Code. The idea: give every agent its own copy of the repo, so three of them can edit the same codebase at once and never collide. Your working tree stops being the thing they fight over, because they are not allowed to touch it at all. You just launch Claude Code like this: claude --worktree feature-auth here's the split: → Sonnet 5.5 runs the main session and reviews, it stops editing → every agent gets its own git worktree on its own branch → three agents refactor, migrate and test the same repo in parallel → you stop babysitting one agent at a time in one checkout your checkout is protected at three points: → an agent tries to Edit or Write a file outside its worktree → a command tries to cd back into your checkout → git gets redirected at your branch with -C or GIT_DIR Agents branch. Tests run. You merge. JEV engineering is the same move one layer down: the forks that need no thinker (which file, which agent, retry or stop) go to JEV in milliseconds, and the big models only see the ones that split the full tree > Sonnet 5.5 runs the main session and never writes to your checkout > refactorer runs in worktree-auth with isolation: worktree > migrator runs in worktree-api on its own branch > tests runs in worktree-suite, so a red suite blocks nobody > .worktreeinclude copies .env into every new worktree > JEV routes micro-forks in milliseconds paste the tree and this prompt into Claude Code ↓ "Rebuild my Claude Code setup around this tree: 1. Add isolation: worktree to three subagents in .claude/agents: refactorer, migrator, tests. 2. Create a .worktreeinclude with .env and .env.local so every new worktree is runnable. 3. Add one rule to CLAUDE.md: the main session reviews and merges, it never edits files itself. 4. Route fast deterministic forks (file choice, agent choice, retries) through JEV. Show me every change as a diff first. No edits until I say go." ↳ http://code.claude.com/docs/en/worktrees save it, it'll come in handy.

This post quotes another post: x.com/hanakoxbt/status/2110067711363457244

x.com/thedelost/status/2110844064857796821Archived 2026.10.16 10:04