SShortSingh.
Back to feed

Why Restarted AI Agents Send Duplicate Messages and How to Fix It

0
·1 views

AI agents that recover from crashes can mistakenly send the same message twice when execution recovery and outbound-delivery recovery are treated as a single process. The core problem is that finishing a task and confirming an external delivery — such as a webhook, email, or chat message — have distinct failure boundaries and must be tracked separately. Developers are advised to maintain two independent state machines: an execution record that logs whether a task completed, and a delivery ledger that tracks whether the external system actually accepted the outgoing message. A reliable fix involves committing results and delivery items in sequence, using stable idempotency keys, and querying provider records before retrying after a crash. Engineers should also inject failures at each processing boundary during testing and verify provider-side effects, not just local logs, to confirm duplicate sends are truly prevented.

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 ·

Free self-hosted market dashboard tracks stocks, crypto, and bonds with no API keys

A developer has released an open-source market dashboard on GitHub that aggregates global financial data without requiring paid API subscriptions. The tool pulls live data from free public endpoints including Tencent, Sina, Eastmoney, and Binance through a Node.js proxy with built-in caching, covering A-shares, Hong Kong, US indices, gold, commodities, crypto, and US Treasury yields. All charts are rendered using hand-written SVG rather than third-party libraries, keeping the bundle lightweight and fast even on older hardware. The dashboard also includes sector money-flow tracking, an industry-chain view, an earnings calendar, and a 24/7 news feed with macro keyword highlighting. It can be self-hosted via Docker on a single Node process, and native builds are available for macOS and Android TV.

0
ProgrammingDEV Community ·

Developer Builds Snapshot Test Suite to Detect Silent AI Model Drift

A software developer noticed their free-tier LLM began producing worse outputs without any changes to their code, prompts, or configuration, pointing to a silent model update by the provider. This prompted them to build a scheduled snapshot regression suite designed to detect when a chosen AI model's behavior has drifted over time. Unlike traditional snapshot testing, the suite handles nondeterministic LLM output by comparing responses using embedding cosine similarity rather than exact string matching. It also enforces hard constraints such as JSON validity, required response keys, and banned phrases to catch structural regressions. The developer published the full workflow with runnable Python code, arguing that LLMs consumed via hosted APIs should be treated with the same version-pinning discipline applied to software dependencies.

0
ProgrammingDEV Community ·

Cloudflare's AI Crawler Payments Signal a Shift From Attention to Data Monetization

Cloudflare recently introduced a feature allowing websites to charge AI crawlers for accessing their content, a move that signals a deeper structural shift in how the internet generates revenue. For two decades, websites monetized human attention by trading free content access to search engines in exchange for visitor traffic, which funded ads, subscriptions, and affiliate links. AI agents have disrupted this cycle by extracting answers directly for users, bypassing the website visit entirely and eliminating those revenue streams for publishers. Unlike humans who resist micro-payments, AI agents can automatically pay fractions of a cent per request using the HTTP 402 status code, making micropayments viable for the first time. This dynamic could transform datasets, APIs, research archives, and product catalogs into metered, transaction-based assets, potentially spawning an entirely new layer of internet infrastructure built around machine-readable, paid resources.

0
ProgrammingDEV Community ·

Unity Built-in Audio vs CRI ADX, Wwise, and FMOD Studio: When to Switch

A technical analysis published on DEV Community compares Unity 6.5's built-in audio system against three major middleware solutions: CRI ADX, Wwise 2025.1.9, and FMOD Studio 2.03. Unity's native tools — including AudioSource, Audio Mixer, and Audio Random Container — are sufficient for small to medium, programmer-led projects that treat audio as code-triggered clips. Larger productions tend to adopt middleware when sound designers need to independently author, package, profile, and validate audio behavior without programmer involvement. CRI ADX suits mobile and console titles with high voice and stream counts, Wwise fits complex large-scale projects with multiple audio contributors, and FMOD Studio appeals to teams prioritizing DAW-like event authoring and fast device iteration. The article suggests that three or more firm middleware-specific requirements — such as parameter-driven playback, category voice limits, or per-platform delivery policies — justify a formal evaluation of third-party tools.