
"But it works on my machine."
Every developer has said this. Most of us have said it more times than we'd like to admit. When it's just humans writing code, that gap between local and production is annoying but manageable. You debug it, you fix it, you move on.
But now we're handing that same messy local environment to AI agents: tools that can write files, execute commands, and make decisions without asking permission first. That gap isn't just annoying anymore. It's actually dangerous.
Ben Potter, our VP of Product here at Coder, put it perfectly on our first episode of the Devolution podcast: Your local machine might be lying. As Ben puts it, "the code we write there is not what actually runs in production, and the gap between the two only widens when AI agents enter the mix."
The solution isn't better prompts or smarter models. It's better infrastructure. Short-lived environments that give both humans and AI agents a consistent, production-like place to work.
Quick clarification: when I say "AI agent," I'm not talking about glorified autocomplete. I mean a language model that's connected to actual tools and can act on feedback. It writes files, runs terminal commands, reads the output, and adjusts what it does next. These things are semi-autonomous. They don't wait for you to approve every action.
Which is great for productivity. And also means they can cause a lot of damage if they're working in a broken or unpredictable environment.
Local dev environments are all different. Every single one. You've got different OS versions, different installed libraries, config files you forgot about three years ago, dependencies that got pinned to weird versions to work around some bug that's probably been fixed by now.
Devs deal with this by working around it. They disable security checks that are "too annoying." They hardcode paths. They also accumulate technical debt like it's a hobby.
For humans, this is frustrating but survivable. For AI agents, it's completely unsustainable. These tools need stability and reproducibility. Asking an agent to operate in your janky local setup is like asking someone to learn to drive in a car where the steering wheel only sort of works sometimes.
Ephemeral environments are pretty elegant. Every time you spin one up, it's completely fresh with no leftover files, no mystery configuration from last week's debugging session. They mirror production closely, so what you're testing actually reflects what will run in the real world.
And when something goes wrong, you don't spend hours trying to clean up the mess. You just delete the environment and start fresh.
At Coder, we've built our platform around ephemerality. Every dev, every AI agent gets launched into a clean workspace that behaves like production. No more "well, it works on my machine" because everyone's machine is essentially the same.
Here's what happened to me last week: I was testing an agent that got stuck in a loop and started generating a bunch of garbage code. In a traditional local environment, I'd be stuck cleaning that up manually, trying to figure out what got changed, maybe even dealing with a corrupted state. Instead, I hit delete, spun up a new workspace, and was back to work in maybe 30 seconds.
AI agents don't second-guess themselves. If they decide to run rm -rf, they're just going to do it. You need real guardrails, not just good intentions.
Short-lived workspaces are a big part of that safety net. They contain the blast radius when something goes wrong. Combine that with sensible defaults (read-only filesystems where appropriate, no internet access unless explicitly needed), and you've got a workspace where agents can operate without the risk of catastrophic mistakes.
This isn't just us saying this. Anthropic's documentation explicitly recommends strict permissions for AI agents. Simon Willison has written about what he calls the "lethal trifecta": AI agents with too much access in poorly secured environments. Ephemerality cuts through that risk.
This isn't just about making AI safer. Human developers benefit from this too.
Clean-slate environments make it easier to handle sensitive data, keep costs under control, and stay compliant with various regulations. But honestly, the biggest win is just eliminating the "works on my machine" problem entirely.
When everyone's working from the same production-like environment, debugging becomes about the actual code instead of someone's weird local setup. New developers can onboard faster because there's no multi-day setup process. Security teams finally get the audit trails and consistency they've been asking for.
At a small scale, ephemeral environments are a nice quality-of-life improvement. At enterprise scale with thousands of devs, dozens of AI agents all running simultaneously, they become essential infrastructure.
But you can't just wing it. You need proper orchestration to handle provisioning and teardown. You need cost controls so you don't wake up to a surprise AWS bill.
And you need observability to understand what your agents are doing and when they did it.
The hard part of deploying AI at scale isn't the AI itself. It's doing it in a way that's safe, predictable, and auditable across an entire organization.
If you're investing in AI tooling but haven't thought about your infrastructure, you're probably taking on more risk than you realize. Ephemeral environments aren't optional. They're foundational.
AI agents are getting better fast, but they're not magic. They need good infrastructure to be reliable. With ephemeral workspaces, you can move faster, stay safer, and actually scale this stuff with confidence.
What surprised me most about working on this infrastructure problem is how much it benefits everyone, not just the AI. We built Coder to solve the agent problem, but our customers keep telling us the human developers are just as happy to finally be free of local environment hell.
If you want to see what this looks like in practice, check out Coder. We've built our platform around giving developers and AI agents the guardrails they need without slowing them down.
Want to hear the full conversation with our VP of Product, Ben Potter? You can catch the full episode on YouTube, Spotify or Apple Podcast.
Want to stay up to date on all things Coder? Subscribe to our monthly newsletter and be the first to know when we release new things!