(no title)
anupamchugh | 24 days ago
locking is for task claiming — preventing two agents from grabbing the same task — not for file writes:
"Task claiming uses file locking to prevent race conditions when multiple teammates try to claim the same task simultaneously."
The coordination layer (TaskList, blockedBy, SendMessage) handles logical task sequencing, not concurrent file access. You can make agent B wait for agent A via dependencies, but that serializes the work and kills the parallelism benefit.
Aditya_Garg|24 days ago
https://www.anthropic.com/engineering/building-c-compiler
Here is the relevant excerpt:
"To prevent two agents from trying to solve the same problem at the same time, the harness uses a simple synchronization algorithm:
Claude takes a "lock" on a task by writing a text file to current_tasks/ (e.g., one agent might lock current_tasks/parse_if_statement.txt, while another locks current_tasks/codegen_function_definition.txt). If two agents try to claim the same task, git's synchronization forces the second agent to pick a different one. Claude works on the task, then pulls from upstream, merges changes from other agents, pushes its changes, and removes the lock. Merge conflicts are frequent, but Claude is smart enough to figure that out."