<?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: Miitobow | Building apps with AI</title>
    <description>The latest articles on DEV Community by Miitobow | Building apps with AI (@miitobow).</description>
    <link>https://dev.to/miitobow</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4026801%2F9e3e7709-7980-4d58-abac-211495b96c50.jpg</url>
      <title>DEV Community: Miitobow | Building apps with AI</title>
      <link>https://dev.to/miitobow</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/miitobow"/>
    <language>en</language>
    <item>
      <title>Claude Code kept cutting out mid-task. I counted the causes and got it down to 3.</title>
      <dc:creator>Miitobow | Building apps with AI</dc:creator>
      <pubDate>Fri, 17 Jul 2026 04:39:37 +0000</pubDate>
      <link>https://dev.to/miitobow/claude-code-kept-cutting-out-mid-task-i-counted-the-causes-and-got-it-down-to-3-3mec</link>
      <guid>https://dev.to/miitobow/claude-code-kept-cutting-out-mid-task-i-counted-the-causes-and-got-it-down-to-3-3mec</guid>
      <description>&lt;p&gt;I use Claude Code every day building a Windows app. Right when a task was flowing, it would just stop. Mid-call, no error, nothing.&lt;/p&gt;

&lt;p&gt;The first few times, I just restarted and moved on. Eventually I started paying attention, and the causes turned out to fall into three clean patterns.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pattern
&lt;/h2&gt;

&lt;p&gt;Every tool call gets wrapped in a fixed marker — a closing tag the model writes right after it finishes describing what to run. Every single time this happened, the cutoff landed right after that marker. Same behavior on my Windows build and on an Android build, regardless of which project I was in. It wasn't about the app. It was about how I was phrasing the request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cause 1: backgrounding a shell command
&lt;/h2&gt;

&lt;p&gt;Shells have an operator that kicks a process into the background and lets you move on to the next line immediately. Using it inside a request reliably cut the call off right after.&lt;/p&gt;

&lt;p&gt;Fix: don't background it manually. Use the tool's own way of running something in the background instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cause 2: cramming multiple jobs into one instruction
&lt;/h2&gt;

&lt;p&gt;Asking for an analysis, then a display check, then a save — all in one shot, back to back. That combination reliably broke the call.&lt;/p&gt;

&lt;p&gt;Fix: one instruction, one goal. Splitting it up cost nothing and fixed everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cause 3: pasting a big block of text directly into an instruction
&lt;/h2&gt;

&lt;p&gt;Handing over a long chunk of raw text as part of the instruction itself sometimes broke the call's structure entirely.&lt;/p&gt;

&lt;p&gt;Fix: write the content to a file first, then reference the file in a separate instruction. Feels like a detour. It's actually the most reliable path.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Windows-only gotcha
&lt;/h2&gt;

&lt;p&gt;Anything touching path conversion between shells could break the call too. Routing Windows-specific commands through a separate execution path — instead of passing raw paths straight through — cut this down a lot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honestly, not all of it adds up
&lt;/h2&gt;

&lt;p&gt;I've had it stop right at the start, with nothing crammed in, nothing backgrounded, nothing pasted. No idea why. Even the model itself doesn't always know.&lt;/p&gt;

&lt;h2&gt;
  
  
  When none of it works
&lt;/h2&gt;

&lt;p&gt;If all three fixes don't help, resetting the conversation from scratch usually does. Sometimes chasing the root cause costs more time than just starting fresh.&lt;/p&gt;

&lt;p&gt;I used to panic every time this happened. Not anymore.&lt;/p&gt;




&lt;p&gt;I write more about this kind of thing — solo dev + AI, the wins and the messes — on &lt;a href="https://www.threads.net/@miitobow" rel="noopener noreferrer"&gt;Threads&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>productivity</category>
      <category>coding</category>
    </item>
    <item>
      <title>I asked another AI to doubt my work. Twice in one session, it found real problems.</title>
      <dc:creator>Miitobow | Building apps with AI</dc:creator>
      <pubDate>Wed, 15 Jul 2026 06:44:27 +0000</pubDate>
      <link>https://dev.to/miitobow/i-asked-another-ai-to-doubt-my-work-twice-in-one-session-it-found-real-problems-412e</link>
      <guid>https://dev.to/miitobow/i-asked-another-ai-to-doubt-my-work-twice-in-one-session-it-found-real-problems-412e</guid>
      <description>&lt;p&gt;A while back I wrote about catching 3 bugs by making my AI review its own code as a skeptical stranger instead of trusting its own "done."&lt;/p&gt;

&lt;p&gt;This time it happened again. Twice, in the same session, on two completely different kinds of work — and neither one was code.&lt;/p&gt;

