3 times Claude Code saved me from a bad architectural decision
Not "the agent was smarter than me" — more like "having to explain the plan forced me to see the flaw."
The N+1 query
I was building a dashboard that loaded user data. My plan: fetch users, then for each user fetch their recent activity.
When I described this to the agent and asked it to implement it, it asked: "Should I add a JOIN to fetch user data and activity in a single query, or do you want separate queries?"
I said "separate queries for now, we can optimize later." The agent implemented what I asked for.
But the question stuck. "For now" in a dashboard with 1,000 users meant 1,001 database calls on every page load. I went back and specified the JOIN before the feature shipped.
The agent didn't catch the problem. Having to explain my plan to something that would implement it literally made me see the problem myself.
The config approach
I was building a feature with several hardcoded values: a rate limit, a retry count, a cache TTL. My plan was to hardcode them and "make them configurable later."
I described this to the agent and it asked: "Should these values come from environment variables, a config file, or constants?"
The right answer was config file — these were values that would need to change between environments. But I hadn't thought that far. I said "constants for now" and it implemented constants. Then I looked at the production deployment and realized I'd need different values there.
Again: the question, not the answer, was the useful part.
The missing error path
I was adding a third-party API integration. My plan accounted for successful responses and for network failures. I described it to the agent.
It asked: "What should happen if the API returns a 429 rate limit response? Should I implement exponential backoff or just fail and let the caller handle it?"
I hadn't thought about 429s at all. The API I was integrating had aggressive rate limiting in production. Without this question, I'd have shipped an integration that would fail silently in production whenever we hit the rate limit.
The pattern
I'm not claiming Claude Code is smarter than me about architecture. I'm claiming that describing a plan in enough detail for someone else (or something else) to implement it forces you to fill in gaps you'd otherwise skip.
These three catches didn't come from the agent thinking. They came from the agent asking clarifying questions that I hadn't asked myself.
That's a different kind of value than "write code for me." It's "be the person I have to explain my plan to."
From running Claude Code on builtbyzac.com.




