<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sarvesh Gajakosh</title>
    <description>The latest articles on DEV Community by Sarvesh Gajakosh (@sarvesh_gajakosh_0a3b5a97).</description>
    <link>https://dev.to/sarvesh_gajakosh_0a3b5a97</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3835870%2F33e01e66-440c-410c-a520-67d09fbe1fa0.png</url>
      <title>DEV Community: Sarvesh Gajakosh</title>
      <link>https://dev.to/sarvesh_gajakosh_0a3b5a97</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sarvesh_gajakosh_0a3b5a97"/>
    <language>en</language>
    <item>
      <title>Why My Coding Agent Stopped Repeating the Same Hints</title>
      <dc:creator>Sarvesh Gajakosh</dc:creator>
      <pubDate>Fri, 20 Mar 2026 18:14:10 +0000</pubDate>
      <link>https://dev.to/sarvesh_gajakosh_0a3b5a97/why-my-coding-agent-stopped-repeating-the-same-hints-34e1</link>
      <guid>https://dev.to/sarvesh_gajakosh_0a3b5a97/why-my-coding-agent-stopped-repeating-the-same-hints-34e1</guid>
      <description>&lt;p&gt;Why My Coding Agent Stopped Repeating the Same Hints&lt;/p&gt;

&lt;p&gt;While testing our coding mentor, I noticed something frustrating.&lt;/p&gt;

&lt;p&gt;The AI wasn’t wrong.&lt;/p&gt;

&lt;p&gt;It was just repetitive.&lt;/p&gt;

&lt;p&gt;A user fails a problem.&lt;br&gt;
The mentor says: “Try breaking it into smaller parts.”&lt;/p&gt;

&lt;p&gt;They fail again.&lt;br&gt;
Same hint.&lt;/p&gt;

&lt;p&gt;Third time?&lt;br&gt;
Still the same hint.&lt;/p&gt;

&lt;p&gt;At that point, correctness doesn’t matter. The system isn’t helping anymore.&lt;/p&gt;

&lt;p&gt;That’s when I realized the real problem wasn’t intelligence.&lt;/p&gt;

&lt;p&gt;It was memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What We Built&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CodeMentor AI is a coding practice platform with an AI mentor that adapts based on user behavior.&lt;/p&gt;

&lt;p&gt;The interface is simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monaco Editor in the center&lt;/li&gt;
&lt;li&gt;Problem list on the left&lt;/li&gt;
&lt;li&gt;AI mentor on the right&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal was not to make a smarter model.&lt;/p&gt;

&lt;p&gt;The goal was to make the system aware of the user.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyevhrzxdwujymbpr59c8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyevhrzxdwujymbpr59c8.png" alt=" " width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;** The Core Problem**&lt;/p&gt;

&lt;p&gt;Most AI tools are stateless.&lt;/p&gt;

&lt;p&gt;They don’t remember:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;previous mistakes&lt;/li&gt;
&lt;li&gt;repeated failures&lt;/li&gt;
&lt;li&gt;learning patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So even if the response is correct, it doesn’t evolve.&lt;/p&gt;

&lt;p&gt;Every session starts from zero.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;The Approach&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Instead of increasing model complexity, I introduced a simple memory loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;retain → recall → reflect
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This became the foundation of the system.&lt;/p&gt;




&lt;h2&gt;
  
  
  retain() — Store Meaningful Events
&lt;/h2&gt;

&lt;p&gt;After every submission:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;retain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;hindsightKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;bankId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;`Failed &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;problem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; due to incorrect loop boundary`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;failure&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;arrays&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;difficulty&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;problem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;difficulty&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;toISOString&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key decision:&lt;/p&gt;

&lt;p&gt;Do not store raw code.&lt;br&gt;
Store the reason behind failure.&lt;/p&gt;

&lt;p&gt;This keeps memory compact and useful.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnt40v4qrtsrus3s5iu4v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnt40v4qrtsrus3s5iu4v.png" alt=" " width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  recall() — Fetch Relevant Context
&lt;/h2&gt;

&lt;p&gt;Before solving a new problem:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;memories&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;recall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;hindsightKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;bankId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user mistakes in array problems&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This retrieves only what is relevant:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;similar past mistakes&lt;/li&gt;
&lt;li&gt;related topics&lt;/li&gt;
&lt;li&gt;repeated patterns&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  reflect() — Convert Memory into Insight
&lt;/h2&gt;

&lt;p&gt;Before generating a response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;reflection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;reflect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;hindsightKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;bankId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user weaknesses in problem solving&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This produces insights such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;misses edge cases&lt;/li&gt;
&lt;li&gt;struggles with loops&lt;/li&gt;
&lt;li&gt;relies on brute force&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw87r0mrpmys161f4pn03.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw87r0mrpmys161f4pn03.png" alt=" " width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Changed
&lt;/h2&gt;

&lt;p&gt;Before memory:&lt;/p&gt;

&lt;p&gt;“Check your logic.”&lt;/p&gt;

&lt;p&gt;After memory:&lt;/p&gt;

&lt;p&gt;“You’ve missed boundary conditions in similar problems before. Check your loop limits.”&lt;/p&gt;

&lt;p&gt;That shift makes the response specific and actionable.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;Memory is more important than model size.&lt;/p&gt;

&lt;p&gt;Better context leads to better responses.&lt;/p&gt;

&lt;p&gt;Summarized insights are more useful than raw data.&lt;/p&gt;

&lt;p&gt;Query design directly impacts output quality.&lt;/p&gt;

&lt;p&gt;Testing across multiple sessions is necessary to see real value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current Behavior
&lt;/h2&gt;

&lt;p&gt;The system now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;adjusts hints based on past attempts&lt;/li&gt;
&lt;li&gt;avoids repeating the same feedback&lt;/li&gt;
&lt;li&gt;builds a pattern of user weaknesses&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It doesn’t feel like a stateless tool anymore.&lt;/p&gt;

&lt;p&gt;It feels like a system that tracks progress.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://codemento.netlify.app/" rel="noopener noreferrer"&gt;https://codemento.netlify.app/&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;AI systems don’t improve just by being more powerful.&lt;/p&gt;

&lt;p&gt;They improve by remembering.&lt;/p&gt;

&lt;p&gt;Once memory is introduced, the system stops starting over.&lt;/p&gt;

&lt;p&gt;And that’s when it becomes useful.&lt;/p&gt;




&lt;p&gt;Built at HackWithIndia 2026- Sarvesh Gajakosh&lt;/p&gt;

&lt;p&gt;Team: Krishna Hasare, Karan Patil, Priya Vhatkar, Siddhi Shinde, Aastha Sawade&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>learning</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
