# Why does my AI keep trying a fix that already failed?

Canonical: [Why does my AI keep trying a fix that already failed?](https://contextingo.com/answers/why-does-my-ai-repeat-a-failed-fix)

Locale: en

Purpose: The failed attempt lived only in a conversation that was cleared, compacted or run by someone else, so the next AI never saw it. Saving a failed attempt as a record with its reason and the file it concerns lets Contextingo show it first when any AI is about to edit that file.

Content updated: 2026-10-29

Source revision: content.ts 2026-10-29

Maintenance owner: the Contextingo site owner

[Topic map](https://contextingo.com/llm/topics/answers.md) · [Complete scoped map](https://contextingo.com/sitemap.md)

**Short answer.** The failed attempt lived only in a conversation that was cleared, compacted or run by someone else, so the next AI never saw it. Saving a failed attempt as a record with its reason and the file it concerns lets Contextingo show it first when any AI is about to edit that file.

## Why it happens

An agent proposes a fix, it fails, and you move on. The knowledge “this does not work, and here is why” exists only in that chat. A new session, a context compaction or a teammate’s tool has no way to know. CLAUDE.md is context, not an enforced rule, and nobody writes dead ends into it.

## What stops it

1. The AI saves a failed attempt as its own record: what it tried, why it failed, and the file or commit as its source.
2. Before an AI edits files, it asks Contextingo for the knowledge that cites them. Failed attempts on those files come first.
3. It is not blocked from trying again. It just no longer does so without knowing what happened last time.

## Example

On Monday Ana’s Claude Code rounds VAT per line item, and refund totals end up one cent off. It saves that as a failed attempt on `src/vat.ts`. On Tuesday Ben’s Codex is about to edit the same file and sees the attempt first, with the reason.

## Go deeper

- [Record failed attempts, so the next AI does not try the same dead end](https://contextingo.com/guides/record-failed-attempts-ai-coding-agents)
- [Failed attempts are the most useful documentation your team does not have](https://contextingo.com/blog/record-failed-attempts-documentation)

## Questions

### Does it forbid the AI from retrying?

No. The record is shown first, so a retry is a choice. If the situation changed, the AI can say so and record the new outcome.

### Does it work across tools?

Yes. A failed attempt saved by Claude Code is shown to Codex and the other way around, because both read the same project.
