Code Mode is LumaBrowser's coding agent. Point it at a project folder and it reads the code, edits files, runs your commands and splits big jobs across parallel sub-agents, on whatever model you run. The same agent works in your terminal and your IDE. And describe a LumaBrowser extension in plain English, and it writes the files, checks them, and installs the extension without a restart.
Start a Code chat, choose Work on a project folder, pick the folder and say what you want. The agent starts with an overview of the project, answers questions in chat, and only touches files when the task needs it.
project_overview, read_file, grep, find, list_dir, edit_file, write_file, run_command and check_process, all kept inside the folder you chose. A file is read before it is changed.
run_command runs in your shell and streams its output into the chat. Long-running servers detach and report back when they exit. Commands and edits go through the approval gate, and an optional safety check can refuse a risky command before it spawns.
For a big change, dispatch_batch hands explore and edit tasks to sub-agents that run at the same time, each on its own files, and returns one digest the main agent reviews before it carries on.
A request with several steps gets a plan first. It sits above the reply box, shows the step being worked on, and ticks each one off.
The Code surface of the AI tab opens the folder the agent is working in: a file tree, tabbed Monaco editors, a diff view, and save, create, rename and delete, so you can read and fix along with it.
Your main chat can hand a coding job to Code with delegate_task. It runs as a sub-conversation nested under the chat, so you stay where you are.
The agent runs inside LumaBrowser, with its model, tools and approvals, but you can drive it from where you already work.
Run luma in a folder for a full-screen session styled like the desktop chat, luma "fix the failing test" to start with an instruction, or luma reviewer to work as one of your named agents. It asks inline before it edits a file or runs a command.
Plugins for VS Code and the JetBrains IDEs put the same conversation in a tool window, with your open editor as context. In the commit dialog, the plugin drafts a commit message from the diff in the style of your recent commits.
luma acp serves Code, or any of your agents, to editors that host ACP agents: JetBrains Air and Zed. Tool calls show as the editor's own cards with diffs, and changes ask for permission there. Air can be connected for you from Settings > Editors & agents > Coding agents.
For extensions, Code Mode is a build agent, not a snippet generator. You describe the outcome; it plans the files, writes them one at a time with validation, fixes its own mistakes, then installs the result live. Here is the full loop.
Start a Code chat, choose Build a new LumaBrowser extension, then describe what you want in plain English.
The agent outlines the files it needs, manifest.js, main.js, and any optional UI or REST routes the feature calls for.
It writes each file while a build panel shows a live validation status dot per file: writing → valid, or flagged when a file has problems.
Generated code is syntax-checked as it is written. The agent fixes any errors it finds before moving on to the next file.
Once the files are clean, the agent installs and activates the extension live. No app restart and no manual file copying.
The extension is registered like any other. Its routes, tools, and panels are available the moment the build finishes.
Code Mode produces real LumaBrowser extensions, so it can target the same capabilities you would reach for by hand, all hot-loaded into the running browser. For the complete extension API and what each surface can do, see the Extensions guide.
Express routes mounted under the extension's prefix, callable from your own scripts, CI, or other tools.
Tools registered with the MCP aggregator so AI agents can call your extension directly.
New modes that show up in the chat mode picker alongside the built-in ones.
HTML panels and settings pages injected into the browser UI for configuration and interaction.
Namespaced handlers bridging the main and renderer processes for panel-driven actions.
Every surface above is wired up at install time and live immediately; the browser never restarts.
Under the hood, an extension build works through a small, focused set of tools against a sandboxed per-build workspace. You do not call these yourself, the agent does, but they explain exactly how a build comes together and gets cleaned up.
| Tool | What it does |
|---|---|
write_extension_file |
Create or overwrite a file in the workspace, validating its syntax as it is written. |
read_extension_file |
Read back a file the agent has already written so it can review or revise it. |
list_extension_files |
List the files currently in the build workspace to track progress against the plan. |
install_extension |
Validate the full set of files, then install and activate the extension live. |
discard_build |
Abandon the build and clean up the workspace, leaving nothing behind. |
Each build runs in its own sandboxed workspace, so a build in progress never touches your installed extensions until install_extension succeeds. If a build goes sideways, discard_build removes the workspace cleanly.
Built extensions are real files, not a black box. What Code Mode installs is a normal user extension on disk, identical in every way to one you wrote by hand. You can open it, edit it, and version it like any other code.
From the Extensions panel you can keep it, disable it, or permanently delete it whenever you like. First-party bundled extensions can only be disabled; but the ones you build with Code Mode are yours, so deleting is always an option.
Code Mode is built into LumaBrowser, free to download and run locally. Point it at a project, drive it from the app, your terminal or your IDE, or describe an extension and let it plan, write, validate, and install it live, then keep and edit the result like any other code you own.