---
title: "Comment by Sanoary Istiaque on \"When your coding agent repeats a mistake, move the lesson out of chat.\" | Hashnode"
description: "This is a practical way to think about working with coding agents. Fixing a mistake in chat may solve the immediate task, but documenting the lesson in AGENTS.m"
url: "https://hashnode.com/posts/when-your-coding-agent-repeats-a-mistake-move-the-lesson-out-of-chat/6a70d2a0f40be8a79446c4e7/comment/6a71b595ca7c1628f2212fd6"
---

[Discussion](https://hashnode.com/posts/when-your-coding-agent-repeats-a-mistake-move-the-lesson-out-of-chat/6a70d2a0f40be8a79446c4e7)

Comment [When your coding agent repeats a mistake, move the lesson out of chat.](https://hashnode.com/posts/when-your-coding-agent-repeats-a-mistake-move-the-lesson-out-of-chat/6a70d2a0f40be8a79446c4e7)

[Sanoary Istiaque](https://hashnode.com/@istyy)

[Aug 4](https://hashnode.com/posts/when-your-coding-agent-repeats-a-mistake-move-the-lesson-out-of-chat/6a70d2a0f40be8a79446c4e7/comment/6a71b595ca7c1628f2212fd6)

This is a practical way to think about working with coding agents. Fixing a mistake in chat may solve the immediate task, but documenting the lesson in AGENTS.md, adding a targeted regression test, or improving the review process prevents the same issue from returning in future sessions. I especially like the reminder not to turn one failure into an overly broad rule the best safeguards should block the specific mistake without restricting valid solutions.

[Bryce Darling](https://hashnode.com/@mindrealm)

[Aug 4](https://hashnode.com/posts/when-your-coding-agent-repeats-a-mistake-move-the-lesson-out-of-chat/6a70d2a0f40be8a79446c4e7/comment/6a71b595ca7c1628f2212fd6#reply-6a720f6e1d8f7180b142a5cf)

Exactly, a broad rule can do more damage than the original mistake because it keeps blocking valid cases after that. Oof
