---
title: "Comment by Duko tools on \"When your coding agent repeats a mistake, move the lesson out of chat.\" | Hashnode"
description: "The \"does every session need this\" filter for AGENTS.md is the most transferable rule, a hard line-count ceiling forces real discipline instead of \"just one mor"
url: "https://hashnode.com/posts/when-your-coding-agent-repeats-a-mistake-move-the-lesson-out-of-chat/6a70d2a0f40be8a79446c4e7/comment/6a719582e4ec2895c6d4db9c"
---

[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)

[Duko tools](https://hashnode.com/@talha24ramzan)

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

The "does every session need this" filter for AGENTS.md is the most transferable rule, a hard line-count ceiling forces real discipline instead of "just one more exception" creeping in forever.

"Don't turn one failure into a universal law" is the sharper insight. Requiring both a regression case (rejects the bad example) and a positive case (still passes valid ones) is what stops an overbroad fix like "never use mocks" from replacing a narrower real problem.

Self-review not being independent, even when the agent inspects its own diff, is worth remembering, it already committed to the assumptions behind the output, so grading its own homework isn't structurally the same as a reviewer with no stake in it.

[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/6a719582e4ec2895c6d4db9c#reply-6a720f59177e33a49c72a864)

Do you use a line/character count ceiling in your own config? What did you land on?

[Duko tools](https://hashnode.com/@talha24ramzan)

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

Honestly, no formal ceiling of my own yet, I don't run a config file with that structure on my current project. The rule stood out to me more as a principle worth borrowing than something I've implemented, since most of what I've built so far leans on ad-hoc instructions rather than a maintained agent-config file.

If I did set one, I'd probably start with something close to your under-60-lines/4,000-character number rather than inventing my own, it's a concrete enough constraint to actually enforce, versus a vaguer "keep it short" that erodes the same way any unmeasured limit does.

What made you land on that specific number, out of curiosity, was it empirical (you hit a point where longer files started causing problems) or more of a reasonable starting constraint you picked and haven't needed to revisit?
