DEV Community

Cover image for Lost updates in four MCP servers: GitHub, Grafana, PostHog and Kubernetes

Lost updates in four MCP servers: GitHub, Grafana, PostHog and Kubernetes

Joshua Bryan on November 13, 2026

Two agents changed different fields of the same GitHub issue at the same moment, through GitHub's official MCP server. Both were told the write suc...
Collapse
 
aryan_bulandi_4f767baf4a9 profile image
Aryan Bulandi • • Edited

Interesting find, especially how both updates can report success while losing one change. It seems that field level updates and version checks are important when several agents work on the same data. Have you tried the fix with repeated concurrent updates?

Collapse
 
jsbry profile image
Joshua Bryan IsoKron •

Yes. With the fixes applied we re-ran the same simultaneous pairs. A patched GitHub build lost 0 of 12. The Grafana fix lost 0 of 60 on Grafana 13, but on Grafana 11, which only has the legacy save endpoint, it still lost 14 of 30. Restoring the version check isn't enough there, because that endpoint accepts two saves that arrive together. For PostHog, the maintainers' fix covers insights; cohorts and dashboards aren't fixed yet. The counts are still small, so treat them as "the fix holds under forced collisions", not as a rate.

Collapse
 
aryan_bulandi_4f767baf4a9 profile image
Aryan Bulandi •

Thanks for such detailed results! The Grafana 11 example is an excellent one to highlight how version checks are not sufficient if the legacy endpoint supports concurrent saves. Good point on thinking of them as forced collisions and not just a general fail rate. Would be interesting to see how they handle at higher concurrency.

Thread Thread
 
jsbry profile image
Joshua Bryan IsoKron •

Thanks. Higher concurrency is the right next question. Our pairs were two writers released together on purpose, so they show whether a fix holds under a forced collision, not how it scales. With more writers the shape changes: on a fix that refuses stale writes, every writer but one gets a conflict and has to re-read, so the cost moves from lost data to retries. We haven't measured three or more writers yet. It's on the list, and if we run it I'll post the numbers here.

Collapse
 
shansjl profile image
shansjl •

Really useful write-up. The GitHub case (read every field, merge, write the whole set back) is the exact pattern I fell into first while building an MCP server for a desktop app, so it's good to see it measured instead of hand-waved.

What helped in my case, in case it's useful to anyone hitting the same thing:

  • Field-level commands instead of "write the object". A tool sets one property of one item, so two writers touching different fields can't clobber each other.
  • A revision number on every write. A tool call carries the revision it read; if the object moved since then, it returns a conflict with the current state instead of a success. The agent re-reads and decides.
  • For multi-step changes, a short lease: the agent takes it, makes its grouped edits, releases it. Other writers (including the human in the UI) see that a batch is in progress instead of landing an edit in the middle of it.

The thing that surprised me most is your PostHog row: the MCP layer was innocent and the loss was in the product API. That's a good reminder that an MCP server can only be as safe as the write path under it.

Did you see any server that returned a conflict in a form an agent actually handled well, i.e. retried with a fresh read rather than just reporting failure?

(Disclosure: I build CutVoke, an open-source video editor where Claude Code/Codex and a human edit the same timeline over MCP, which is where these lessons came from: github.com/frankShan001/CutVoke)

Collapse
 
jsbry profile image
Joshua Bryan IsoKron •

Thanks, and your three patterns are close to where we ended up: write one field at a time, carry a version on every write, and handle grouped edits as a unit. We've been looking at atomic batches for that last one, but a lease makes more sense when a human is editing in a UI at the same moment.

On your question, honestly: we've measured servers returning conflicts, but not yet what agents do with them. In our proposed Grafana fix, every simultaneous pair came back with one conflict, and a single retry from a fresh read landed both edits in 60 of 60. That retry was in our test harness, though, not the agent's own choice. In the Kubernetes server, resources_scale returned an injected conflict as an error with nothing changed. A conflict seems usable when it comes back with the current version or state, the way yours does, so the retry is one call instead of a guess. Measuring what agents actually do with that is on our list.

