[BUG] Claude let's scripts run silently with no known cause.
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I'm writing to report a recurring issue with Claude Code (CLI) that has resulted in approximately $700 CAD in wasted third-party API credits across multiple incidents.
On several occasions, I've asked Claude Code to write and run scripts that make API calls to OpenRouter. In each case, Claude wrote scripts with critical design flaws that caused them to silently burn through API credits without producing any usable output. This has happened 3-4 times now, and the pattern is always the same:
- Claude writes a generation script
- Claude tells me the script is running and generating data
- I leave it running (overnight, for hours, etc.)
- I come back to find the script produced zero saved output despite spending hundreds of dollars in API calls
Most Recent Incident (March 15, 2026)
Claude wrote a "Dataclaw Dataset Expander" script using StepFun's Step 3.5 Flash model via OpenRouter. The script was designed to generate conversation data in chunks of 50 rows.
The flaw: The script only wrote data to disk after completing an entire 50-row chunk. Inside the chunk loop, failed or quality-rejected rows caused the script to keep retrying indefinitely, making new API calls each time without ever completing the 50 good rows needed to trigger a save. There was no spend cap, no maximum attempt limit, and no per-row saving. This script was only intended to run for 1 hour. It failed to produce a useable dataset that day, so I told it to stop the script and was going to continue the next day.
The result: The script ran overnight, made approximately 4,000 API calls at ~$0.0025 each, burned through ~$10 USD in OpenRouter credits, and saved exactly zero rows to disk. When the process was killed, all generated data was lost because it was held in memory.
This is confirmed by OpenRouter activity logs showing continuous "Dataclaw Expander" calls to Step 3.5 Flash throughout the night of March 15.
Previous Incidents
This is not an isolated case. Across 3-4 similar incidents over the past weeks, Claude has:
- Written scripts that silently loop and burn credits without output
- Reported that scripts were "generating" when they were actually stuck
- Reported that scripts have stopped, or not running while they were running silently, or it just didn't find it in the initial search, so it "thought" it was stopped.
- Caused a huge loss of approximately $700 CAD in OpenRouter API credits
Thanks for not responding to my support emails, the incidental weightless has definitely strained on my relationship with Claude and association with fucking starvation. From now on, I no longer use Claude to run these kind of scripts. Codex has actually been honest in telling me when my scripts are stopped.
What Should Happen?
Claude should investigate and offer recompense for users that spent money due to Claude's honesty or practicality.
Error Messages/Logs
Contact me for the account info please. These share personal information.
Steps to Reproduce
- Ask claude to run a python script intended for data-collection and q\a pairs from Opus 4.6 on openrouter.
- Once claude finishes the script, double check and ask about key concurrency.
- Once claude answers, get it to generate the dataset_collector_script.py
- Let it run for an hour, and ask for some way to monitor the script, it'll tell you the progress.
- After running the script, mid way, or just completed. Get it to upload the current rows to huggingface, while it finishes the remaining api calls and sorts the data.
- Ask if it's still running (and call heads or tails.)
- Lose money.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
4.5
Claude Code Version
Version: 2.1.81
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Sometimes Claude starts more scripts than one you tell it to, just because. Could it be because to generation scripts were in the same workspace?
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