The Coordination Problem for AI Coding Agents
Running multiple AI coding agents on the same codebase presents an immediate coordination challenge. When Agent A begins refactoring authentication logic and Agent B, operating in parallel, starts the same task without awareness, the result is not elegant code but a tangled mess. Standard AI agents often boot with an empty context window, lacking memory of previous sessions or ongoing work. This leads to duplicated effort and conflicting changes.
Traditional solutions to this coordination problem fall short. Storing state in a file within the repository pollutes the diffs and inevitably leads to merge conflicts. Relying on an external issue tracker introduces dependencies on network connectivity, API tokens, and rate limits – turning a local task into a fragile, server-dependent operation.
Dmitry Sarkar, the creator of grite, identified this friction point and developed a novel solution that leverages the fundamental properties of Git itself. The core insight is to treat issues and agent actions not as stateful files, but as immutable events within a version-controlled log.
Grite: Issues as Events, Git Refs as the Log
Grite reframes the concept of issue tracking for AI agents. Instead of files or database entries, issues are treated as events. The repository's Git references (refs) act as the append-only log for these events. This approach eliminates the need for a separate server, database, or complex state management.
The system operates on a simple yet powerful principle: each action taken by an AI agent is recorded as a commit-like event. These events are stored within the Git repository, making them version-controlled and auditable. When multiple agents work concurrently, grite ensures that their actions are recorded sequentially in the Git log. This is achieved through deterministic CRDT (Conflict-free Replicated Data Type) merging, which guarantees that even if agents attempt to write concurrently, the final state is consistent and free of conflicts.
Think of grite less like a traditional bug tracker and more like a meticulously kept diary for your AI agents, where every entry is immutable, timestamped, and part of the official history, managed entirely by Git.

Deterministic CRDT Merging for Conflict Resolution
The key to grite’s ability to handle concurrent writes without conflicts lies in its use of deterministic CRDT merging. CRDTs are data structures that are designed to be replicated across multiple locations and updated concurrently without requiring a coordination service.
In the context of grite, when an AI agent performs an action (e.g., refactoring a function, fixing a bug), this action is transformed into an event. Multiple agents might generate events for similar or overlapping tasks. Grite ensures that these events are integrated into the Git log in a deterministic order. This means that regardless of the order in which events are processed or merged, the final state of the issue log will always be the same. This deterministic merging is crucial for maintaining consistency across agents working in parallel.
The process ensures that the history of actions is preserved, and any potential race conditions are resolved by the inherent properties of the CRDT and Git's append-only nature. This eliminates the need for explicit locking mechanisms or complex consensus protocols that would typically be required in distributed systems.
The Git-Native Advantage
By building grite directly on top of Git, Sarkar eliminates external dependencies. The issue log is inherently part of the repository. This means:
- No External Servers: All data resides within the Git repository.
- No Databases: Git's commit graph serves as the data store.
- No Network Dependency: Coordination happens locally, making it fast and reliable.
- Atomic Operations: Actions are recorded via Git commits, ensuring atomicity.
- Version Control: The entire history of agent actions is versioned, auditable, and can be rolled back like any other code change.
This approach radically simplifies the workflow for developers and AI agents. It integrates seamlessly into existing Git workflows, requiring no special infrastructure or complex setup. Developers can use standard Git commands to inspect the agent's activity log, making the process transparent and manageable.
Implications for AI Development Workflows
The implications of grite extend beyond simply preventing merge conflicts. It fundamentally changes how AI agents can be integrated into software development processes. By providing a reliable, local, and version-controlled mechanism for coordinating agent actions, grite enables more sophisticated and complex AI-driven development workflows.
For instance, agents can now reliably build upon each other's work, perform multi-stage refactorings, or collaborate on large feature implementations without the fear of overwriting each other's progress or creating unresolvable conflicts. This opens the door for AI agents to take on more significant responsibilities in the development lifecycle, acting more like junior developers collaborating on a team rather than isolated tools.
The ability to have a deterministic, append-only log of all agent actions also provides an invaluable audit trail. This is critical for understanding how changes were made, debugging issues that arise from agent activity, and ensuring compliance with development standards. If an AI agent introduces a bug, tracing its origin through the grite log becomes straightforward.
What remains to be seen is how this model scales with extremely large codebases and a very high volume of agent actions. While Git is robust, the performance characteristics of managing a dense event log as part of the commit history will be a key area to monitor as grite matures and adoption grows.
