SShortSingh.
Back to feed

AI Session Crash Doubled Form Fields, Exposing Idempotency Gap in MCP Tools

0
·1 views

A developer building a 12-field customer satisfaction survey with Claude Desktop ended up with 20 duplicate fields after an AI session timed out mid-task. When a new session was started and Claude was asked to continue, it re-added all 12 fields without checking which ones already existed, because the field_add tool performs a create operation rather than an upsert. The root cause is that field IDs are not treated as unique constraints by the server, so repeated calls simply generate new fields with auto-suffixed IDs. To address this, the developer adopted a find-before-add pattern, instructing Claude to first call field_list and then only add fields absent from the existing list. A subsequent update to the tool (v0.2.0) introduced a server-side AssessAgent pipeline that handles field creation atomically and idempotently, resolving the issue at the infrastructure level.

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 ·

Key AWS S3 and CloudFront Edge Cases for Static Site Subdirectory Hosting

A developer deploying a static documentation site on AWS S3 and CloudFront encountered several non-obvious routing and configuration issues. Browser caching of 301 redirects and HSTS policies caused stale behavior in normal sessions even after infrastructure changes had propagated. CloudFront's Default Root Object only resolves index files at the distribution root, not in subdirectories, requiring explicit URL rewriting via a CloudFront Function on the Viewer Request event. Missing trailing slashes in subdirectory URLs caused browsers to misresolve relative asset paths, breaking CSS and JavaScript loading. A concise CloudFront Function that redirects slash-less directory requests and rewrites directory URIs to index.html was found to resolve most of these routing problems.

0
ProgrammingDEV Community ·

Gemini 3.6 Flash's Thinking Dial Can Cut AI Costs 30x With Accuracy Trade-offs

Google's Gemini 3.6 Flash, which became generally available on July 21, 2026, charges users for hidden 'reasoning tokens' in addition to standard output tokens, billed at $7.50 per million. Independent testing conducted on July 24, 2026, found that the model's reasoning effort setting — ranging from minimal to high — can swing costs by up to 30 times on the same task, dropping a 120-word writing task from $0.03316 to $0.00110. Setting reasoning effort to 'minimal' eliminates reasoning tokens entirely and cuts per-call costs by 91–97%, with no noticeable quality loss on retrieval, formatting, and simple factual tasks. However, the minimal setting caused the model to fail all three attempts at a multi-step arithmetic word problem, highlighting a meaningful accuracy risk for complex reasoning tasks. The model's 1-million-token context window and prompt caching behavior were confirmed to match Google's published specifications in testing.

0
ProgrammingDEV Community ·

Developer Builds CI Enforcement Layer on Top of BenchmarkDotNet for .NET Projects

A developer working on a reconciliation tool called CedarRecon identified a gap in .NET performance testing: BenchmarkDotNet measures performance but does not enforce any budget or threshold policy. While dogfooding an early version of the tool, a 28% regression was detected in an unrelated method — the kind of finding that can be missed when manually reviewing CI logs. To address this, the developer built Cedar.BenchmarkGate, an open-source tool that adds committed baselines, configurable regression thresholds, and pass/fail exit codes to the benchmarking workflow. The tool is designed to run without any SaaS dependency or hosted database, making it suitable as a lightweight CI gate. Version 0.1.0-alpha.1 is now live, with planned documentation covering baseline architecture, policy separation, and the exit-code contract.

0
ProgrammingDEV Community ·

Agentic Test Creation vs AI Test Generation: Why the Difference Matters

AI test generation tools typically work by wrapping a user story in a prompt and sending it to a large language model, producing output without any awareness of existing test coverage. This approach frequently generates duplicate test cases, references non-existent UI elements, and leaves traceability gaps that teams must resolve manually. Agentic test creation, by contrast, uses an AI agent that follows a multi-step reasoning loop — gathering context, analyzing the existing test library, identifying coverage gaps, and only then generating linked test cases. The distinction lies in architecture: a single stateless LLM call versus an iterative agent that plans, uses tools, and revises its output before delivering results. As AI testing tools proliferate, understanding which approach a vendor is offering has significant implications for test suite quality and long-term maintainability.

AI Session Crash Doubled Form Fields, Exposing Idempotency Gap in MCP Tools · ShortSingh