&lt;h2&gt;
  
  
  First, a false alarm (so you know I don't cry wolf)
&lt;/h2&gt;

&lt;p&gt;I was migrating my dev environment from one drive to another. Partway through, one folder was missing about 12,000 files. My assistant flagged it as a possible migration accident.&lt;/p&gt;

&lt;p&gt;Turned out it wasn't. That folder was a virtual environment — a disposable toolbox rebuilt per project — and it was deliberately excluded from the move (it was sitting right there in &lt;code&gt;.gitignore&lt;/code&gt;, with a note to rebuild it fresh at the new location). The files were missing because they were &lt;em&gt;supposed&lt;/em&gt; to be missing; they were hardcoded to the old path and would've been dead weight anyway.&lt;/p&gt;

&lt;p&gt;I checked before assuming the worst. Worth mentioning, because everything after this is the opposite: two cases where something looked fine, and wasn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Case 1: a security checklist with 3 holes I couldn't see
&lt;/h2&gt;

&lt;p&gt;I'd just finished writing an audit checklist meant to apply across several of my apps — the rules an AI should follow when checking for security issues. I read it over, it looked solid, and I almost called it done.&lt;/p&gt;

&lt;p&gt;Instead, I handed just the ruleset to a second AI and asked it to try to break it.&lt;/p&gt;

&lt;p&gt;It came back with three holes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Every finding was treated as an automatic blocker.&lt;/strong&gt; That sounds strict, but it actually creates an escape hatch: the more annoying a finding is, the more tempting it is to just redefine it as "out of scope" and wave it through. A rule with no nuance quietly invites self-approval.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Marked as resolved" didn't require evidence.&lt;/strong&gt; Nothing stopped a check from being marked fixed just because it &lt;em&gt;felt&lt;/em&gt; checked, with no actual proof attached.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permission settings were graded on whether they were "enabled," not on what they actually did.&lt;/strong&gt; A permission can be technically on and still be configured so loosely it lets anything through. You have to actually test access, not just read a config flag.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these occurred to me while I was writing the checklist. All three were obvious once someone read it who hadn't written it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Case 2: a style summary that quietly drifted from its source
&lt;/h2&gt;

&lt;p&gt;The next day, separate task: I'd read a style guide on writing clearly and boiled it down into a short set of rules — sentence length, paragraph breaks, that kind of thing.&lt;/p&gt;

&lt;p&gt;I asked the same second-opinion process to check my summary against the original source, line by line.&lt;/p&gt;

&lt;p&gt;Two things came back:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I'd written "around 20 characters per sentence." The source actually said "20 characters &lt;strong&gt;or fewer&lt;/strong&gt;" — a soft suggestion turned into a hard limit I'd invented.&lt;/li&gt;
&lt;li&gt;I'd added a second number — a 50-character cap for a "unit of meaning" — that &lt;strong&gt;didn't exist anywhere in the source at all&lt;/strong&gt;. It was something I must have half-remembered from somewhere else, and it had quietly merged into my notes as if the source had said it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And this wasn't a vibes-based objection — it was backed by an actual line-by-line count of the source document. Average sentence length: 13 characters. Only 4 lines out of the whole document exceeded 20, and one of those was a line intentionally written as a &lt;em&gt;bad example&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why does this keep happening?
&lt;/h2&gt;

&lt;p&gt;Neither of these was code. One was a rule I wrote, the other was a summary I wrote. Same result both times.&lt;/p&gt;

&lt;p&gt;My best explanation: when you're the one who wrote something, you're reading it through the intent you had while writing it. You're checking "does this match what I meant?" — not "was what I meant actually correct?" A number you copied from memory &lt;em&gt;feels&lt;/em&gt; like it came from the source, because in your head, it did.&lt;/p&gt;

&lt;p&gt;A second reader has no such memory to protect them. They just read what's actually there.&lt;/p&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;This isn't a one-off. It's now just something I build into how I work: nothing gets marked "done" until it's been read once by someone (or something) that didn't write it and has no stake in it being right.&lt;/p&gt;

&lt;p&gt;Twice in one session, on two unrelated kinds of work, that one extra step is what caught it. I don't think that's a coincidence anymore.&lt;/p&gt;




&lt;p&gt;I write more about this kind of thing — solo dev + AI, the wins and the messes — on &lt;a href="https://www.threads.net/@miitobow" rel="noopener noreferrer"&gt;Threads&lt;/a&gt;. I also wrote up the original code-bug version of this story &lt;a href="https://dev.to/miitobow/i-had-my-ai-review-its-own-code-and-it-found-3-bugs-it-had-just-written-3430"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>productivity</category>
      <category>writing</category>
    </item>
    <item>
      <title>The same input gave me a different translation every time. The bug wasn't where I thought.</title>
      <dc:creator>Miitobow | Building apps with AI</dc:creator>
      <pubDate>Tue, 14 Jul 2026 03:33:27 +0000</pubDate>
      <link>https://dev.to/miitobow/the-same-input-gave-me-a-different-translation-every-time-the-bug-wasnt-where-i-thought-4cic</link>
      <guid>https://dev.to/miitobow/the-same-input-gave-me-a-different-translation-every-time-the-bug-wasnt-where-i-thought-4cic</guid>
      <description>&lt;p&gt;I kept re-running the exact same input through my translation app. Same code. Same model. Same everything.&lt;/p&gt;

&lt;p&gt;And the word "machines" kept flipping between two different translations. Sometimes it came out as "機械" (machine). Sometimes as "あなたのPC" (your PC). No code changed between runs. No input changed either.&lt;/p&gt;

&lt;p&gt;My first assumption was a race condition somewhere in my pipeline. It wasn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where I actually looked
&lt;/h2&gt;

&lt;p&gt;I checked the obvious suspects first: caching, threading, anything stateful that could make the same input behave differently on different runs. All clean.&lt;/p&gt;

&lt;p&gt;So I went one level deeper, into how the model picks the winning word. Translation models score every candidate word and pick whichever scores highest. When I logged the actual scores for "machine" vs "your PC" on this input, they were almost exactly tied.&lt;/p&gt;

&lt;p&gt;That's the part that mattered. When two candidates are separated by a tiny margin, the &lt;em&gt;order&lt;/em&gt; floating-point operations get summed in can nudge the score just enough to flip which one wins. Same math, same inputs, different accumulation order between runs — and a near-tie flips sides.&lt;/p&gt;

&lt;p&gt;Nothing was actually random. It was deterministic all the way down. It just wasn't deterministic in a way I could predict, because the thing that decided the winner was rounding noise several layers below anything I was testing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix wasn't "make it deterministic"
&lt;/h2&gt;

&lt;p&gt;Forcing strict floating-point determinism across an ML pipeline is its own rabbit hole, and not one I wanted to go down for one word.&lt;/p&gt;

&lt;p&gt;Instead, I looked at &lt;em&gt;why&lt;/em&gt; the tie was so close in the first place. "Machine" and "your PC" were close enough in meaning, in this context, that the model wasn't confident either way. So I widened the margin instead of trying to eliminate the noise: I swapped the input word choice from "machines" to "equipment," which the model was much more decisively confident about.&lt;/p&gt;

&lt;p&gt;Scores stopped being close enough for rounding noise to matter. The flip-flopping stopped.&lt;/p&gt;

&lt;p&gt;I want to be honest about a trap I almost fell into here: my first instinct was to just blanket-replace every instance of "machines" with "equipment" everywhere. That would've been wrong — in plenty of other sentences, "machines" was already translating correctly and consistently. A global find-and-replace would've quietly broken correct translations to fix one flaky one. I only changed it in the specific context where the tie actually existed.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell someone hitting this
&lt;/h2&gt;

&lt;p&gt;If the exact same input gives you different output on different runs, and you've ruled out caching, threading, and anything stateful — look for close scoring ties, not randomness. "Nothing changed" and "nothing is random" can both be true at the same time; the instability can live in rounding order underneath a scoring step you're not even looking at.&lt;/p&gt;

&lt;p&gt;And once you find a fix, don't trust it from a single passing run. I re-ran the same input across multiple sessions before I believed the fix actually held, since the whole bug was runs disagreeing with each other in the first place — one clean run doesn't prove anything if the failure mode is "some runs differ."&lt;/p&gt;

&lt;p&gt;I write more about building this translation app (and the bugs it keeps teaching me) on &lt;a href="https://www.threads.net/@miitobow" rel="noopener noreferrer"&gt;Threads&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>debugging</category>
      <category>python</category>
    </item>
    <item>
      <title>I had my AI review its own code, and it found 3 bugs it had just written</title>
      <dc:creator>Miitobow | Building apps with AI</dc:creator>
      <pubDate>Mon, 13 Jul 2026 07:38:17 +0000</pubDate>
      <link>https://dev.to/miitobow/i-had-my-ai-review-its-own-code-and-it-found-3-bugs-it-had-just-written-3430</link>
      <guid>https://dev.to/miitobow/i-had-my-ai-review-its-own-code-and-it-found-3-bugs-it-had-just-written-3430</guid>
      <description>&lt;p&gt;Do you trust the code your AI assistant just wrote for you?&lt;/p&gt;

&lt;p&gt;I did. More than I should have.&lt;/p&gt;

&lt;p&gt;Lately, right after my AI (I use Claude Code) writes something, I ask it one more thing: pretend you didn't write this. Review it like a skeptical senior engineer who's never seen it before.&lt;/p&gt;

&lt;p&gt;Last week, that one extra step found 3 bugs. In code the same AI had written minutes earlier. Bugs it hadn't noticed at all when it wrote it.&lt;/p&gt;

&lt;p&gt;Turns out, the person who writes something can't see its flaws. And apparently, that's true for AI too.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bug that started it
&lt;/h2&gt;

&lt;p&gt;I'm building a Windows app that translates screenshots on the fly. Paste a screenshot, it OCRs the text and overlays a translation.&lt;/p&gt;

&lt;p&gt;One screen type kept beating it: white text on a dark navy header. Buttons like "Sign up" or "Help" — completely skipped. Not mistranslated, just never even detected as text.&lt;/p&gt;

&lt;p&gt;The cause: the OCR pipeline decided "dark background = ignore this region" and threw the whole header away before even trying to read it.&lt;/p&gt;

&lt;p&gt;I asked Claude Code to fix it — detect dark regions, invert them locally, then run OCR. That part worked. "Sign up" and "Help" started translating correctly.&lt;/p&gt;

&lt;p&gt;I thought I was done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Then I made the AI doubt itself
&lt;/h2&gt;

&lt;p&gt;Here's the habit: I never let the AI mark its own work "finished." Right after it writes something, I ask the &lt;em&gt;same&lt;/em&gt; AI to switch roles — become a skeptical reviewer who's never seen this code, and rip apart the diff it just wrote.&lt;/p&gt;

&lt;p&gt;This time, it found 3 real bugs in the fix it had just shipped:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. "Anything long and thin must be a button"&lt;/strong&gt;&lt;br&gt;
The button-detection logic was missing a width check. A single thin vertical stroke of text got mistaken for a button edge — splitting words like "DASHBOARD" into fragments and making them unreadable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The noise-removal rule was too aggressive&lt;/strong&gt;&lt;br&gt;
A rule meant to clean up small artifacts was matching a much wider range than intended, and it was quietly deleting text it should have kept.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Brightness was measured the wrong way&lt;/strong&gt;&lt;br&gt;
The logic deciding whether to invert a region measured brightness by looking at how much of a character's &lt;em&gt;ink&lt;/em&gt; was bright — so a bold white letter (lots of bright pixel area) got misread as "this is a bright button," and the region never got inverted at all.&lt;/p&gt;

&lt;p&gt;None of these were caught when the code was written. Everything looked like it worked.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why does the same AI catch its own blind spots when you just... ask differently?
&lt;/h2&gt;

&lt;p&gt;This is the part I keep thinking about.&lt;/p&gt;

&lt;p&gt;The model that wrote the code and the model that reviewed it are the same model. Nothing changed except the role I asked it to play.&lt;/p&gt;

&lt;p&gt;My best guess: writing code and reviewing code point your attention in different directions. When you're writing to satisfy an intent, you're checking "does this match what I meant to do?" Whether the intent itself was wrong barely enters your field of view.&lt;/p&gt;

&lt;p&gt;Reviewing flips that. You start from "is this intent even correct?" — no assumption that the goal was right in the first place.&lt;/p&gt;

&lt;p&gt;It's the same reason a second human catches a bug in code you just wrote, instantly, that you missed for an hour. You remember what you meant. That memory is exactly what blinds you.&lt;/p&gt;

&lt;h2&gt;
  
  
  One more thing: don't trust the review either
&lt;/h2&gt;

&lt;p&gt;Switching the AI's role produces a &lt;em&gt;lot&lt;/em&gt; of findings. Not all of them are real bugs. Some are intentional design choices getting flagged as "wrong." Some are just misreadings.&lt;/p&gt;

&lt;p&gt;So I never apply a finding straight from the review. Everything gets triaged first: real bug, intentional, or false positive — with the reasoning grounded in the actual code, not a guess. Only confirmed real bugs get fixed, and only with the smallest change that doesn't break the original intent.&lt;/p&gt;

&lt;p&gt;Skip that step and you'll end up thrashing perfectly correct code because an overeager review said so.&lt;/p&gt;

&lt;h2&gt;
  
  
  The actual takeaway
&lt;/h2&gt;

&lt;p&gt;The person who wrote it can't see its flaws. That's not a human-only limitation — it applies to AI too.&lt;/p&gt;

&lt;p&gt;So now, every time I have an AI write or fix something, I make it play a second role before I call it done: someone who's never seen this code, whose job is to find what the author missed.&lt;/p&gt;

&lt;p&gt;Since I started doing this, I catch noticeably more bugs before a user ever does.&lt;/p&gt;




&lt;p&gt;I actually use two specific prompts every time I do this — one to force the "skeptical reviewer" review itself, one to triage what comes back so I don't blindly apply every finding. If people want the exact prompts, let me know in the comments — I might put together something more detailed with the full toolkit.&lt;/p&gt;

&lt;p&gt;I post more of this kind of thing (solo dev + AI, the wins and the messes) on &lt;a href="https://www.threads.net/@miitobow" rel="noopener noreferrer"&gt;Threads&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>coding</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
