Still copy-pasting code into a chat window? Here is what you are missing.

You describe what you want in a chat window. The AI writes some code. You copy it, paste it into your editor, run it, hit an error, copy the error back into the chat, paste the fix, run it again. Sound familiar? There is a much better way — and with Claude Code running on the new Claude Opus 4.8, the gap between the two workflows is now enormous.

The copy-paste treadmill

Chatting with an AI to write code feels productive. You get answers fast. But the loop has a hidden tax: you are the integration layer. Every file the AI “writes” only exists as text in a chat bubble until you move it. The AI cannot see your real project, cannot run your tests, cannot read the actual error your terminal printed, and forgets the shape of your codebase between messages. You spend your day ferrying snippets back and forth like a courier.

That is fine for a one-off function. It falls apart the moment you want to build something real across more than one file.

What Claude Code does differently

Claude Code is not a chat box. It is an agent that runs in your terminal, inside your actual project folder, with permission to read your files, edit them, run commands, and read the output. The difference is not “it writes better code.” The difference is that it closes the loop you were manually closing.

  • It reads your whole project. No more pasting six files in for context. It opens them itself.
  • It writes files directly. The code lands on disk, in the right place, not in a bubble you have to copy.
  • It runs your code and reads the errors. Test fails? It sees the stack trace and fixes it — you never copy an error message again.
  • It remembers. A persistent CLAUDE.md file holds your conventions so you are not re-explaining your stack every session.
  • It can check its own work. On Opus 4.8, Anthropic says the model is roughly four times less likely to let a flaw in its own code pass unremarked than the previous version. It is its own first reviewer.

You stop being the courier and start being the reviewer. That is the whole shift.

Why Opus 4.8 makes this the moment to switch

Claude Opus 4.8 shipped on May 28, 2026, and it is the engine that makes the agent workflow genuinely pleasant rather than just possible:

  • A 1-million-token context window. It can hold a large codebase in its head at once — the thing copy-paste can never give you.
  • Fast mode. Toggle it with /fast. It is the same Opus model with faster output (it does not drop you to a smaller model), and Anthropic priced it about three times cheaper than fast mode on previous models. Quick edits feel instant.
  • Effort control. Dial how hard the model thinks — more effort for a gnarly refactor, less for a one-liner.
  • Better coding judgment. The headline improvement is in catching its own bugs, which is exactly what you want from something editing your files unattended.

For most people the model is included in their Claude subscription — the point is you are not paying a premium to get the good one.

The trick: turn your chat idea into a spec file

Here is the bridge between the two worlds, and it is the single most useful habit I can give you.

Brainstorming in the Claude.ai chat window is great — that is where you think out loud, argue with yourself, and shape a vague idea into a real plan. So do that. Then, instead of asking the chat to write the code, ask it to write the spec. The magic words:

Take everything we just discussed and turn it into a single, detailed
build specification. Put it in a Markdown file called PROJECT_SPEC.md.
Include: the goal, the tech stack, a file-by-file breakdown of what to
build, the data model, and acceptance criteria I can test against.
Write it as instructions for a coding agent, not for a human.

Why a file specifically? Because a Markdown file in Claude.ai has a Download button — click it and you get a real text file with a .md extention on your disk that claude code can read. (Note: there is no native “export this whole conversation as Markdown” button in Claude.ai — that is exactly why you ask for the spec as an artifact. The download lives on the artifact, not the chat.)

Now you have PROJECT_SPEC.md. Drop it into an empty project folder, open Claude Code, either in the terminal or the desktop app. In the claude code chat window say:

Read PROJECT_SPEC.md and build it. Work through it file by file. After
each part, run it to confirm it works before moving on. Ask me if any
decision in the spec is ambiguous.

That is the whole workflow. Chat is where you think; Claude Code is where you build. The .md file is the clean handoff between them — a contract the agent can read, follow, and check itself against. No snippets, no couriering, no “wait, which version of that function are we on?”

A nice bonus: that spec file is now documentation. Six months later it tells you (and the next agent) exactly what this thing was supposed to do.

Run the code safely: Docker Desktop + Claude Code

There is one piece people skip and then regret: where the agent runs the code it writes. When you let an AI execute commands on your machine — install packages, run a sample app, spin up a database — you are running unfamiliar code on your real laptop. The professional answer is a container.

Why bother with Docker

  • Isolation. Whatever the sample code does, it does inside a sealed box — not against your system Python, your global npm, or your real files.
  • Cleanliness. Trying out a project that needs Postgres, Redis, and three system libraries? It all lives in the container. Delete it and your machine is exactly as it was.
  • Reproducibility. “Works on my machine” dies here. The container is the machine, and it works the same when you decide to host it on a server on the internet.

How to install Docker Desktop

  1. Go to docker.com/products/docker-desktop and download the build for your OS (Apple Silicon, Intel Mac, Windows, or Linux — the site detects it for you).
  2. macOS: open the .dmg and drag Docker into Applications. Windows: run the installer and keep the WSL 2 option checked when prompted.
  3. Launch Docker Desktop and let it finish starting — you will see the whale icon settle in your menu bar / system tray.
  4. Confirm it works from a terminal:
docker run hello-world

If you get the “Hello from Docker!” message, you are done. That is the entire setup.

Ask Claude Code to run the sample code in a container

Now point Claude Code at the project and let it handle the containerizing. You do not need to know Dockerfile syntax — that is the agent’s job. A prompt that works:

Docker Desktop is installed and running. Before you run any of this
project's code on my machine, containerize it:

1. Write a Dockerfile (and a docker-compose.yml if it needs services
   like a database).
2. Build the image.
3. Run the sample code inside the container and show me the output.
4. Keep everything in the container - do not install project
   dependencies on my host system.

If the build fails, read the error and fix the Dockerfile yourself.

This is where the closed loop really pays off: Claude Code writes the Dockerfile, runs docker build, reads the build output, fixes its own mistakes, runs the app, and shows you the result — all without a single copy-paste from you. The errors it hits, it reads. The errors it reads, it fixes.

If you want to go further, Anthropic ships an official dev container setup for Claude Code (referenced in devcontainer.json as ghcr.io/anthropics/devcontainer-features/claude-code), and Docker now publishes a ready-made Claude Code sandbox image you can launch with its sbx CLI. Both put the agent itself inside the container, with file access and network locked down — the safest way to let it run fully unattended. Ask Claude Code to set one up for you once you are comfortable with the basics.

Putting it together

The whole modern workflow, end to end:

  1. Think in chat. Brainstorm the idea in Claude.ai until it is sharp.
  2. Export the spec. Ask for a Markdown artifact, hit Download, get PROJECT_SPEC.md.
  3. Build with Claude Code. Point it at the spec in your project folder and let it write the files.
  4. Run it in Docker. Have it containerize and execute the code so nothing touches your real machine.
  5. Review, do not courier. Read the diffs, push back, approve. You are the editor now.

If you are still copy-pasting code into a chat window, you are doing the agent’s job by hand. Move the idea into a .md file, hand it to Claude Code, and let it run in a container. The first time you watch it fix its own failed build without you touching a thing, you will not go back.

— Ben

Leave a Comment

Your email address will not be published. Required fields are marked *


Scroll to Top