<?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: nexomind</title>
    <description>The latest articles on DEV Community by nexomind (@nexomind_ai).</description>
    <link>https://dev.to/nexomind_ai</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%2F3941113%2Fb5459a4b-a34d-44c4-8f27-71425c27b257.jpg</url>
      <title>DEV Community: nexomind</title>
      <link>https://dev.to/nexomind_ai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nexomind_ai"/>
    <language>en</language>
    <item>
      <title>I Built a System That Detects Thought Loops in Human Writing</title>
      <dc:creator>nexomind</dc:creator>
      <pubDate>Wed, 10 Jun 2026 02:34:38 +0000</pubDate>
      <link>https://dev.to/nexomind_ai/i-built-a-system-that-detects-thought-loops-in-human-writing-4m0j</link>
      <guid>https://dev.to/nexomind_ai/i-built-a-system-that-detects-thought-loops-in-human-writing-4m0j</guid>
      <description>&lt;p&gt;Most people frame overthinking as a feelings problem. i started treating it like a systems problem.&lt;/p&gt;

&lt;p&gt;What if overthinking isn't about thinking too much - but about the same computation running repeatedly without reaching a termination condition? What if the brain is just stuck in a recursive loop with no base case?&lt;/p&gt;

&lt;p&gt;That reframe changed how i built NexoMind. And it changed what the product actually does.&lt;/p&gt;




&lt;h2&gt;
  
  
  The problem: recursive thoughts without exit conditions
&lt;/h2&gt;

&lt;p&gt;Here's what overthinking looks like if you model it structurally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;think&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;emotionalState&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;newEmotion&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;reprocess&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;emotionalState&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="c1"&gt;// no exit condition&lt;/span&gt;
  &lt;span class="c1"&gt;// no new information generated&lt;/span&gt;
  &lt;span class="c1"&gt;// just re-invocation with mutated state&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;think&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;newEmotion&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;The thought content stays static. The emotional wrapper mutates each cycle. That mutation creates the illusion of progress. "i'm getting closer to figuring this out." You're not. You're just recursing with a different emotional parameter.&lt;/p&gt;

&lt;p&gt;No stack overflow though. The brain happily runs this forever.&lt;/p&gt;




&lt;h2&gt;
  
  
  5 loop types i identified
&lt;/h2&gt;

&lt;p&gt;After reading pattern data across users (we see pattern types and frequencies, never content - E2EE), these structures kept appearing:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Replay Loop&lt;/strong&gt; - Re-executing a past event trying to find the branch where the outcome changes. It never does. The past is immutable state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Preparation Spiral&lt;/strong&gt; - Generating increasingly catastrophic scenarios under the label "planning." No action items produced. Just escalating threat models with no mitigations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. What-If Fork&lt;/strong&gt; - Toggling between N bad outcomes. Classic busy-wait. CPU usage at 100%, throughput at zero.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Clarity Illusion&lt;/strong&gt; - The belief that more cycles = eventual convergence. But there's no convergence condition. The function never returns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Identity Loop&lt;/strong&gt; - Meta-recursion. "What does it say about me that i'm thinking this?" Thought about thought. Infinite regress disguised as introspection.&lt;/p&gt;




&lt;h2&gt;
  
  
  How detection works (conceptually)
&lt;/h2&gt;

&lt;p&gt;The interesting technical challenge: how do you detect when someone is looping vs. genuinely processing?&lt;/p&gt;

&lt;p&gt;The signal isn't in any single entry. It's across entries over time.&lt;/p&gt;

&lt;p&gt;What we look for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Semantic similarity clustering&lt;/strong&gt; - same theme appearing in entries that the user frames as "different problems"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Emotional variance without content variance&lt;/strong&gt; - the feeling changes but the underlying concern doesn't&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trigger recurrence&lt;/strong&gt; - same environmental trigger producing same response pattern&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resolution absence&lt;/strong&gt; - no new information, decisions, or action items across multiple entries on the same topic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Single-entry analysis catches the obvious loops (replay, what-if fork). Cross-entry pattern detection catches the subtle ones (identity loop, preparation spiral that spans weeks).&lt;/p&gt;




&lt;h2&gt;
  
  
  What i learned about building this
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Less AI output = better UX.&lt;/strong&gt; Early version gave 300-word responses. Users read them, said "helpful," never came back. Cut to 4 lines. Return rate doubled. The AI's job is naming, not explaining.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The base case is external.&lt;/strong&gt; You can't detect your own loops from inside them. That's the whole reason the tool exists. Something outside the system has to say "this is the same pattern you had last tuesday."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Precision &amp;gt; comfort.&lt;/strong&gt; Users don't want to feel validated. They want to feel seen. "You're experiencing the replay loop and the underlying concern is about respect" lands harder than two paragraphs of empathetic filler.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Privacy is load-bearing.&lt;/strong&gt; People won't write honestly if they think someone's reading it. The whole detection system becomes useless if the input is self-censored. E2EE isn't a feature checkbox. It's what makes the data honest enough to be useful.&lt;/p&gt;




