Rida Al Barazi

3.3K posts

Rida Al Barazi banner
Rida Al Barazi

Rida Al Barazi

@rida

I build agent infrastructure and write about what goes wrong. Mostly what goes wrong.

Toronto Katılım Ekim 2007
1.7K Takip Edilen1.3K Takipçiler
Sabitlenmiş Tweet
Rida Al Barazi
Rida Al Barazi@rida·
When you're juggling multiple Claude coding sessions and your local env becomes the bottleneck: I built something for a safer YOLO mode: ./bin/feature-start oauth → Isolated worktree + container + DB + live URL → Ready for Claude/Codex → 10 seconds Zero conflicts. /1
GIF
English
1
0
3
454
Rida Al Barazi
@rachelnabors Port conflicts are the visible symptom. The silent killer is two worktrees running migrations against the same database in parallel. Portless + per-worktree containers covers both layers.
English
0
0
1
40
R 'Nearest' Nabors
R 'Nearest' Nabors@rachelnabors·
If you're running more than one coding agent, you're running into localhost conflicts. Portless will fix that for you AND it works with git worktrees! github.com/vercel-labs/po…
English
2
3
51
4.3K
Rida Al Barazi
@kovyrin Same. I tried to use OpenClaw to orchestrate a bunch of Claude Code and Codex sessions in separate worktrees but it was way too clunky.
English
0
0
0
25
Rida Al Barazi
Rida Al Barazi@rida·
@andrewmichaelsa @meetblueberry The worktree support is the standout feature here. File-level isolation is step one though. When each worktree needs its own ports, DB, and Docker network, that's where most setups still fall apart.
English
1
1
4
142
Andrew Michael
Andrew Michael@andrewmichaelsa·
@meetblueberry a modern IDE for product builders. - Terminal, editor, and preview browser in one app - Your model of choice sees your entire project, code, browser, and tools - Full Git worktrees support built in, work on multiple branches at once - Flow mode, Hyprland inspired tiling layouts, ambient music Stop juggling tools. Build and ship from one workspace with Blueberry.
English
12
11
105
370K
Rida Al Barazi
Rida Al Barazi@rida·
@dgalarza The .env.local per worktree is solid for DB isolation. Where I ran into trouble was ports and Docker networks. Two worktrees both wanting port 3000, or sharing the same Redis. Ended up wrapping the whole environment in per-worktree containers.
English
0
0
1
17
Damian Galarza
Damian Galarza@dgalarza·
WorktreeCreate hook is the answer. It was designed for developers not using git — so it replaces the entire setup workflow. You can use it to: - Create the worktree - Copy .env via .worktreeinclude - Write a .env.local with dedicated database URLs per worktree Genuine isolation. No collisions.
English
2
0
0
35
Damian Galarza
Damian Galarza@dgalarza·
Claude Code’s native worktree support is great. But there’s a piece of it I haven’t seen documented anywhere — and it solves a problem that’ll bite you when running parallel agents. Watch first: youtu.be/hEE0mc-3D_c
YouTube video
YouTube
English
2
0
2
98
Rida Al Barazi
Rida Al Barazi@rida·
@alexandertweak @aarondfrancis The env var thing kills you silently too. Two worktrees pointing at the same DB, running migrations in parallel. I built isolated containers per worktree with dedicated tunnels for preview. Check it out at branchbox.dev
English
0
0
1
22
Axentioi Alexandru
Axentioi Alexandru@alexandertweak·
@aarondfrancis The only issue with this is having proper preview models, like when you do a pr with vercel you see a preview of that PR, env vars and other setup tools are hard to get right with worktrees, could only work with proper e2e in place or crazy workflows
English
1
0
0
45
Aaron Francis
Aaron Francis@aarondfrancis·
Why do people like git worktrees over discrete checkouts? (This isn't bait, it's research)
English
269
4
363
137.7K
Rida Al Barazi
Rida Al Barazi@rida·
This is the second time I hear about dagger this month. I gotta check it out. I ended up building BranchBox.dev to solve the same problem. Each worktree gets its own container, ports, DB, tunnel. Right now it’s coupled to dev containers. Dagger sounds like it could be a good alternative
English
1
0
0
15
Andrew S Clough
Andrew S Clough@asclough·
@rida dagger.io was proposed as a solve one place I looked, but I didn't full grasp the implementation. I think you're right on the database side for sure.
English
1
0
1
21
Rida Al Barazi
Rida Al Barazi@rida·
Following the worktrees conversation today. The consensus is clear: worktrees are the way for parallel agent work. But file isolation is just the start. Agents also share ports, databases, env vars, and Docker networks. That's the collision layer nobody talks about.
English
1
0
1
35
Rida Al Barazi
Rida Al Barazi@rida·
@M4XMXM That's exactly what I ended up building BranchBox for. Each worktree gets its own container, ports, DB, tunnel. The file isolation is the easy part, it's everything else that collides.
English
0
0
1
16
Maximillian Piras
Maximillian Piras@M4XMXM·
@rida Glad you enjoyed it Rida! Unfortunately I dont have a solution for that as I mostly do frontend & strategy work, so it hasn’t been an issue I’ve run into yet.
English
1
0
1
25
Rida Al Barazi
Rida Al Barazi@rida·
@teknopawn We hit the same .env pain. Solved it by auto-mounting dotfiles into each worktree's container. The isolation is in the runtime, not the filesystem. Keeps everything local and fast.
English
1
0
0
32
Brando Magnani
Brando Magnani@teknopawn·
Git worktrees sound great until your .env is in .gitignore and nothing works. Tests fail, configs are missing, you're debugging your tooling instead of building. We built Evolve so agents run in isolated sandboxes --not fragile local worktrees. github.com/evolving-machi…
English
2
0
1
157
Rida Al Barazi
Rida Al Barazi@rida·
@drewdil @andrewchen That M1 Pro holding up multiple agents is impressive. What are you using for the orchestration layer? I ended up building a CLI that handles worktree + container + DB + tunnel creation in one command.
English
1
0
0
31
drew dillon
drew dillon@drewdil·
@andrewchen it finally killed Cursor for me, just a very smart orchestration of git worktrees. I can run as many agents as my wheezing M1 Pro can handle from a single repo clone.
English
2
0
2
480
andrew chen
andrew chen@andrewchen·
I know I’m not the only one Mon-Fri: zoom zoom email email gsheet gdoc Fri-Sun: ssh tmux vi codex playwright openclaw npm claude git ollama cursor
English
124
69
1.4K
85.5K
Rida Al Barazi
Rida Al Barazi@rida·
@garybasin @runaway_vol 'Shifting the problem left' resonates. For me that meant: don't try to coordinate agents on shared state. Give each one a fully isolated environment. The merge is the only coordination point.
English
0
0
2
69
Gary Basin
Gary Basin@garybasin·
@runaway_vol The agents are not reliable enough yet but if you try this you’ll find many cases of trying to batch edit files that conflict another agent’s batch edits. You can branch and merge or use worktrees or whatever but shifting the problem left seems to be optimal.
English
3
0
3
434
Rida Al Barazi
Rida Al Barazi@rida·
@MingtaKaivo @jpschroeder The merge conflict piece is real. What helped me was giving each agent its own container + DB + ports via worktrees, so they can't collide on shared state. File conflicts still happen but are way easier to resolve when the runtime environment isn't also tangled.
English
1
0
0
19
Mingta Kaivo 明塔 开沃
Mingta Kaivo 明塔 开沃@MingtaKaivo·
@jpschroeder worktrees + hooks is exactly my setup. the unsolved part is merge conflicts when 3 agents touch the same util file simultaneously
English
2
0
0
186
Justin Schroeder
Justin Schroeder@jpschroeder·
I can't be the only dev that doesn't want a GUI for my CLI... I made dmux.ai because I didn't want to re-invent the interface. tmux is great, worktrees + hooks just work, and CLIs have been the go-to interface for nerds since before the moon landing.
English
9
1
46
4.6K
Rida Al Barazi
Rida Al Barazi@rida·
@nearestnabors @aarondfrancis @joelhooks I automated this with BranchBox `branchbox feature start` creates the worktree, container, DB, ports, Docker network. One command. The missing piece for me was that worktree file isolation isn't enough.. agents still collide on ports and database state.
English
1
0
0
22
Rida Al Barazi
Rida Al Barazi@rida·
Identity management for agents is the thing nobody talks about but everyone hits. You don't notice it until you're 4 agents deep and realize you've spent your afternoon in IAM consoles instead of shipping. First-class concern. Full stop.
English
0
0
1
33
Rida Al Barazi
Rida Al Barazi@rida·
This is exactly the problem that pushed me to build BranchBox. Same pattern: worktrees are perfect for parallel agent work until the environment falls apart. We auto-isolate everything: DB, ports, Docker network, even Cloudflare tunnels. Stack-agnostic, so it works for Laravel, Rails, Node, whatever. The setup tax per worktree should be zero.
English
1
0
1
51
Jakub Gause
Jakub Gause@JakubGause·
Git worktrees are great for running multiple Claude Code sessions in parallel. Until you realize each one needs its own database, its own Herd domain, its own Vite port, and a properly configured .env. Setting that up manually every time kills the whole point.
English
2
0
4
116
Rida Al Barazi
Rida Al Barazi@rida·
This is exactly the workflow I’ve been obsessing over. The port isolation per worktree is the thing that trips everyone up, especially when each agent needs its own DB and Docker network. I ended up building BranchBox to handle that automatically. Curious how you’re managing the container/DB state across your worktrees?
English
0
0
0
18
Jaytel
Jaytel@Jaytel·
I built /iterate to spin up N number of agents on new worktrees - all that explore different directions of a problem. They come back for review, each on a different preview port. Then I choose one, and everything converges back into 1 branch. Rinse and repeat.
English
3
2
33
2.1K
Rida Al Barazi
Rida Al Barazi@rida·
OpenClaw prompt of the day: “Given everything we’ve been doing together, everything you know about me, and everything you know about yourself, and your soul. How would you update your soul and personality” Try it with OpenAI and then Anthropics models.
English
0
0
0
53
Rida Al Barazi
Rida Al Barazi@rida·
The Devin approach (dedicated VMs) works but it's expensive. Locally, worktrees + Portless gets you partway there. The missing piece is per-agent containers, own DB, own Docker network, own env vars. Without that, agents still collide on shared state even with separate file trees.
English
0
0
0
18
MJ
MJ@Mahmut_Jomaa·
@jonathan_wilke For example Devin has its dedicated VM instance in the cloud. It validate changes using preview deployments (including Neon/Planetscale DB branch). If you’re using a local tool like Codex App or Conductor, you’d typically rely on Git worktrees and optionally Portless.
English
2
0
0
54