What did your agent do that you only found out about later?
by•
Not the dramatic stuff that gets blocked. The quiet things you only notice an hour or a week later
Mine was two agent sessions working in the same repo. One of them went to clean up its own background process by matching the name and killed the other session's run too. No error anywhere. I just found a half finished job later and had to figure out why
What's yours and did it change how you set things up
38 views

Replies
Same kind of thing here with two agents in one folder: one overwrote a file the other was halfway through editing, no error, just a confusing diff later. Now parallel agents each get their own git worktree. Killing by process name is scary though, matching by PID would have saved you there.
@wwenioaguiar exactly .. even mine was tmux. i had three claude sessions going in the same repo and attached to the wrong one without noticing.. so a brief meant for one agent got picked up by another. no error.. just a mess i spent an hour untangling. As you said it's a lot better now though. @Claude Code can give each agent its own worktree so they can't step on each other's files and i don't juggle tmux panes anymore 😄
@wwenioaguiar @neelagiri_chettiyar I agree - at first, ages ago 🤣, I used the branch approach - but with worktrees + a parent folder + agents, everything seems to run smoothly and you can do 4 or 5 things at once on the same project without things getting messsy
@neelagiri_chettiyar @gfazioli The parent folder setup is a nice touch. How do you handle merging back with 4 or 5 running at once? Do you merge each one as soon as it finishes, or batch them at the end? I'd expect conflicts to pile up when several touch the same area.
@neelagiri_chettiyar @wwenioaguiar so far, Claude has handled any conflicts 🙏 a lot depends on what the sub-agents were working on, though.. at that stage, I have separate PRs that all target main, and as they get merged, one or more of them might lead to a minor or patch release. It's the final release stage, so I take it step by step, but I haven't had any problems so far. I think it also comes down to how the issues are organized and where the agents are working. Maybe I've just been lucky with how I separated their work, but it's something to keep in mind... 👍
@neelagiri_chettiyar The tmux one is worse because nothing looks wrong. The brief goes in, the wrong agent happily works on it, and you only find out from the diff. Worktrees fix the files part. Naming each pane after its worktree branch would probably fix the "which one am I in" part too.
I use "agents" mode from a parent folder specifically to avoid that - the agents can see each other and wait for each other. I didn't expect that at first, but it impressed me how everything was coordinated properly without any overlap
@gfazioli wait.. they actually wait for each other? that's the bit i'm missing. mine are all isolated in their own worktrees but none of them know the others exist .. so i'm the one doing the coordinating.. which is basically how i ended up in the tmux mess 😄.. is "agents mode" a claude code thing or something else you're running from the parent folder?
@neelagiri_chettiyar basically... here's a concrete example: I have three Mac apps to manage, FinderGit, Netfox, and Lancetta. They're all under the "MacOS" folder 😉, so I have "MacOS/Findergit", "MacOS/Lancetta", etc. I run "claude agents" (it's a Claude feature) from the "MacOS" folder, which has its own "CLAUDE.md" and ".claude" folder. So I never work inside an individual app's folder; I manage everything from the parent folder.
I originally set it up this way because I have two Macs and needed to be able to pick up my work on either one. So I created a private repo that syncs the parent "MacOS" folder, storing only "CLAUDE.md" and the ".claude" folder. When I want to work on FinderGit, I just ask it to work on that app (in worktree mode). This way, multiple "MacOS" sessions are always aware of what's happening in the others.
If you want, check the docs, but Claude Agents gives you an overview of what's going on when you have multiple sessions. You can switch between them without having dozens of terminal tabs open. Today I finally have just one terminal window where I can keep track of and manage everything.
Tip: if you have a session open, just press the left arrow twice and you'll see the "agents" screen...
worktrees fix the file clobbering but not the quiet part. the scary one is the agent doing something and you only find out later. do you log what each agent actually ran, or just read the diff after?
It hit an API timeout, quietly swapped in a hardcoded mock object, and reported the integration test was passing. A failed run is just debugging. Passing on fake data means the priority is declaring success rather than being right.