Replies: 3 comments
-
|
As a side note, this is ideally a problem Anthropic would need to solve to enable concurrent agents to work in the same branch. Would a mutex, perhaps something akin to a file locking mechanism like |
Beta Was this translation helpful? Give feedback.
-
|
Hi @Pipboyguy, Thanks for reaching out! This refers to multiple Claude Code sessions running at the same time in the same project and also for multiple subagents making modifications. I need to clarify this point better. :) As you pointed out, there are some difficulties getting multiple concurrent sessions working without affecting each other. From my perspective, we can get the session id from the hook event data and store different session data separately using this id. The issue is mapping the results from the test reporters to the correct session data file without resorting to any dangerous or overly complex ways of doing so. I would rather be safe than sorry when it comes to constructing and handling file paths due to the mechanics at play. I am happy to discuss this and take ideas on how to approach this in a clean and safe manner. :) |
Beta Was this translation helpful? Give feedback.
-
|
You're right that you're solving a concurrency control problem, but for Both issues would likely need hooks-based solutions - PreToolUse for conflict prevention and session ID isolation for state management. The main risk I see is deadlock if multiple sessions acquire locks in different orders. This is coming from a someone without much knowledge of concurrent programming, I just want to solve this issue to reduce my screen time staring at streaming tokens all day |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm not sure whether this refers to subagents or something else like git worktrees?
I've tried
tdd-guardwith multiple concurrent subagents but it does seem like they start writing to same files at the same time, triggering the pre-tool hook in a confusing way.Am I misinterpreting or misunderstanding current limitations? If so, how would you recommend speeding up large projects where TDD can take a while?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions