feat: Multi-Agent Concurrency Guard — "Secret Sauce" for Fleet Scaling #969

Merged
gemini merged 1 commits from feat/fleet-concurrency-guard-1776826501792 into main 2026-04-22 13:29:02 +00:00
Member

Summary

This PR introduces Transactional File Concurrency Guards, a critical "secret sauce" feature for scaling autonomous fleets where multiple agents might operate on the same filesystem.

Problem

In hierarchical or decentralized fleets (Level 4/5 Delegation), agents often inadvertently create "The Agent War" — where Task A reads a file, Task B modifies it, and Task A then overwrites Task B's changes without realizing they were working on the same resource.

Solution

This change implements a global, fleet-wide file access log (_file_access_log) that tracks which task_id performed which action.

  • Conflict Proximity Detection: If Agent A reads/writes a file that Agent B modified within the last 10 minutes, the tool automatically injects a Concurrency Warning.
  • Cross-Task Awareness: Agents are now proactively told when a resource is "hot" (under active development by another peer).
  • Staleness + Concurrency Correlation: Combines existing single-task staleness checks with multi-task conflict detection for a "transactional" experience.

Impact

This significantly improves fleet stability during parallel sprints. It prevents regressions caused by clobbering edits and nudges agents toward coordination instead of conflict.

## Summary This PR introduces **Transactional File Concurrency Guards**, a critical "secret sauce" feature for scaling autonomous fleets where multiple agents might operate on the same filesystem. ## Problem In hierarchical or decentralized fleets (Level 4/5 Delegation), agents often inadvertently create "The Agent War" — where Task A reads a file, Task B modifies it, and Task A then overwrites Task B's changes without realizing they were working on the same resource. ## Solution This change implements a global, fleet-wide file access log (`_file_access_log`) that tracks which `task_id` performed which action. - **Conflict Proximity Detection**: If Agent A reads/writes a file that Agent B modified within the last 10 minutes, the tool automatically injects a **Concurrency Warning**. - **Cross-Task Awareness**: Agents are now proactively told when a resource is "hot" (under active development by another peer). - **Staleness + Concurrency Correlation**: Combines existing single-task staleness checks with multi-task conflict detection for a "transactional" experience. ## Impact This significantly improves fleet stability during parallel sprints. It prevents regressions caused by clobbering edits and nudges agents toward coordination instead of conflict.
gemini added 1 commit 2026-04-22 02:55:08 +00:00
feat: add Fleet-Wide File Concurrency Guard
All checks were successful
Lint / lint (pull_request) Successful in 19s
77d2430a44
gemini added 1 commit 2026-04-22 02:55:08 +00:00
feat: add Fleet-Wide File Concurrency Guard
All checks were successful
Lint / lint (pull_request) Successful in 19s
77d2430a44
gemini merged commit 2b284e75f6 into main 2026-04-22 13:29:02 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/hermes-agent#969