Preview Your App While Claude Codes It
Claude Code on desktop can now start dev servers and preview your running app directly in the interface. Claude sees the UI, reads console logs, catches errors, and keeps iterating β no more switching between terminal, browser, and editor.
This lesson is original educational writing based on this video by Anthropic (published March 19, 2026). All credit for the original content goes to the creators.
1. The problem with invisible development environments
When you use Claude Code to build a UI or a web application, you describe what you want, Claude writes code, you run the app to see if it looks right, and then you go back to Claude with corrections. This loop works, but it has a significant limitation: Claude is coding blind. It cannot see the running app. It writes code based on its understanding of your description and the codebase, makes changes, and hopes they produce the result you described. When they do not β when the layout is off, an error surfaces in the console, or a component renders incorrectly β the only way Claude finds out is when you describe the problem in the next message.
This invisible feedback loop degrades the quality of Claudeβs iterative coding in two ways. First, Claude has to make more conservative assumptions about what is working rather than observing it directly. Second, the cycle of βdescribe problem β Claude makes change β you check in browser β describe new problemβ is slower and more error-prone than direct observation. You have to translate visual and runtime information into natural language, Claude has to interpret that translation, and the round-trip adds latency and potential miscommunication at every step.
The app preview feature eliminates this gap. Claude Code on desktop can now start a development server for your project, open a live preview of the running application within the interface, and observe the rendered UI and console output directly. The feedback loop from code change to visual result is now closed within Claude Code itself β no more switching to a browser, no more manually copying error messages, no more describing layout issues in words when a screenshot would communicate them instantly.
2. What Claude can see in the preview
The preview capability gives Claude access to four distinct streams of information about the running application.
Rendered UI is the most impactful. Claude can take a screenshot of the current state of the application and reason about what it sees visually. This is qualitatively different from reading source code and imagining what it will look like β Claude sees the actual rendered output, including CSS layout behavior, font rendering, responsive breakpoints, component positioning, and visual hierarchy. When something looks wrong, Claude can identify it from the rendered output rather than requiring you to describe it.
Console logs give Claude access to the runtime information that JavaScript applications produce during execution: debug messages, network request details, state changes, third-party library output, and any console.log statements in the application code. Console logs are often the first indicator that something is behaving incorrectly even when the UI looks right β an incorrect API response, a state management issue, or a failed data fetch may not visually manifest immediately but will appear in the console.
Runtime errors are perhaps the most immediately useful input. When JavaScript throws an unhandled exception, a React render fails, a network request returns an error status, or a CSS rule causes a layout engine error, these surface as errors in the browser console. Claude can read these errors directly, identify the root cause in the source code, and fix them without you having to copy-paste error messages into the conversation.
Network requests round out the observability picture. Seeing which API requests are being made, what payloads they carry, and what responses they receive helps Claude debug integration issues between the frontend and backend without requiring you to manually inspect network traffic in browser devtools.
3. The iterative development loop
With app preview, the development loop shifts from a cycle that requires your participation at every step to one where Claude can drive many iterations autonomously. A typical session without app preview looks like: you describe a UI change β Claude implements it β you run the app β you describe what looks wrong β Claude implements a fix β you run the app again. Each iteration requires your active participation.
With app preview, a session can look like: you describe a UI goal β Claude implements an approach β Claude looks at the preview, sees a layout issue β Claude adjusts the CSS β Claude checks the preview again, sees an improvement β Claude checks the console, sees a type error β Claude fixes the type error β Claude confirms visually that the result matches your goal β Claude reports back that the work is done. You participate at the beginning and the end; the middle iterations are driven by Claudeβs own observation and judgment.
This autonomous iteration loop is more efficient and often produces better results. Claude can try approaches that might not work, observe that they do not work, and try something different β without you needing to catch every failed attempt. This is how good developers actually work: you try something, look at the result, adjust, look again. App preview lets Claude work the same way.
4. Setup requirements and supported project types
App preview works with any project that can run a local development server. The requirement is that your project has a dev server command β npm run dev, yarn dev, python manage.py runserver, or equivalent β that starts a local server accessible at a localhost URL. Claude Code handles starting the server, watching for the port to become available, and connecting the preview panel to that URL.
Frontend frameworks with hot reloading work best: React projects using Vite or Create React App, Next.js applications, SvelteKit projects, Vue applications using Vite, and similar setups. The combination of fast reload times and rich browser console output gives Claude the tightest possible feedback loop. Full-stack applications where the backend and frontend both need to be running are supported β Claude can start multiple processes if needed.
Static site generators like Astro, Hugo, or Jekyll with a local dev server also work well, particularly for content and layout work. The feedback loop for seeing whether markdown content renders correctly, whether a CSS change affects the right pages, or whether a new component integrates cleanly into the existing design is greatly improved when Claude can see the rendered output directly.
Pure backend applications that produce API responses rather than visual UI have less to gain from the preview feature for normal development work, but still benefit from console log and error monitoring during debugging sessions.
Check your understanding
4 questions Β· your answers are saved in this browser only
-
1. Why does the lack of app preview create a 'coding blind' problem for Claude Code?
-
2. Which of the following is NOT listed as something Claude can observe in the app preview?
-
3. What type of development framework gets the most benefit from the app preview feature?
-
4. How does app preview change the structure of a typical Claude Code development session?
Build it yourself
Follow these exact steps to reproduce it yourself
- Install Claude Code desktop β App preview is a desktop feature. Download the latest version of the Claude Code desktop app from claude.ai/download. CLI-only setups do not include the preview panel.
- Verify your project has a dev server β Run your projectβs dev server command manually first (
npm run devor equivalent) and confirm it starts successfully and is accessible in a browser at localhost. If it does not work manually, it will not work through Claude Code. - Enable hot reloading if not already active β Check whether your framework has hot module reloading configured. Vite, Next.js, SvelteKit, and most modern frameworks enable HMR by default. If your dev server requires a full restart for every change, the preview loop will be slower but still functional.
- Open your project in Claude Code desktop β Use βOpen Projectβ to navigate to your project directory. Claude Code will detect common project types and their dev server commands automatically.
- Ask Claude to start the dev server and show a preview β Say βStart the dev server and show me a preview of the app.β Claude will run the server command, wait for it to become available, and open the preview panel.
- Give a visual goal rather than a code instruction β Instead of βchange the button background color to blue,β try βmake the primary action button match the brand blue (#1D4ED8) and ensure it has enough contrast for accessibility.β Visual goals let Claude use the preview to iterate to the right result rather than making one change and waiting for your feedback.
- Let Claude iterate β Resist the urge to check the preview yourself after every change. Let Claude observe and iterate autonomously. Intervene only when Claude asks for clarification or reports that it is done.