← Back to list

Claude Coded My Python Project for 3 Hours Alone

I walked away. It wrote 847 lines, fixed bugs I didn't ask about, and left me a reasoning trail. Here's the full breakdown.

inprogrammer in Python in Plain English · 2026-05-19 07:51 · 0 claps · 4.2 min read paywalled
#python #agentic-ai #software-development #web-development #programming
Open on Medium ↗
Wiki topics: LLM · Large Language Models AGT · AI Agents 💻 · Programming 🌐 · Web Development

Claude Coded My Python Project for 3 Hours Alone

I walked away. It wrote 847 lines, fixed bugs I didn't ask about, and left me a reasoning trail. Here's the full breakdown.

Friend link for non members- https://medium.com/@inprogrammer/claude-coded-my-python-project-for-3-hours-alone-048dcfd2c261?sk=35500bee990a785d93d15e708bed8205

I left Claude Code running on my laptop for 3 hours.

When I came back, it had written 847 lines of production-ready Python, created 6 new modules, fixed 3 bugs I never mentioned, and even left a markdown report explaining every change.

This was not a toy project.

It was a messy real-world data pipeline with 1,400+ lines across 9 files, half-finished logic, and broken parts everywhere.

I gave it ONE instruction and walked away.

What happened next genuinely changed how I think about AI coding tools.

Claude Is Not Just an LLM Anymore

Most people have used Claude in chatbot mode type a question, get a response, paste code back and forth. Useful, but fundamentally a conversation.

Claude Code is different. It runs as an autonomous agent in your terminal. It reads your files, executes code, checks output, catches errors, and loops back to fix them without you intervening.

In my session, Claude noticed a function being called with inconsistent arguments across three files, flagged it in a comment, and refactored all three call sites. I never asked for that. It read the whole codebase and acted on what it found.

That’s what agent mode actually means.

Setup I Used

  • Model: Claude Sonnet 4 via Claude Code CLI
  • Project: Python data pipeline, ~1,400 lines, pandas + SQLite + Click + pytest
  • CLAUDE.md instructions: write tests before code, don’t refactor unless blocked, log decisions (not just progress) to PROGRESS.md, commit as you go

That last instruction log decisions, not just status was the best call I made.

I gave it a prioritised list of 8 features and left.

What Happened, Hour by Hour

Hour 1- methodical and careful. Claude read every file first, then wrote tests before touching production code. The CSV export module came together cleanly, with edge case handling for empty dataframes and unicode characters I hadn’t thought about. It left a comment flagging an inconsistency in existing code but didn’t touch it exactly as instructed.

Claude Code mid-session, reading project files and running tests

Claude Code mid-session, reading project files and running tests

Hour 2- where it got interesting. The validation layer required real iteration. I could see it in the git commits: first attempt, two test failures, revised approach, passing. Commit messages like “fix: schema validator now handles nested dict keys, first attempt used flat key lookup which failed on nested config” told the full story. It also quietly improved the config loader to accept a path argument because the rigid hardcoded path made testing the validator impossible. One judgment call, documented clearly in PROGRESS.md.

Claude’s reasoning log decisions, not just status updates

Claude’s reasoning log decisions, not just status updates

Hour 3- a real blocker, handled well. The scheduling feature stalled. Instead of silently producing bad code, Claude left this:

# BLOCKED: Implementing a cross-platform scheduler without a dependency
# introduces ~200 lines of platform-detection code with low test coverage.
# Recommendation: add 'schedule' (MIT, actively maintained) or scope to Linux/Mac only.
# Leaving a stub and moving to Feature 7.

It left a stub, documented the reasoning, and kept moving. Features 7 and 8 were completed in the final 45 minutes, both with tests.

10 commits made autonomously during the 3-hour session

10 commits made autonomously during the 3-hour session

Cost Breakdown

Session duration      →  3 hours 4 minutes
Estimated API cost    →  ~$4.20–$5.50
Features completed    →  7 of 8
New lines of code     →  847
New tests written     →  57
Bugs fixed (unreq.)   →  3

Cost per feature: under $0.80.

The real cost was review time — I spent 90 minutes checking commits and tests afterward. Budget 30–40% of session time for that. It’s not wasted; it’s fast quality assurance.

Results

91 tests passing after the session up from 34

91 tests passing after the session up from 34

Metric                  Before    After
─────────────────────────────────────────
Lines of code           ~1,400    ~2,250
Tests                       34        91
Test coverage              ~48%      ~71%
Features complete          ~40%      ~78%
Undocumented functions      23         4

That last row: Claude docstringed every function it touched, without being asked.

What I Learned

CLAUDE.md is the real product. The quality of output is almost entirely determined by the quality of your instructions. Specific, opinionated instructions produce specific, opinionated work.

Log decisions, not just progress. “Log what you decided and why” produces a reasoning trail you can actually review.

Give it git from the start. Atomic commits make review fast — you can read the session like a story.

The blocker moment was the most important one. An agent that silently produces bad code under ambiguity is dangerous. An agent that surfaces it and moves on is trustworthy. The scheduler comment told me more about Claude’s reliability than anything it completed.

When to Do This (and When Not To)

Do it when you have a well-defined feature list, an existing codebase with conventions Claude can learn from, and time to review afterward.

Don’t do it when you need architectural decisions made, or you’re starting from scratch with no existing style or structure.

Claude Code running autonomously isn’t a replacement for engineering judgment. It’s an amplifier of decisions you’ve already made. The clearer your thinking going in, the more impressive what you come back to.

I came back to 847 lines of tested, documented, commit-tracked code. The cost was $5. I’m doing it again next week.

Have you run Claude Code on a real project? What’s your longest autonomous session?


메타데이터
post_id
048dcfd2c261
slug
claude-coded-my-python-project-for-3-hours-alone-048dcfd2c261
url
https://medium.com/@inprogrammer/claude-coded-my-python-project-for-3-hours-alone-048dcfd2c261
canonical_url
https://medium.com/@inprogrammer/claude-coded-my-python-project-for-3-hours-alone-048dcfd2c261
author_url
https://medium.com/@inprogrammer
status
ok
fetched_at
2026-06-09 15:37:30