SShortSingh.
Back to feed

Developer Debugs AI Agent That Wrote 70 Duplicate Paragraphs Due to Cache Bug

0
·57 views

A software engineer discovered that an AI runtime agent he built generated 70 identical paragraphs on a single draft article instead of just one. The root cause was not the AI model itself, but a 60-second read cache that repeatedly served stale data, making the system believe no paragraph had been written after each successful write. The agent's built-in verification rule — which required a read-back confirmation before marking a task complete — inadvertently amplified the bug by looping on false negatives. The engineer, who runs engineering at app platform GoodBarber and operates production AI agents, used the incident to develop a structured debugging framework for probabilistic systems. His framework prioritizes three questions in order: what the system was permitted to get wrong, which layer introduced the error, and how long the error persisted before detection.

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 ·

TTSwap fixes shareMint vesting bug that stranded part of every allocation

A fix on the TTSwap project, tracked as PR #340 and bounty #325, addresses a vesting schedule whose math meant it could never fully release its allocation. The shareMint function divided by a chips value that never decreased, so each unlock released a shrinking share and left a geometric remainder unreachable. Independent QA reproduced the failure, showing only 683,593 of 1,000,000 tokens minted after four unlocks. The corrected approach tracks unlock progress and divides by the chips still remaining, with the final unlock sweeping leftover dust. The author also disclosed a separate overflow issue past roughly 127 unlocks, which was already fixed upstream and explicitly excluded from this change.

0
ProgrammingDEV Community ·

Seven Failure Modes That Break Inlined SVG Icons in React and CSS

Pasting SVG files exported from design tools like Figma or Illustrator directly into React components or CSS background images often fails on the first attempt. Common symptoms include TypeScript errors over kebab-case attributes or icons that render as invisible blank boxes without console errors. Standard SVG attributes must be converted to React's camelCase props, and style strings must be turned into objects or presentation props to avoid runtime crashes. Replacing hardcoded colors with currentColor requires care so that none, url(), and similar values are preserved, while duplicate IDs across inlined icons can cause shapes to disappear. The article also warns that unescaped # characters in CSS data:image/svg+xml URIs can silently truncate the image.

0
ProgrammingDEV Community ·

Docstring coverage gate in AI Doc Generator fails CI builds below a set threshold

An author testing AI Doc Generator, a $49 single-file Python CLI, argues that documentation debt is hard to measure and that a coverage percentage enforced in CI is more valuable than simple doc generation. The tool is dependency-free, requires only the standard library, and was verified to run in an empty environment. Its scan subcommand lists undocumented functions and classes with line numbers and exits with code 1 on findings. The check subcommand reports coverage against a threshold, failing a build if coverage falls below, for example, 80%. The author notes that this check command was the only one that produced a reliable number during testing, and the article openly discloses that the author sells the product.

0
ProgrammingDEV Community ·

Thinking Machines Releases Open-Weight Inkling 2 Mini, a Looped 26B-Parameter Model Under 20GB

Thinking Machines Lab, led by Mira Murati, released the weights for Inkling 2 Mini on November 20, 2026, under an Apache 2.0 license. The multimodal model has 26.4 billion total parameters but activates only 3.4 billion per token, producing a checkpoint of about 20GB that can run locally on a 32GB Mac. Rather than adding layers, it reuses its middle layers in multiple passes, trading extra compute for a smaller parameter footprint. The lab reports 79.2% on SWE-bench Verified, though these figures are self-published and have not yet been independently reproduced. Sources also disagree on the exact number of loop passes, so the precise mechanism remains partly unconfirmed.