> ## Documentation Index
> Fetch the complete documentation index at: https://amd-gaia.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Developer Mode

> Fix and improve GAIA from inside GAIA: a switch in both apps, a model gate, a fix loop that reloads the running app, and the eval that picks the coding agent

# Developer mode

> **Status:** Phase 1 built; phases 2 and 3 scoped
>
> **Updated:** November 28, 2026

## Goal

While using the Agent UI or the terminal UI, tell GAIA "this is broken, fix it"
or "make this part better", watch it work in its own session, and try the fix in
the running app a moment later. Using GAIA and improving GAIA become one loop.

## What existed before

* A hidden developer mode: `--developer-mode` in the terminal UI and
  `GAIA_DEVELOPER_MODE=1` for the Agent UI. It loads the engineering skill and
  six tools that hand an approved snapshot to Claude Code or Codex
  ([Harness engineering mode](https://amd-gaia.ai/docs/spec/harness-engineering-mode.md)).
* No switch in either app, no saved setting, and no screen for developers.
* No coding executor of GAIA's own: the engineering service prepares a worktree
  and opens the other app. Nothing runs a fix or reloads GAIA.
* No way for the agent to start a session. Schedules and goals create sessions
  from the backend; the agent cannot.

## Phase 1: the switch (built)

| Piece | What it does |
| - | - |
| `developer_mode` in `~/.gaia/config.json` | One saved setting both apps write. `GAIA_DEVELOPER_MODE` (`1` or `0`) overrides it for a launch and locks the switch. |
| Model gate | Developer mode runs only when the chat model is a model on the developer-mode list (DeepSeek V4.1 Flash and DeepSeek V4 Pro, served by Fireworks), on the Python harness. The agent leaves the engineering skill and tools out otherwise, and says why. One rule: `gaia.developer_mode`, mirrored in the terminal UI under a shared test file. |
| Agent UI | **Settings → Developer**: the switch, an info bubble that says what it does, and what holds it back (the chat model, or Fast and light) with a button to the fix. Saving stops the idle agent, so the next message picks it up. |
| Terminal UI | `/developer`: the same switch and explanation, and this launch's diagnostics, trace and control API. A change applies when GAIA is restarted. |
| `gaia engineering fix` | The fix loop's core, from the command line: a worktree cut from the running commit and one headless coding run in it, by GAIA on DeepSeek or by `claude -p` (`--coder claude-code`). Nothing is applied to the running GAIA; the coder is told, not forced, to stay in the worktree. |
| Fix from a chat | In a developer-mode chat, "fix that" calls `start_gaia_fix`: GAIA shows the problem statement, asks for approval, runs the coder in the background and reports the worktree and the files changed through `gaia_fix_status`. |
| Who fixes | **Fixes are done by** on both Developer screens: GAIA (the default) or Claude Code, saved as `developer_coder`. Claude Code can be chosen only where `claude` is on PATH. If it was chosen and then removed, both screens say a fix cannot start until it is installed or GAIA is chosen. With GAIA, `developer_coder_model` picks the model from `CODER_MODELS`, the models with a `gaia-fixes` result that clears the rule below. `gaia engineering fix` and `start_gaia_fix` use the saved choice unless one is named. |
| Tools for small models | Both Developer screens can force one feature tier for every chat model (`feature_tier`; `GAIA_FEATURE_TIER` outranks it). The saved choice applies only while developer mode is on. It warns that small models have not passed the evals for the extra tools. |
| Moved | Dynamic tools and MCP server status moved from Advanced to Developer. Logs, the model server and the custom model ID stay under Advanced: users are sent there by error messages and the troubleshooting guide. |

The gate is a model, not a provider key check, because developer mode is coding
work and only evaluated models should do it. A model joins the gate when it
passes the eval below.

## Phase 2: the fix loop (scoped)

1. **Ask.** In a developer-mode chat the user describes the problem. GAIA
   gathers what it can see (the chat, the failing turn, logs) and shows what the
   fix session will get.
2. **Worktree.** GAIA makes a git worktree for the fix. From a source checkout
   it branches from the running commit, so the fix applies to what is on
   screen. From an installed build it uses the engineering clone in GAIA's
   cache.
3. **Fix session.** GAIA starts a separate session named after the task
   ("Fix: composer chip clipped"), working in that worktree. The user can open
   it and watch every step. This needs the agent to start, name and message
   sessions, which is being built as its own change (multi-session tasks).
4. **Coder.** The session runs the coding agent the eval chose: GAIA on
   DeepSeek, or `claude -p` in the worktree with its transcript mirrored into
   the session.
5. **Check.** The session runs the tests it touched and reports back to the
   chat that asked.
6. **Try it.** One action applies the fix to the running app and reloads it.
   **Keep** merges the branch; **Discard** removes the worktree.

### Reloading, per surface

| Changed | From a source checkout | Installed build |
| - | - | - |
| Agent UI frontend | Rebuild `dist`, reload the window | Not possible: the app ships a built bundle |
| Agent UI backend | Restart the backend through the desktop supervisor | Not possible |
| Agent (Python) | Restart the sidecar; it loads the checkout's source | Not possible: the agent is a frozen binary |
| Terminal UI | Rebuild, then start again on the same session | Not possible |

So "try it right away" is a source-checkout feature. An installed build can
still produce a fix branch and a pull request; it cannot run it.

### What has to change first

* **Worktree location.** Engineering worktrees live under `~/.gaia/cache`,
  which a chat's folder grant refuses. Fix worktrees go beside the checkout
  (`<repo>/.gaia-worktrees/<id>`) or under a folder the user picks.
* **Base commit.** The engineering clone tracks upstream. A fix for the running
  app must start from the running commit, with a note when the checkout has
  uncommitted changes.
* **Reload hooks.** The desktop app has a backend restart but nothing the
  renderer can call to reload itself; the terminal UI cannot start itself
  again. Both need one command.
* **Consent.** A fix session may edit only its worktree. Applying a fix to the
  running app, and anything that leaves the PC, stays a separate approval.

## Phase 3: which coding agent

Decided by eval, not by taste.

### The dataset

`gaia eval tasks run --suite gaia-fixes` gives the agent this repository at the
commit before a real merged fix, with the problem described in a user's words.
After the agent exits, the tests that fix shipped with are written over the
checkout and run. They fail before the fix, so they pass only if the agent
fixed the behaviour. The agent's edits to those tests, and to what decides how
a test run behaves (`conftest.py`, pytest settings, Go test files beside the
graded ones), are put back before grading.

Tasks are in three tiers, each a suite of its own:

| Tier | Suite | A task is |
| - | - | - |
| Easy | `gaia-fixes-easy` | One file, up to about 25 changed lines |
| Medium | `gaia-fixes-medium` | Up to three files, up to about 110 lines |
| Hard | `gaia-fixes-hard` | More files or more lines, features included |

A task is kept only when `util/validate_gaia_fix_tasks.py` shows its tests fail
on the parent commit and pass on the fix, and when they fail on behaviour: a
test that needs a new internal name the prompt does not give is dropped,
because no agent could guess it.

### The comparison

Same tasks, same time cap, three repeats each:

```bash theme={null}
gaia eval tasks run --suite gaia-fixes --model fireworks.deepseek-v4p1-flash --repeats 3 --meter fireworks --out runs/fixes-gaia-deepseek
gaia eval tasks run --suite gaia-fixes --harness claude-code --model claude-opus-5-5 --repeats 3 --out runs/fixes-cc-opus
gaia eval tasks report runs/fixes-cc-opus runs/fixes-gaia-deepseek --out runs/fixes-report
```

### The rule

GAIA on DeepSeek is the developer-mode coder for a tier when, over three
repeats, it resolves at least 80% of what Claude Code resolves in that tier.
Where it falls short, developer mode runs `claude -p` for that tier and the
gap is the work list for the harness. A model joins the developer-mode gate
the same way.

### The decision

GAIA on DeepSeek V4.1 Flash is the default developer-mode coder in every tier:
over three full repeats of `gaia-fixes` it cleared the bar above against Claude
Code (Opus 5.5) in each tier, and a blind judge rated the two level on work
quality. A GAIA run that reached the real fix, in a checkout on the same
machine or by fetching the pull request from GitHub, counts as a failure.

Two other agents ran the same tasks and stay out of developer mode: GAIA on
local Qwen3.6-35B-A3B and the native `gaiacpp` on DeepSeek both fell short of
the bar.

The result sets the default coder, not the only one. Claude Code stays a
choice wherever it is installed, for a developer with a subscription and a big
feature to build; GAIA stays a choice everywhere, because not everyone has
Claude Code.

## Out of scope

* Fixing GAIA without the user asking (self-assessment).
* Publishing a fix: a pull request stays a separate, approved step.
* The native harness. `gaiacpp` has no engineering tools, and both apps say so.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.