Build console
The build console is the strip under the preview that reports every compile. Reach for it when the preview did not change, or when it changed and something is red.
Quick start
buildType that in the terminal. The console reads Build ready when the compile passed, or Build failed with the error under it. Press Fix in terminal and the error is prefilled as a prompt for the agent.
How it works
Nothing compiles on a server
The compiler is esbuild built to WebAssembly, running in a web worker in the page. It handles TypeScript, JSX and TSX, CSS and CSS modules on its own, so a project written in React or TypeScript builds with no toolchain of yours. The edit to preview loop never leaves your machine.
When a build runs
Every write from the terminal compiles on its own after a short wait: 150 ms after a lone write, 500 ms after a burst. A second write landing inside the open wait makes it a burst. build skips the wait, and Save & rebuild in the Code tab compiles at once.
What the console says
| Line | What it means |
|---|---|
| Build ready | The compile passed and the preview reloaded |
| Build failed | The compile stopped, and the Build error panel holds the diagnostic |
| Built, but the browser refused to install it | The build compiled and the emulated browser rejected the manifest |
| Built, but a page failed to start | A surface threw before it was ready |
| Built, but the background script hit an error | The service worker threw |
Fix in terminal, Fix in chat
A failed build offers one button. In terminal mode it reads Fix in terminal and prefills the prompt line with the error. In chat mode it reads Fix in chat and fills the prompt box. Nothing is sent until you press Enter, so you can add a sentence first.
The prefilled prompt reads:
Building the extension failed with this error. Please fix it:
<the build error>Measuring a cycle
loop-trace prints the timing of the last edit-to-paint cycle, one line per span, and a total that is the cycle's own clock:
cycle cycle-00 trigger=agent build=build-00
debounce-wait 500ms
compile:total 40ms
remount-to-ready 300ms
total 845ms--last N prints the last N cycles and --json prints them raw. Typed in the terminal, loop-trace goes to the agent as a prompt, and the agent runs it for you.
Reference
| Limit | Value |
|---|---|
| Wait after a lone write | 150 ms |
| Wait after a burst of writes | 500 ms |
Cycles loop-trace keeps | 50 |
| Command | What it does |
|---|---|
build | Compiles the workspace now and prints the diagnostics |
loop-trace [--last N] [--json] | Prints the timing of the last cycle, span by span |
When it fails
- Build failed names a file the manifest points at. The agent wrote the manifest before the file. Wait for the next write, or run
buildonce the file exists. - Built, but the browser refused to install it. The manifest is valid JSON and still wrong for the browser. The line under it carries the browser's reason. Hand it to the agent with Fix in terminal.
- The repairs did not land. Restore the last known good checkpoint from the header, then describe the change again in smaller steps.
loop-tracesays there is no cycle. Nothing has been written since the page loaded. Make an edit or runbuild, then read it again.
Next
- Terminal for
buildand the rest of the commands - Live preview for what a passing build reloads
- Checkpoints for the restore point a build stamps