<?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: buildwithaihub</title>
    <description>The latest articles on DEV Community by buildwithaihub (@buildwithaihub).</description>
    <link>https://dev.to/buildwithaihub</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%2F4142104%2F95e4946e-cb1c-4d4e-b442-eb03f3e56791.jpg</url>
      <title>DEV Community: buildwithaihub</title>
      <link>https://dev.to/buildwithaihub</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/buildwithaihub"/>
    <language>en</language>
    <item>
      <title>I gave Claude Code a brand-new Windows PC. Five things went wrong before it wrote a line.</title>
      <dc:creator>buildwithaihub</dc:creator>
      <pubDate>Wed, 30 Sep 2026 18:31:38 +0000</pubDate>
      <link>https://dev.to/buildwithaihub/i-gave-claude-code-a-brand-new-windows-pc-five-things-went-wrong-before-it-wrote-a-line-4mpd</link>
      <guid>https://dev.to/buildwithaihub/i-gave-claude-code-a-brand-new-windows-pc-five-things-went-wrong-before-it-wrote-a-line-4mpd</guid>
      <description>&lt;p&gt;Most Claude Code setup guides are written on a machine that already has years of tools on it. I wanted to see what a stranger's first hour actually looks like on Windows, so I gave Claude Code a machine that had never seen it and recorded everything.&lt;/p&gt;

&lt;p&gt;Five things went wrong before it wrote a single line of real code. All five are measured, all five have a fix, and one of them is a safety problem.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/JuUlzYnfYOo" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  The clean room: Windows Sandbox
&lt;/h2&gt;

&lt;p&gt;My own PC has months of leftovers on it, so it can't show what a stranger sees. Windows Sandbox is a fresh copy of Windows every time you open it, and it forgets everything when you close it. That makes it a good test bench for "first install" questions.&lt;/p&gt;

&lt;p&gt;It isn't free, though. The Sandbox base image took 3.8 GB of my C: drive, and one rehearsal took my free space from 4.4 GB down to 2.2 GB. Check your free space before you start. Also: judge the Windows version by the build number. My Sandbox said "Version 2004", and only the build number told me what I was actually running.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trap 1: the installer succeeds, and &lt;code&gt;claude&lt;/code&gt; is still "not recognized"
&lt;/h2&gt;

&lt;p&gt;The official installer finishes cleanly, prints where it put Claude Code, and then tells you that folder is not on your PATH. On a clean machine it doesn't add it for you, so typing &lt;code&gt;claude&lt;/code&gt; fails.&lt;/p&gt;

&lt;p&gt;The fix: add the &lt;code&gt;.local\bin&lt;/code&gt; folder in your user profile to your &lt;strong&gt;user&lt;/strong&gt; PATH. In PowerShell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Environment&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="n"&gt;SetEnvironmentVariable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Path'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Environment&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="n"&gt;GetEnvironmentVariable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Path'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'User'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;";&lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;USERPROFILE&lt;/span&gt;&lt;span class="s2"&gt;\.local\bin"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'User'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then close PowerShell completely, open a new window, and run &lt;code&gt;claude --version&lt;/code&gt;. &lt;code&gt;claude doctor&lt;/code&gt; will list a few things as "not fetched" before you sign in. That's expected, not an error.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trap 2: two exits that look like crashes
&lt;/h2&gt;

&lt;p&gt;The first time you start Claude Code in a folder, it asks whether you trust that folder, and the highlighted answer is &lt;strong&gt;No, exit&lt;/strong&gt;. Press Enter without reading and it just closes.&lt;/p&gt;

&lt;p&gt;The second one: &lt;code&gt;/logout&lt;/code&gt; doesn't only sign you out. It exits Claude Code too.&lt;/p&gt;

&lt;p&gt;Neither is broken. Both will make a beginner think it is.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trap 3: it starts in auto mode (the one that matters)
&lt;/h2&gt;