&lt;h2&gt;
  
  
  The moment that validated the approach
&lt;/h2&gt;

&lt;p&gt;3am on a tuesday. Second night stuck on the same thought loop about a collaborator interaction. Two nights of my brain telling me it was "almost" figured out.&lt;/p&gt;

&lt;p&gt;Opened my notes app. Wrote one sentence: "i think i'm afraid they don't respect me and i'm using the comment as evidence."&lt;/p&gt;

&lt;p&gt;Loop broke. Not because i solved the problem. Because i named what the thought was doing instead of engaging with what it was about.&lt;/p&gt;

&lt;p&gt;That's the entire product thesis in one interaction. Help people name the function, not just the argument being passed to it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Current state
&lt;/h2&gt;

&lt;p&gt;NexoMind does:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Single-entry loop detection (names the pattern type)&lt;/li&gt;
&lt;li&gt;Cross-entry pattern clustering (surfaces recurring themes over time)&lt;/li&gt;
&lt;li&gt;Cognitive distortion labeling (standard CBT taxonomy)&lt;/li&gt;
&lt;li&gt;One-line reframes (precision, not essays)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What i'm still figuring out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When to surface a pattern vs. letting the user discover it naturally&lt;/li&gt;
&lt;li&gt;How much historical context improves detection accuracy vs. adds noise&lt;/li&gt;
&lt;li&gt;The right threshold for "this is a pattern" vs. "this happened twice" (currently calibrating)&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If you're building in the AI-for-thinking space, i'd love to compare notes. The interesting problems aren't the LLM calls. They're the data modeling and UX constraints around when to reflect something back vs. when silence is better.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://nexomind.ai" rel="noopener noreferrer"&gt;NexoMind&lt;/a&gt; if you want to try it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mentalhealth</category>
      <category>productivity</category>
      <category>building</category>
    </item>
    <item>
      <title>I built an AI journal that doesn't try to fix you</title>
      <dc:creator>nexomind</dc:creator>
      <pubDate>Tue, 19 May 2026 23:45:08 +0000</pubDate>
      <link>https://dev.to/nexomind_ai/i-built-an-ai-journal-that-doesnt-try-to-fix-you-3inc</link>
      <guid>https://dev.to/nexomind_ai/i-built-an-ai-journal-that-doesnt-try-to-fix-you-3inc</guid>
      <description>&lt;p&gt;It was 2:47 AM when I gave up trying to sleep.&lt;/p&gt;

&lt;p&gt;I'd been replaying a conversation from earlier that day — one that, by any reasonable measure, had already ended fine. The other person had moved on. I was the only one still in the room, doing the math.&lt;/p&gt;

&lt;p&gt;I opened a journaling app. Stared at the blank page for a minute. Closed it. Opened a chatbot. Got an over-eager pep talk that made it worse. Opened my notes app. Wrote half a sentence. Deleted it.&lt;/p&gt;

&lt;p&gt;Nothing on my phone fit the shape of what I actually needed.&lt;/p&gt;

&lt;p&gt;That's when I started building NexoMind.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I actually wanted (and couldn't find)
&lt;/h2&gt;

&lt;p&gt;Most journaling apps assume you know what to write about. They hand you prompts like "what are you grateful for today?" That's not the problem at 2:47 AM. The problem is that your brain has fourteen unresolved threads from the day and it's trying to file them all at once. Asking it to be grateful is like asking a fire alarm to consider its tone.&lt;/p&gt;

&lt;p&gt;Most chatbots want a conversation. They keep going. Each reply pulls you a little further from what you came in with. By message six you're solving a different problem.&lt;/p&gt;

&lt;p&gt;Therapy apps want a structure that takes twenty minutes and a clear head. I had neither.&lt;/p&gt;

&lt;p&gt;What I wanted was something that would just &lt;strong&gt;read what was looping in my head and tell me what was actually inside it&lt;/strong&gt;. Not advice. Not a quote. Not a coping strategy. Just — what's there?&lt;/p&gt;

&lt;h2&gt;
  
  
  The shift that changed what I was building
&lt;/h2&gt;

&lt;p&gt;I spent a few weeks reading about why thought loops happen. Most of what I found was advice. &lt;em&gt;Try meditation. Try CBT. Try grounding techniques.&lt;/em&gt; All useful. None of them addressed the actual mechanic of the loop.&lt;/p&gt;

&lt;p&gt;The thing I kept coming back to: a thought loops when the feeling underneath it hasn't been named.&lt;/p&gt;

