[OPUS 4-6] Issue: AI repeatedly blamed user configuration instead of identifying code bugs
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Claude modified files I didn't ask it to modify
What You Asked Claude to Do
Over 5 days and multiple Claude Code sessions, I experienced two critical bugs in my Railway-deployed Flask app:
- 2. SQLite on ephemeral filesystem: My app used SQLite for user data (accounts, wallets, transactions). Railway containers have ephemeral filesystems — every deploy wipes all local files. This meant every user account was deleted on every deploy. I had to create 14 accounts over 5 days.
- 2. Random Flask SECRET_KEY: The app generated a new secrets.token_hex(32) on every startup, meaning every deploy invalidated all user sessions and logged everyone out. Both bugs are well-known deployment pitfalls with obvious fixes (use PostgreSQL, use a stable secret key). A PostgreSQL database was already connected to the app for other data.
What Claude Actually Did
The problem with Claude: Across multiple sessions, when I reported that my accounts kept disappearing and I kept getting logged out, Claude repeatedly told me to check my environment variables, verify my Railway configuration, and confirm my settings — over and over. It never looked at the actual code to identify that SQLite + ephemeral filesystem = data loss, or that a random secret key = session loss on every deploy. It treated a clear code bug as a user configuration error, which was frustrating and wasted days of my time and money.
Expected Behavior
Expected behavior: Claude should examine the code first before assuming user misconfiguration, especially when the same issue is reported repeatedly.
Files Affected
- db.py — modified (rewritten from SQLite to PostgreSQL) - app.py — modified (fixed SECRET_KEY from random to stable)
- auctionfinder.db — this was the SQLite database file that kept getting wiped on every deploy (the root cause)
Permission Mode
Accept Edits was OFF (manual approval required)
Can You Reproduce This?
No, only happened once
Steps to Reproduce
_No response_
Claude Model
Opus
Relevant Conversation
Impact
Medium - Extra work to undo changes
Claude Code Version
version 2>nul || claude -v 2>nul
Platform
Anthropic API
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