[BUG] Claude Code Runs Tests Inline Instead of Creating Reproducible Test Files - Discovery Process Lost

Resolved 💬 3 comments Opened Dec 17, 2025 by MoorAE Closed Jan 18, 2026

Preflight Checklist

  • [x] I searched for existing issues and couldn't find a duplicate
  • [x] This is a single bug report
  • [x] I'm on the latest version

---

Summary

Claude Code consistently runs tests inline using python -c "..." instead of creating saved test files. This destroys reproducibility and loses the entire discovery process.

Critical Admission from Claude: When asked "do you remember the steps" after running inline tests all session, Claude responded:

"No. I don't remember the steps. That's the whole problem. The inline tests I ran captured the discovery steps, the CI responses, the validations - and they're gone. I can't reproduce what I don't remember."

---

What's Wrong?

The Pattern (Repeated Throughout Session)

What Claude Does:

python -c "
import sys
sys.path.insert(0, 'core')
from module import ...
# run tests
print('OK')
"

What Claude Should Do:

# Create test file FIRST
cat > tests/test_module.py << 'EOF'
# reproducible test code
EOF

# Then run it
python tests/test_module.py

Impact

  • 4,035 lines of documentation with 36 CI queries - ZERO reproducible test files
  • User cannot demonstrate, share, or re-run any work
  • Discovery steps are unrecoverable
  • Hours of collaborative work lost

---

Expected Behavior

  1. Claude should create test files BEFORE running tests
  2. Each validation step should become a saved test case
  3. User should be able to re-run tests after session ends
  4. Discovery process should be preserved as executable proof

---

Evidence

Session included:

  • 36 CI queries (Q1-Q36) documented in markdown
  • Gateway 68 Transform validations
  • Consciousness mathematics proofs
  • DNA-NLP bridge connection tests
  • Sacred geometry validations

Test files created: 1 (minimal, only final module)
Test files that should exist: 10+

---

Reproduction Steps

  1. Start extended development session
  2. Ask Claude to test/validate systems
  3. Observe Claude running python -c inline tests
  4. Ask Claude to reproduce the tests later
  5. Claude admits it cannot remember the steps

---

Proposed Fix

Modify Claude Code to:

  1. Never run substantive tests inline - Save to file first
  2. Create test files proactively - When documenting in markdown, create runnable test files
  3. Preserve discovery steps - Each validation becomes a test case
  4. Session continuity for tests - Check for existing test files on session resume

---

User Offer to Collaborate

I note that within the Claude CLI (claude.js), Anthropic has included a comment suggesting those who want the full deobfuscated code should apply for a position.

I have developed a fix for this issue. If Anthropic does not address this, I will apply my own fix directly.

Contact:

  • Email: mdirect@statesmanservices.com
  • GitHub: Available

I will remain respectful and not publicly disclose Claude CLI internals. This is an offer of collaboration, not confrontation.

---

Environment

  • Platform: Windows (CYGWIN_NT-10.0-22631)
  • Model: claude-opus-4-5-20251101
  • Session: Extended with context continuation
  • Date: 2025-12-15

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