What is vibe coding and why does it hurt in production?
Debugging production errors is hard enough when you know what changed. Vibe coding makes it harder. Andrej Karpathy coined the term in February 2025 for building software by prompting an AI assistant and accepting the code it writes without really reading it. It is now used more broadly for any change shipped on vibes rather than tests, review or observability: the late-night refactor, the quick tweak on main, the pasted snippet nobody fully understands. In development it feels fast. In production it feels like a 500 error at 2 am.
- No one can clearly answer: “What exactly changed between the last good deploy and now?”
- Large AI-generated diffs were merged without anyone reading them line by line.
- Commits touch many files with vague messages like “cleanup”, “refactor” or “fix stuff”.
- There are no feature flags to switch risky changes off — only rollbacks or hotfixes.
- Logs, traces and metrics don’t match the new behaviour because instrumentation was never updated.
- Incidents end with one-off patches instead of lessons that change how the team works.
Step 1: Stabilise production before you get clever
Before you chase the perfect root cause, make production boring again. The goal is to stop users from hurting while you work out what actually happened.
- Confirm the scope with external monitoring: is the whole site down, one route failing, or an SSL or DNS problem?
- Switch off or roll back the riskiest changes first: recent refactors, large AI-generated changes or features shipped without flags.
- Prefer a known-good deploy over clever hotfixes if your deployment setup lets you roll back safely.
- Add temporary rate limiting or circuit breakers around the failing area to reduce the blast radius.
- Degrade gracefully where you can: serve cached data, static fallbacks or partial functionality instead of hard failures.
- Give stakeholders a one-line status: “We’ve contained the impact and are now tracing the root cause.”
Step 2: Rebuild context from git and observability
Vibe coding usually means context got lost. To debug effectively you need a clear picture of what changed and how the system behaved before, during and after the incident.
Use git to reconstruct the story
Compare the last known good commit with the broken deploy and group the changes by concern: routing, configuration, data access, UI and so on. Look for changes to hot paths, global utilities or shared types. If the code came from an AI assistant, read the diff now as carefully as you would a stranger’s pull request.
Use logs, traces and metrics as a timeline
Line up deploy times with spikes in error rates, latency, failed uptime checks or unusual log messages. If logging is thin, add just enough instrumentation around the failing area (input payloads, critical branches, external calls) and reproduce the issue on staging or a low-traffic slice.
Step 3: Turn vibes into testable hypotheses
“I have a bad feeling about that refactor” is not a debugging strategy. Turn the feeling into concrete, falsifiable statements you can prove or disprove quickly.
- “If the bug only appears for users with stale cookies, clearing the session should remove the error.”
- “If this nullable field started throwing, a missing migration or a changed API response shape is likely.”
- “If this change altered a shared helper, other endpoints using it should show similar anomalies in the logs.”
- “If our retry logic changed, we should see a different pattern of timeouts and downstream 5xx errors in our traces.”
Step 4: Add guardrails before the next quick fix
Once you’ve found the bug and shipped a stable fix, you’re only halfway done. Add guardrails that make it harder for vibe-coded changes to slip into production.
- Wrap risky areas in feature flags so you can switch changes off without redeploying.
- Add a few high-signal tests around the bug you just fixed: a unit test for the edge case and an integration or contract test at the failing boundary.
- Review AI-generated code like any other contribution: small diffs, tests and a person who understands it.
- Instrument critical flows with structured logs and metrics so regressions show up quickly.
- Require small, reviewable pull requests for shared infrastructure and core helpers.
- Make rollbacks cheap with blue/green or canary deploys, or at least a one-command rollback.
Step 5: Run a lightweight postmortem and change the system
The point of the postmortem isn’t to blame whoever vibed the code. It’s to make this class of bug harder to ship again.
- Write a short, honest timeline: when the change shipped, when the error appeared, how it was detected and how it was fixed.
- Name the structural causes: missing tests, thin observability, no feature flags, unclear ownership or rushed deploys.
- Agree on one to three small, concrete changes — a new alert, a test harness around a fragile area or a pull request size rule for sensitive modules.
- Update runbooks and onboarding docs so the next engineer can debug the same class of problem in minutes, not hours.
- Schedule a follow-up in a few weeks to check the new guardrails are actually in use.
Debugging production errors: FAQ
What is the first step when debugging production errors?
Stabilise production. Roll back or switch off the riskiest recent change so users stop seeing errors, then investigate the root cause without time pressure.
What is vibe coding?
A term coined by Andrej Karpathy in 2025 for building software by prompting an AI assistant and accepting its output without closely reviewing it. It is often used more broadly for any change shipped without tests, review or monitoring.
How do I find which change caused a production bug?
Compare the last known good deploy with the broken one, group the diff by concern, and line up deploy times with spikes in errors or latency in your logs and monitoring.
How can monitoring catch vibe-coded bugs sooner?
External uptime, SSL, DNS and performance checks alert you when users are affected, often before anyone reports it. Tracking Core Web Vitals after each deploy also shows when a change made pages slower.
Related reading
Make production debugging boring again
nanokoi helps you catch vibe-coded bugs faster with uptime checks, Lighthouse performance runs, DNS and SSL monitoring, and AI-generated optimisation reports. Pair good habits with good monitoring and 2 am incidents stop being guesswork.
Start Monitoring with NanokoiFree forever plan • No credit card required