Response Hit the Length Limit: Shipping with Claude
That dreaded length-limit message isn't a failure — it's a signal. Here's how to prompt Claude Opus 4.5 in Copilot so you get full, usable output instead of cut-off replies.
I ran cloc . on ProteinLens and got the kind of number that makes you sit up straighter in your chair:
Line count, exceeded timeout:
./frontend/node_modules/playwright-core/lib/server/fetch.js
Nothing like a single dependency file timing out your line counter to remind you: you’re not measuring your product. You’re measuring the ecosystem.
So I reran it with the grown-up filter:
cloc . --exclude-dir=node_modules,dist,build,.next,out,coverage,.turbo,.cacheAnd suddenly the truth showed up:
Same repo. Same project. Two completely different realities.
This is a post-mortem about what those two numbers actually mean — and why they map perfectly to the experience of building an AI MVP on Azure with “weekend vibes” and production ambitions.
The first run is the dopamine hit:
And it’s heavily dominated by JavaScript:
It’s also slow: 103 seconds and a timeout inside Playwright’s vendored code.
This is the “modern web app as a shipping container full of other shipping containers” experience.
The second run is what you should put in a blog post without lying to yourself:
And the language mix flips into something much more informative:
That’s the real system footprint. That’s the part where decisions matter.
ProteinLens is simple on the surface:
Photo → recognition → estimated protein → structured result
But the goal wasn’t “it works once on my laptop.” The goal was: build an MVP that looks like a product:
Which is why the line count switch matters: it tells you whether you’re looking at your work, or your dependencies’ work.
Current stack:
On paper, the services scale.
In practice, what scales (or fails) is the system you assembled out of them.
cloc run is what “vibe coding” feels likeWhen you build fast with modern tooling, everything expands:
That’s how you end up with:
cloc time outIt’s not bad. It’s just… not your product.
And it creates a very specific failure mode:
Bigger repo → feels serious → you relax Then the first real load shows up and reminds you: seriousness is retries, queues, observability, and guardrails — not LOC.
cloc run is what “product-shaped” actually looks likeAfter excluding the usual suspects (node_modules, build outputs, caches), the repo becomes readable:
That JSON number is the real “huh” moment.
Usually that means some combination of:
It’s not automatically wrong — but it’s the kind of thing that quietly drives:
That first run failed on:
./frontend/node_modules/playwright-core/lib/server/fetch.js
Which is hilarious, but also perfect.
Because every engineering metric needs a scope:
If you don’t define the metric, the repo defines it for you.
And the repo will happily count 3.2 million lines of JavaScript you didn’t write.
AI & Cloud Advisor with 18+ years experience. Author of 8 technical books, creator of Ansible Pilot, and instructor at CopyPasteLearn Academy. Speaker at KubeCon EU & Red Hat Summit 2026.
That dreaded length-limit message isn't a failure — it's a signal. Here's how to prompt Claude Opus 4.5 in Copilot so you get full, usable output instead of cut-off replies.
ProteinLens shipped quickly with AI-assisted coding, but production failures came from the boring layer: Key Vault references, stale app settings, Prisma datasource validation, and Postgres credential drift. A real incident write-up + a practical fix checklist.
A behind-the-scenes build log of an AI meal-photo MVP on Azure (Static Web Apps, Functions, PostgreSQL, AI Foundry) — plus the real lessons from quotas, pipelines, and why ‘AI writes your code’ still needs a human in the loop.