&lt;p&gt;A new install of Claude Code starts in auto mode. I asked it to list the folder and create a test file, and it wrote the file without asking me first. On someone's first day, that isn't what you want.&lt;/p&gt;

&lt;p&gt;The fix is a project settings file, &lt;code&gt;.claude/settings.json&lt;/code&gt;, with the default permission mode set back to asking:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"permissions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"defaultMode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"default"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With that file in the project, the next start showed manual mode, and Claude asked before it wrote. I measured that in the same run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trap 4: a write guard that blocked the product itself
&lt;/h2&gt;

&lt;p&gt;Claude Code's built-in sandboxing isn't supported on native Windows, so I added a guard: a small PreToolUse hook script that refuses file writes (Claude's Write and Edit tools) outside the project folder. It blocked a write to the Desktop and let a write inside the project through.&lt;/p&gt;

&lt;p&gt;But the first version also blocked plan mode. Plan mode saves its plans under your user profile, in &lt;code&gt;~/.claude/plans&lt;/code&gt;, which is outside the project. The fix was to allow that one folder.&lt;/p&gt;

&lt;p&gt;The lesson I'd keep: &lt;strong&gt;before you ship a guard, list every place the product itself writes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One honest limit: this guard covers Claude's file-writing tools. It is not a sandbox, and it does not stop a shell command from writing somewhere else. Asking before acting (trap 3) is what covers that.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it cost
&lt;/h2&gt;

&lt;p&gt;The clean install, talking it through as I went, took 32 minutes. The secure setup took 28 more. Undoing everything took about 5. And the first draft of my undo list forgot the PATH entry I had added myself, which is its own small lesson: build an undo list by reversing your own steps, not by copying the vendor's uninstall page.&lt;/p&gt;

&lt;h2&gt;
  
  
  The files
&lt;/h2&gt;

&lt;p&gt;The settings file and the guard script are free, plain text, and short. Read them before you use them: &lt;a href="https://lgcreativestudios.github.io/buildwithaihub/#free" rel="noopener noreferrer"&gt;https://lgcreativestudios.github.io/buildwithaihub/#free&lt;/a&gt; (or straight from GitHub: &lt;a href="https://github.com/lgcreativestudios/buildwithaihub/tree/main/book/windows-setup" rel="noopener noreferrer"&gt;https://github.com/lgcreativestudios/buildwithaihub/tree/main/book/windows-setup&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  The five, in one list
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;It isn't on your PATH.&lt;/li&gt;
&lt;li&gt;The trust prompt defaults to exit.&lt;/li&gt;
&lt;li&gt;Logging out exits too.&lt;/li&gt;
&lt;li&gt;It starts in auto mode.&lt;/li&gt;
&lt;li&gt;A guard has to allow the product's own plan folder.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And remember: don't trust the report. Check the number.&lt;/p&gt;




&lt;h3&gt;
  
  
  Tools I used to make the video
&lt;/h3&gt;

&lt;p&gt;I'm an independent affiliate of ElevenLabs, Higgsfield and vidIQ. If you sign up through these links I may earn a commission, at no extra cost to you.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ElevenLabs (the voices): &lt;a href="https://try.elevenlabs.io/n5brzq80coed" rel="noopener noreferrer"&gt;https://try.elevenlabs.io/n5brzq80coed&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Higgsfield (the thumbnail image): &lt;a href="https://higgsfield.ai?fpr=buildwithaihub" rel="noopener noreferrer"&gt;https://higgsfield.ai?fpr=buildwithaihub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;vidIQ (research and the music bed): &lt;a href="https://vidiq.com/buildwithaihub" rel="noopener noreferrer"&gt;https://vidiq.com/buildwithaihub&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The narration voices are AI (ElevenLabs). The Sandbox run, the errors and the numbers are real.&lt;/p&gt;

&lt;p&gt;ElevenLabs and the ElevenLabs logo are registered trademarks or trademarks of ElevenLabs, Inc. Used with permission. buildwithaihub is not sponsored by, endorsed by, or affiliated with ElevenLabs except as an independent participant in the ElevenLabs Creator Affiliate Program.&lt;/p&gt;

</description>
      <category>claude</category>
      <category>ai</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>The wrapper that made my overnight AI scraper safe to leave running</title>
      <dc:creator>buildwithaihub</dc:creator>
      <pubDate>Fri, 25 Sep 2026 01:41:52 +0000</pubDate>
      <link>https://dev.to/buildwithaihub/the-wrapper-that-made-my-overnight-ai-scraper-safe-to-leave-running-2225</link>
      <guid>https://dev.to/buildwithaihub/the-wrapper-that-made-my-overnight-ai-scraper-safe-to-leave-running-2225</guid>
      <description>&lt;p&gt;I wanted a small research database to grow from one subreddit to ten communities where people talk about building with Claude Code and automation. Doing it properly was estimated at about $118. It cost about $34, and the corpus went from roughly 1,000 chunks to 5,846. Overnight, while I slept.&lt;/p&gt;

&lt;p&gt;The scraping ran through a paid provider (Apify) that charges per delivered record. The cleaning, tagging and indexing were my own Python. Around all of it sat one PowerShell script, which Claude wrote for me. That script is what this post is about, because the agent isn't the hard part. Anyone can make an agent do something impressive while they're watching. The hard part is the wrapper that makes it safe to stop watching.&lt;/p&gt;

&lt;p&gt;Three rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Every phase is resumable
&lt;/h2&gt;

&lt;p&gt;The script keeps its own state: chunks before and after, spend at the start and end, what it recovered and what it couldn't. All of it is set before the work starts and read again at the end.&lt;/p&gt;

&lt;p&gt;Scraping is the phase that fails. Reddit blocks a scraper that hits too many communities in one session, with a 403. My first version asked for all ten subreddits at once. Four listings came back empty, including every Claude community, and the run still said it succeeded.&lt;/p&gt;

&lt;p&gt;The fix wasn't a smarter agent. It was batching: three subreddits at a time, and anything that comes up short goes into a retry queue and comes back on its own after a pause. All four blocked listings came back that way. Because the provider only bills for delivered records, the failed attempts cost nothing.&lt;/p&gt;

&lt;p&gt;Everything after scraping (cleaning, tagging, indexing) can run again on the same input without doubling anything, and the paid tagging step skips whatever it has already done. That's what lets the script retry without asking me. If it needed my permission to re-run, I'd have to be awake.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Judge success by the provider's number, not yours
&lt;/h2&gt;

&lt;p&gt;The obvious check: count your rows before the scrape, count them after, and if the number went up, it worked.&lt;/p&gt;

&lt;p&gt;It's wrong, and it's wrong in a way that looks exactly like a failure. The pipeline deduplicates on the way in. A second pass over a community pulls the day's top posts, and many of those are already stored from the first pass. So the provider can deliver hundreds of good records while your database barely moves. A check on your side calls that a dead run and pays to scrape it again.&lt;/p&gt;

&lt;p&gt;So success is the provider's delivered-record count, checked against a minimum I set for each community. My side can legitimately show no change and still be fine.&lt;/p&gt;

&lt;p&gt;Money works the same way. Before every paid attempt, the script reads the account's actual spend for the month from the provider and stops at a hard cap. It doesn't keep its own estimate. If something in my pipeline miscounts, the budget check can't be fooled, because it isn't counting anything. It asks the account.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Write the report even if it crashes
&lt;/h2&gt;

&lt;p&gt;The end of the script is a &lt;code&gt;finally&lt;/code&gt; block. Whatever goes wrong above it (an error, a failed scrape, the provider going down), it still builds a coverage table, writes a status banner, saves the report and opens it in Notepad. One caveat: &lt;code&gt;finally&lt;/code&gt; covers errors inside the script. If the whole process is killed, nothing runs.&lt;/p&gt;

&lt;p&gt;The first real report said &lt;strong&gt;PARTIAL&lt;/strong&gt;: one community, one listing not recovered, named, with the command to re-run it. Not a failure, a to-do. The mop-up the next day brought back 47 records, which was everything that community had that day.&lt;/p&gt;

&lt;p&gt;When you're asleep for the whole run, silence is the worst output. Silence can mean everything worked, or that it died in the first 30 seconds, and from the couch those look the same. The report is what tells them apart.&lt;/p&gt;

&lt;h2&gt;
  
  
  What went wrong anyway
&lt;/h2&gt;

&lt;p&gt;Two things, both the same lesson.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Headless Claude Code holds back its output.&lt;/strong&gt; Launched from a script, it prints nothing until it exits unless you tell it to stream. So the log file sits at zero bytes for the whole run, and a healthy agent looks exactly like a dead one. I now judge an agent by the timestamps on the files it's writing and its CPU time climbing, never by the log.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My summary tables were one row long.&lt;/strong&gt; The script that builds them had a nested database cursor that reset the outer loop after the first row. Every table came out formatted and plausible, and wrong. Now I count the rows I expect instead of eyeballing the top of the file.&lt;/p&gt;

&lt;p&gt;A run that reports success and is wrong is scarier than a run that crashes. The crash tells you. The plausible report doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get the script
&lt;/h2&gt;

&lt;p&gt;The script is free on GitHub, with a header marking which lines to adapt:&lt;br&gt;
&lt;a href="https://github.com/lgcreativestudios/buildwithaihub/blob/main/scripts/v1/phaseC_overnight_orchestrator.ps1" rel="noopener noreferrer"&gt;https://github.com/lgcreativestudios/buildwithaihub/blob/main/scripts/v1/phaseC_overnight_orchestrator.ps1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It runs locally in PowerShell on Windows, reads your own Apify and OpenRouter keys from your user environment variables, calls those two services with them, and writes only local files. Read it before you run it.&lt;/p&gt;

&lt;p&gt;Here's the 7-minute walkthrough, with the real report on screen:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/RF7OodAVfks" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools I used to make the video
&lt;/h2&gt;

&lt;p&gt;I'm an independent affiliate of ElevenLabs, Higgsfield and vidIQ. If you sign up through these links I may earn a commission, at no extra cost to you.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ElevenLabs&lt;/strong&gt; voices the narration: &lt;a href="https://try.elevenlabs.io/n5brzq80coed" rel="noopener noreferrer"&gt;https://try.elevenlabs.io/n5brzq80coed&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Higgsfield&lt;/strong&gt; made the presenter images and thumbnail options: &lt;a href="https://higgsfield.ai?fpr=buildwithaihub" rel="noopener noreferrer"&gt;https://higgsfield.ai?fpr=buildwithaihub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;vidIQ&lt;/strong&gt; scored the title options and rendered the animated title cards: &lt;a href="https://vidiq.com/buildwithaihub" rel="noopener noreferrer"&gt;https://vidiq.com/buildwithaihub&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also turned these rules into a short book, &lt;em&gt;It Ran While I Slept&lt;/em&gt;: five rules instead of three, the whole wrapper annotated, and a one-page pre-run checklist. Every store in one link: &lt;a href="https://books2read.com/u/4DLP87" rel="noopener noreferrer"&gt;https://books2read.com/u/4DLP87&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm building the whole system in public. If you want the next pieces as they land, there's a waitlist: &lt;a href="https://lgcreativestudios.github.io/buildwithaihub/" rel="noopener noreferrer"&gt;https://lgcreativestudios.github.io/buildwithaihub/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Drafted with Claude's help from the video script. The run, the code and the numbers are real.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;ElevenLabs and the ElevenLabs logo are registered trademarks or trademarks of ElevenLabs, Inc. Used with permission. buildwithaihub is not sponsored by, endorsed by, or affiliated with ElevenLabs except as an independent participant in the ElevenLabs Creator Affiliate Program.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>automation</category>
      <category>webscraping</category>
    </item>
  </channel>
</rss>
