Agents keep making TypeScript errors go away instead of fixing them

Reddit r/AI_Agents News

Summary

A developer reports that AI coding agents increasingly silence TypeScript errors with `as` casts, `@ts-ignore` comments, and widened shared types instead of actually fixing them, and asks the community what guardrails they use (lint rules, agent instructions, CI failures) to prevent it.

Saw a post arguing Rust is the best language for AI coding because the compiler acts as a free reviewer. I get it. In TypeScript our agents just switch the reviewer off. I grepped our main repo for what got added in the last 3 months of mostly agent written PRs: - 64 new as casts, 19 of them as unknown as Something - 23 new u/ts-expect-error or u/ts-ignore - 11 places where a shared type got a new optional field just so an error would disappear The first two are easy to spot. coderabbit flags most of the as any style ones and the ignore comments. The third kind is the one that hurts, because widening a shared type looks like a normal change and quietly makes every consumer less safe. We're on strict mode with noUncheckedIndexedAccess, so it's not like the config is loose. The agent just has more ways out than we have rules. What are people doing about this? Lint rules banning assertions in certain folders, a rule in the agent's instructions, failing CI on new ignores?
Original Article

Similar Articles

Why Is Every AI Agent Written in TypeScript?

Reddit r/AI_Agents

The article explores why TypeScript has become the dominant language for building AI agents and agent frameworks, questioning why alternatives like Rust or C++ aren't more prevalent.

AI agents recreate the “rockstar developer” problem, just faster

Reddit r/AI_Agents

The post compares AI agents to 'rockstar developers' who create clever but unmaintainable code, pointing out that agents lack memory of their own actions. It recommends using visible conventions like AGENTS.md, ADRs, and tests to keep agent-generated code understandable by the team.