SShortSingh.
Back to feed

Developer builds JSON claim protocol to stop parallel AI agents from overwriting each other

0
·2 views

A developer running multiple AI agent sessions in parallel on the same machine discovered that agents were silently overwriting each other's work despite operating in separate project repositories. An audit revealed five collisions, all caused by agents ignoring signs of concurrent activity in shared files and configs outside their home directories. To fix this, the developer replaced informal per-project status notes with a standardized JSON claim file system, requiring any agent to register a claim before writing outside its own project tree. The protocol uses four operations — take, renew, release, and refuse — with stale or missing heartbeats allowing another session to safely acquire the claim. A key lesson emerged during testing: a guard that silently fails and still reports success is more dangerous than having no guard at all.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Android Storage in 2026: How Scoped Storage, SAF, and MediaStore Reshape App Dev

Android's storage model has evolved significantly, moving away from simple file path access toward a layered system involving application-private storage, MediaStore, and the Storage Access Framework (SAF). Rather than using direct filesystem paths, modern Android apps often interact with content URIs resolved through ContentResolver and DocumentsContract APIs. Scoped Storage, introduced in recent Android versions, limits unrestricted access to shared storage, pushing developers toward more targeted APIs suited to their use case. SAF goes beyond simple file picking — with user-granted permissions, apps can work with entire document trees that may be backed by local, remote, or cloud storage providers. This architectural complexity has driven developers to build filesystem abstractions that allow apps to work across different storage backends without tightly coupling business logic to any single API.

0
ProgrammingDEV Community ·

Accessibility Fixes Require Engineering Thinking, Not Just Checklist Completion

Accessibility audits identify what is wrong in a product's rendered output, but they do not explain why failures occur or where in the system they originate. Treating each audit finding as an isolated task risks fixing only the symptom while leaving the underlying cause intact, allowing the same issue to resurface. Quick patches such as DOM-rewriting scripts or one-off ARIA overrides can technically close a finding while making the codebase harder to maintain. Durable remediation requires understanding the architecture, component boundaries, and rendering model to fix the source of a failure rather than its individual instances. A fix built into a shared component, template, or design system is far more resilient than one applied only to a specific output.

0
ProgrammingDEV Community ·

Modern browsers can handle file conversion and hashing without server uploads

A developer essay argues that many web tools still route files through servers for tasks browsers have been capable of handling locally for years. Modern browsers support direct file reading via the File and Blob APIs, eliminating the need for old-style FileReader callbacks in most cases. The built-in crypto.subtle API enables SHA-256 and SHA-512 hashing natively, running off the main thread, though it requires a secure HTTPS context to function. Image format conversion, such as HEIC to PNG, can be performed entirely client-side using createImageBitmap and the Canvas API without any data leaving the user's device. The piece highlights that outdated server-dependent tooling persists not because of technical necessity but because browser capabilities have quietly outpaced common developer awareness.

0
ProgrammingDEV Community ·

Researchers Build On-Device AI That Keeps Learning From User Behavior on Android

Developers have created Online-SDFT, an open-source prototype that enables a 230-million-parameter language model to continuously learn from user interactions directly on an Android device. The system uses a rank-4 LoRA adapter and ONNX Runtime Training to fine-tune the model locally, without sending data to external servers. Rather than relying on clean labels or explicit rewards, it uses a 'hindsight' approach where the same base model — with its adapter disabled — reviews completed interactions to generate soft training targets for future decisions. The prototype was tested on a notification-routing task, where the model learns to better decide whether to show, save, or archive alerts based on how users respond over time. By keeping inference, interaction storage, and model updates entirely on-device, the system addresses privacy concerns while enabling personalized AI that improves after deployment.