A human and an agent sharing one timeline is exactly the case where conflicts happen without anyone trying, so CutVoke looks like a good real-world test.

Collapse
 
shansjl profile image
shansjl •

That's really helpful, thanks. The 60/60 single-retry result is the number I was hoping existed, even with the retry coming from your harness: it suggests that once a conflict carries the current state, one fresh read-and-apply is enough.

For what it's worth, CutVoke's conflict response returns the current revision plus the changed state, so the agent's next call can be a fresh read-and-apply rather than a guess.

If you ever get to measuring agent behaviour on conflicts, I'd be glad to help set up a human+agent timeline scenario as a test case.

Thread Thread
 
jsbry profile image
Joshua Bryan IsoKron •

Thanks, I'd like that. Since your first question we've started measuring exactly this: in our current audit we seed a conflict on purpose and record what the agent does next: re-read and re-apply, retry blind, overwrite, or report failure honestly. Once that's written up I'll get in touch about a human+agent timeline scenario on CutVoke.

Thread Thread
 
shansjl profile image
shansjl •

Glad you're measuring the agent's next move, and those four buckets — re-read and re-apply, retry blind, overwrite, or report failure honestly — are exactly the split I'd want to see. Happy to help set up a human+agent timeline case when you're ready. No rush; reach out here or on the repo whenever the write-up is far enough along.

Thread Thread
 
jsbry profile image
Joshua Bryan IsoKron •

Thanks, I’ll take you up on that. The human+agent timeline case is next on our list, and I’ll reach out here once the write-up gets to it.

Collapse
 
gorchase profile image
Gordon Chase •

Pairing force: true with a stripped resourceVersion is basically git push --force in a hard hat—rolling MAX_CONNECTIONS back to 100 while cheerfully swearing the neighbors weren't touched. Even with force: false, Kubernetes server-side apply only catches conflicts between distinct fieldManager names, so two concurrent MCP processes sharing one static manager string will still overwrite each other without resourceVersion. Worse, hand a 409 Conflict back to an agent on a full-object tool and its first instinct is to fetch the fresh resourceVersion and re-post its entire stale manifest anyway—turning a blind clobber into a politely version-stamped one unless narrow resources_patch edits replace full-body writes.

Collapse
 
jsbry profile image
Joshua Bryan IsoKron •

Agreed on the field-manager point: server-side apply only reports a conflict when a different manager owns the field, so two processes sharing one static manager name can't see each other, and only a resourceVersion precondition catches that case. That's why the research build pairs apply without force with a resources_patch tool that takes an optional resourceVersion, instead of relying on field ownership alone.

Your last point is the one we've been measuring: what an agent does right after a conflict. Does it re-read and re-apply its intended change, retry blind, or re-post the stale object with a fresh version? A study on exactly that comes out this week; I'll link it here when it's up.

Collapse
 
jsbry profile image
Joshua Bryan IsoKron •

As promised, the study is up: https://isokron.ai/research/mcp-conflict-errors-ai-agent?utm_source=devto&utm_medium=social&utm_campaign=mws-launch&utm_content=comment

Short version, with its limits: exploratory pilots, almost all on one small model, on two servers we wrote that both refuse stale writes (our sample tracker, not Kubernetes).

  • With no system prompt, the re-post you describe never cost a change with any wording we tried: 0 losses in 392 runs across seven wordings.
  • Under a prompt telling the agent not to re-read, it did, in one trap. The error listed the labels unquoted, and one label was spelled like the current version (v3 at version 3). The agent took the label for the version number and resent its old list under the new version, and the other writer's change was lost in 38 of 48 runs. With the labels quoted, 0 of 48. Without the look-alike label, the same text lost 0 of 117.
  • None of the 59 coded final messages after a loss disclosed it (one AI coder, which knew the outcomes), so check the end state, not the agent's summary.

So the "version-stamped clobber" is real, but in these runs it took a misreadable error to trigger it. Your narrow-patch point is the other half: a version check refuses a stale version, not stale content.