&lt;p&gt;Not "felt." Not "expressed." &lt;strong&gt;Named.&lt;/strong&gt; In a single word.&lt;/p&gt;

&lt;p&gt;You can write three pages about a difficult conversation and still not know whether what you're holding is hurt, or pressure, or fear of being misunderstood. The loop keeps running because it's protecting an emotion that hasn't been identified yet. Once you name the emotion, the loop has somewhere to land.&lt;/p&gt;

&lt;p&gt;That sentence — &lt;em&gt;the loop has somewhere to land&lt;/em&gt; — became the design brief.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I actually built
&lt;/h2&gt;

&lt;p&gt;NexoMind is small. You write what's on your mind. It reads it once and reflects it back as four short pieces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;trigger&lt;/strong&gt; — what set this off&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;thought loop&lt;/strong&gt; — what your mind keeps doing with it&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;distortion&lt;/strong&gt; — the angle the loop is running at&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;clarity&lt;/strong&gt; — a calmer reading of the same situation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's the whole product. There's a longer-form version inside the app that tracks patterns over time, but that one screen — four labels, four sentences — is the heart of it.&lt;/p&gt;

&lt;p&gt;It's a &lt;a href="https://www.nexomind.ai/ai-journaling" rel="noopener noreferrer"&gt;different shape of journaling&lt;/a&gt; than I'd seen before. It doesn't try to make you write more. It does the structuring step you'd otherwise skip. The bet is that &lt;em&gt;naming&lt;/em&gt; the loop is what releases it — not arguing with it, not reframing it, not solving it.&lt;/p&gt;

&lt;h2&gt;
  
  
  A note on the architecture
&lt;/h2&gt;

&lt;p&gt;The public analyzer is intentionally minimal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React on the front, single edge function on the back, structured-output prompt that returns a four-field JSON object.&lt;/li&gt;
&lt;li&gt;The public-tool input is processed once and discarded. No database write, no user identifier. The full journal app stores reflections, but the public tool deliberately doesn't — it's a single-shot reflection, not a session.&lt;/li&gt;
&lt;li&gt;The four-field shape constrains the model. Open-ended chat completions kept giving me wandering, comforting answers. A typed schema forces the model to commit to &lt;em&gt;naming&lt;/em&gt; the parts instead of &lt;em&gt;consoling&lt;/em&gt; the user. That single design choice changed the feel of the whole product.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The hard part
&lt;/h2&gt;

&lt;p&gt;The hard part wasn't the model. The hard part was the temptation to make it say more.&lt;/p&gt;

&lt;p&gt;Every time I showed an early version to someone, I'd watch them read the result, sit with it for two seconds, and then look at me — wanting more. Wanting comfort. Wanting a five-step plan. And every time, I had to remind myself: the comfort comes from being seen accurately, not from being told what to do.&lt;/p&gt;

&lt;p&gt;I cut features for months. I cut the suggested next steps. I cut the "would you like to talk about this more?" prompt. I cut the mood score. I cut the streak counter. I cut everything that asked the user to &lt;em&gt;do&lt;/em&gt; something with the result.&lt;/p&gt;

&lt;p&gt;The product got smaller every week and felt better every week.&lt;/p&gt;

&lt;p&gt;Software is mostly the practice of not adding things. I keep relearning that.&lt;/p&gt;

&lt;h2&gt;
  
  
  You can try it without signing up
&lt;/h2&gt;

&lt;p&gt;There's a &lt;a href="https://www.nexomind.ai/overthinking-analyzer" rel="noopener noreferrer"&gt;public version of the analyzer&lt;/a&gt; — no account, no email, nothing stored. Paste a thought that's been looping and it'll show you the four parts. It runs once and forgets.&lt;/p&gt;

&lt;p&gt;If the result doesn't land, that's useful too. It tells you the model didn't catch what's underneath, which usually means the thought has more layers than one read can reach. The full app handles that with longer reflections over time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it's going
&lt;/h2&gt;

&lt;p&gt;NexoMind is what I wished I'd had on every 2:47 AM that sent me looking. It's not therapy. It's not a chatbot. It's not a habit tracker. It's a quiet way to &lt;a href="https://www.nexomind.ai/how-to-stop-overthinking" rel="noopener noreferrer"&gt;stop overthinking&lt;/a&gt; without being told to think differently.&lt;/p&gt;

&lt;p&gt;If you've ever wanted a tool that just reads what's there, &lt;a href="https://www.nexomind.ai" rel="noopener noreferrer"&gt;it lives here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks for reading. Happy to answer questions about the architecture or the design constraints in the comments.&lt;br&gt;
`&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mentalhealth</category>
      <category>building</category>
      <category>indiehackers</category>
    </item>
  </channel>
</rss>
