SShortSingh.
Back to feed

Agent Loop Bug Caused Duplicate Webhook Writes Due to Truncated Tool Output

0
·61 views

A developer debugging a webhook worker discovered that an AI agent loop was triggering duplicate database inserts after receiving truncated tool output — a cut-off JSON response that lacked a closing brace. The agent, unable to confirm the first write had succeeded, reissued the mutating call, resulting in two records for the same delivery ID. Initial investigation wrongly blamed at-least-once message delivery, but raw payload logging revealed the real culprit was an incomplete receipt from the tool itself. The fix involved adding a strict parse-and-validate gate before any insert, requiring a fully formed JSON object with an explicit acknowledgment field before allowing the mutator to run. The experiment was conducted on a free remote server to avoid billing costs during overnight testing.

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 ·

DarijaKit: open-source toolkit for Moroccan Darija on local LLMs

Researchers at Manadger Tech, a Moroccan company, released DarijaKit, an open-source Python toolkit to help developers work with Moroccan Darija on their own hardware. Local language models handle Darija unevenly because it is written in Arabic script and Arabizi, mixed with French, and spelled inconsistently. The stdlib-only tool offers spelling normalization, Arabizi-to-Arabic transliteration, script detection, and a 30-item evaluation set for benchmarking local models. It also includes a LoRA fine-tuning recipe sized for a single 12 GB GPU and works with Ollama, llama.cpp, LM Studio, and vLLM. The code is MIT licensed, and the developers invite native speakers to contribute evaluation items and spelling mappings.

0
ProgrammingDEV Community ·

Render Remotion Videos to MP4 Without AWS Lambda Using PennyCompute

This walkthrough explains how to produce an MP4 from a Remotion composition without deploying Remotion Lambda or maintaining an AWS account, S3 bucket, and functions. It uses PennyCompute's remotion.render.v1 job, which involves bundling the project, hosting the bundle, submitting the composition and props, and downloading the finished file. The guide covers prerequisites such as a Remotion 4.0.530 project, a PennyCompute API key, and Node.js 18 or later. Pricing is billed per render plus a per-minute charge for output, with failed, cancelled, and expired jobs not charged, and a new account includes $5 in prepaid balance. Live rates and cost estimates should be confirmed on the PennyCompute pricing page before budgeting a production run.

0
ProgrammingDEV Community ·

Developer builds free open-source Tauri eye-break app Yonder as LookAway alternative

The author, who spends most of their day on Windows, wanted a 20-20-20 eye-break reminder but found LookAway to be Mac-only and paid. They built Yonder, a free cross-platform app using Tauri and a Rust core, which keeps installers tiny at 1.3 MB for Windows and 3.6 MB for macOS. Yonder avoids interrupting users mid-sentence by waiting while they type, pausing during calls, fullscreen apps, or chosen applications, and counting time away from the computer as a break. Its breaks blur the user's actual desktop behind a calm countdown rather than showing a harsh overlay. The core logic is designed as a testable function that returns effects applied by a thin layer, a design the author invites others to contribute to.

0
ProgrammingDEV Community ·

PrivaUtils Runs Developer Tools Entirely in the Browser, Skipping Server Uploads

The developer describes building PrivaUtils, a set of single-purpose utilities for coding, PDF processing, text work, and cryptography, after noticing that many utility sites send pasted data to external servers. The author argues that server-side processing exposes sensitive inputs such as tokens and customer records to logs, buffers, and temporary storage. PrivaUtils instead executes every tool on the user's machine using Web Workers, WebAssembly, and WebCrypto. The article also explains two technical fixes: a JSON formatter that preserves large 64-bit integers via BigInt rather than losing precision, and a regex tester that runs in a Web Worker with a timeout to prevent catastrophic backtracking from freezing the page.