Médula
Kernel coordinating several Claude Code agents on one repo: Jev rates collision risk before each write to pass, wait or escalate.
Overview
Médula is a small, reproducible lab for measuring how multiple coding agents coordinate on one repository, plus a kernel that coordinates them. Before every write, the kernel asks a fast decider, Jev, whether the change collides with what the other agents are doing; based on the probability the write goes through, waits, or goes to a slow path where an LLM (Sonnet, then Opus) decides, bound by the tasks' acceptance criteria.
The lab has six tasks on a room-booking API written to collide in known ways and six coordination modes, with the same Claude Code agents in every mode and every session, diff, evaluation and decision published raw. Findings: git branches hide semantic conflicts, merging cleanly but breaking six tests; with Médula both real conflicts were caught in every run without unnecessary blocks, at the same cost as per-file locks. However, Jev, while cheap (about 0.3 s and $0.00006 per decision), placed 61% of real write decisions in the 'not sure' band, sending them to the slow path, which the author names the biggest open problem. Limits include one to five runs per mode and model-written calibration labels. Offline tests mock the provider.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Does this write collide with what the other agents are doing? | — |
How it works
- Agent attempts a write
- Kernel asks Jev for collision probability
- Confident no: proceed; confident yes: wait
- Uncertain: slow path LLM decides using acceptance criteria
- Every decision is logged with probability, latency and cost
Strengths
- Catches semantic conflicts git misses
- All runs and decisions published raw
- Offline test suite
Caveats
- Jev was uncertain on 61% of real decisions
- Few runs per mode
- Calibration labels written by a model
Getting started
git clone https://github.com/JoaquinRuiz/medula.git && cd medula && uv sync, then (cd medula && uv run pytest).At a glance
- Type
- Project
- Status
- research
- Language
- Python
- Runtime
- FastAPI kernel with Claude Code hooks
- Has code
- yes
- Has tests
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Suggesting Médula for the coding-agents domain. I'm the author.
logicrw/awesome-jev-projectsConcurrency kernel for several Claude Code agents on one repo: before each write, a Jev probability of collision with the other agents' work lets it through, makes it wait or sends it to an LLM slow path bound by the tasks' acceptance criteria; ships a six-mode lab with every run, decision and calibration pair published raw. Limitations: 1–5 runs per mode, and the calibration labels were written by a model.
cobanov/awesome-jev
Frequently asked questions
What does Jev decide?
Whether an agent's pending write collides with other agents' work.
How well did it work?
Real conflicts were caught, but Jev was unsure on 61% of real decisions, sending them to an LLM.
Can I try it without keys?
Yes, the tests mock the provider.
Related projects
Coding-agent tools on Jev with public benchmarks: a strict command gate, a code-review router Action, and use cases.
MCP serverbetaTypeScriptCompiler that turns agent rules in CLAUDE.md and similar files into testable Jev programs: typed questions plus a coded verdict.
ProjectbetaTypeScriptGitHub Action where an AI agent turns an issue into a PR behind guards, checks, a reviewer and a Jev gate that escalates when unsure.
ProjectprototypeTypeScriptSoftware-factory supervisor where Jev independently judges coding agents' completion, test sufficiency, progress and need for a human.
ProjectbetaPythonGitHub Action that asks Jev three yes/no questions about a pull request and approves it only when all clear a confidence threshold.
ProjectbetaTypeScriptZero-dependency Python MCP server where Jev gates shell commands, audits patches and resolves decisions, with SQLite caching.
MCP serverbetaPython