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

# Diagnostic codes

> The diagnostic codes extensions report during validation, preview, and runtime, what each one means and how to fix it, and the notices users may see in the UI.

For the release status of each capability, see [Capabilities and progress](https://agent.minimax.io/docs/extension/progress.md).

This page lists every extension diagnostic code in three groups, "Package and validation", "Preview", and "Runtime", with what each means and how to fix it. The last section lists the notices users may see in the UI. For how to read diagnostics and troubleshoot by symptom, see [Test and troubleshoot](https://agent.minimax.io/docs/extension/testing.md#inspect).

## Diagnostic shape

A diagnostic from validation is:

```ts theme={null}
{ code, file, line, column, message, fix, level }
```

| Field | Meaning |
| - | - |
| `code` | A diagnostic code from the tables below |
| `file`, `line`, `column` | The source location of the problem. May be absent |
| `message` | What's wrong. It may include specifics, such as the offending import or the esbuild error |
| `fix` | The change to make |
| `level` | `'error'` or `'warning'`. `EXTENSION_PACKAGE_SKIPPED`, `EXTENSION_SHADOWING`, `COMMAND_RETIRED`, `COMMAND_ANSWER_INVALID`, and `COMMAND_TEXT_TRUNCATED` are `'warning'` |

Runtime diagnostics in `inspect.runtime.diagnostics` are `{ at, code, message, fix?, slot?, key? }`. They have no source location and no `level`. `slot` and `key` identify the site, and `at` is the time (Unix ms). In tests, `site.diagnostics` entries are `{ code, message, fix?, plugin? }`.

The fix loop: **make the change in `fix`, then run the same action again** (`test`, `preview`, and so on).

> [!NOTE]
>
> `EXTENSION_PACKAGE_SKIPPED`, `EXTENSION_SHADOWING`, `COMMAND_RETIRED`, `COMMAND_ANSWER_INVALID`, and `COMMAND_TEXT_TRUNCATED` are warnings and don't block preview or the current action. Every other diagnostic code blocks the current action.

## Package and validation

Returned by `init`, `test`, and `preview`, and also shown in `inspect.source.diagnostics`. Static checks find all of these before any extension code runs.

| Diagnostic code | Meaning | How to fix |
| - | - | - |
| `HOOK_MODULES_INVALID` | `modules` in `hooks/hooks.json` is missing, lists more than one path, has an invalid suffix, or points to a missing file | Set `modules` to one relative path with one of the suffixes `.js .mjs .cjs .jsx .ts .mts .cts .tsx`, and make sure the file exists. An extension package should use `{ "modules": ["./register.tsx"] }` |
| `HOOK_MODULE_EXPORT_INVALID` | The module doesn't export a `register` function | Export `register` from the module, for example `export const register: Register = (on) => { … }` |
| `HOOK_MODULES_UNSUPPORTED_FORMAT` | A `.codex-plugin` package declares `modules` | Remove `modules` from the `.codex-plugin` package, or use the `.minimax-plugin` format |
| `MODS_NOT_SUPPORTED_YET` | Extensions aren't loaded from compatibility-format plugin packages at this stage | Use the `.minimax-plugin` format and rewrite the module the extension way |
| `EXTENSION_PACKAGE_INVALID` | Package validation failed: the manifest, or a `*.mcp.json`, Skill, or Agent it declares, is invalid | Fix `.minimax-plugin/plugin.json` or the files it declares, using the reader error in `message`. The manifest requires `schemaVersion: 1`, `name`, `version`, `description`, `author`, `icon`, `category`, `exampleQueries`, `apps`, `mcpServers`, `skills` |
| `EXTENSION_NAME_MISMATCH` | The manifest `name` doesn't match `pluginId` | Set `name` in `.minimax-plugin/plugin.json` to `pluginId`, or call `preview` with the name in the manifest |
| `EXTENSION_PACKAGE_SKIPPED` (warning) | One declaration in the package was skipped. The rest loads normally | Fix the corresponding file using the code in `message`. If you don't need it, remove the declaration from the manifest |
| `EXTENSION_EVENT_UNSUPPORTED` | The event isn't `ui.render`, `command.run`, or an observe event | Use `on('ui.render', { site: 'above-prompt' }, hook)` for the status band, `on('ui.render', { site: 'pane', id: '<literal>' }, hook)` for a panel, `on('ui.render', { site: 'backdrop' }, hook)` for the backdrop, and `on('ui.render', { site: 'above-prompt-list' }, hook)` Coming soon to arrange the status band's rows. Use `on('command.run', { command: '<literal>' }, hook)` for a slash command. The observe events are `session.start`, `turn.start`, `turn.complete`, `tool.call`, `tool.result`, `session.measure`, and `ui.close` |
| `EXTENSION_MATCHER_INVALID` | The matcher isn't an object literal whose values are all string literals, it names a site or field that doesn't exist, or a `command.run` matcher names a command this module doesn't register | Make the second argument of `on()` an object literal with string literal values, such as `{ site: 'above-prompt' }`, `{ site: 'above-prompt-list' }` Coming soon, `{ site: 'pane', id: 'board' }`, or `{ command: 'todo' }`. In a `command.run` matcher, use the command name this module passes to `ctx.command.register` |
| `EXTENSION_DUPLICATE_ENTRY` | Two `ui.render` hooks use the same site or the same panel `id` | Register only one `ui.render` for the status band (put everything in one `Box`), only one for `above-prompt-list` Coming soon, and only one per panel `id` |
| `EXTENSION_REGISTER_SHAPE_INVALID` | `on()` isn't at the top level of the `register` body, or the hook passed to `on()` is neither an inline function nor a function declared at the top level of this module | Move `on()` to the top level of `register`: not inside conditions, loops, or callbacks, and not after any `await`. Write the hook inline in `on()`, or reference a function declared at module top level |
| `EXTENSION_CALL_SHAPE_INVALID` | A `ctx` call isn't written in full, the server name in `ctx.mcp.call` isn't a literal, or `ctx.command.register` gets something other than a plain object literal or a `name` that isn't a literal | Use the full `ctx.<domain>.<method>(…)` form. Don't destructure, alias, or pass `ctx` to other functions. Make the first argument of `ctx.mcp.call` a string literal. Pass `ctx.command.register` an object literal with only `name`, `description`, and `argumentHint`, with `name` as a string literal, and no spreads, computed keys, getters, setters, or methods |
| `EXTENSION_COMMAND_NAME_INVALID` | The command name in `ctx.command.register` breaks the naming rules, or is the name of a built-in command | Use 1 to 64 letters, digits, `_`, or `-`, and avoid built-in command names such as `compact` and `goal` (full list in the [Extensions reference](https://agent.minimax.io/docs/extension/reference.md#limits)). Rename the `command.run` matcher too |
| `EXTENSION_STATE_SHAPE_INVALID` | The `defineState` argument isn't a literal | Use literals for both the keys and the defaults of `defineState`, and put it at module top level |
| `EXTENSION_IMPORT_FORBIDDEN` | An import points outside the package or to a module that isn't allowed; a file-header JSX pragma conflicts with the host settings; or there's a value import from a path that doesn't count as package contents (`.minimax-plugin/types/`, the root `tsconfig.json`, `dist/`, `node_modules/`) | Import only `@minimax/mcode-plugin-extension`, `/ui`, `/jsx-runtime`, `/jsx-dev-runtime` (tests can also import `/testing`), and relative paths inside the package. Remove bare module names, `node:`, `data:`, and absolute paths. Delete file-header `@jsx`, `@jsxImportSource`, and `@jsxRuntime` comments. Use `import type` for files in the excluded paths, or move the files out of them |
| `EXTENSION_COMPILE_FAILED` | esbuild compilation failed | Fix the source using the esbuild error in `message` |
| `EXTENSION_RENDER_SIDE_EFFECT` | `ctx.state.set` or `ctx.state.update` is statically visible in the draw function | Move `ctx.state.set` / `ctx.state.update` into an interaction callback, a `ctx.clock` callback, or an observe event |
| `EXTENSION_SHADOWING` (warning) | A site hook never references `next`, so it hides every layer after it on that site | Put `await next()` in what you draw (or `return next()` to add nothing) to keep other plugins' layers. If you really mean to hide them, you can ignore this warning. Coming soon Once the status band is drawn in two steps, `above-prompt` draws only your plugin's own row and no longer warns without `next`; `above-prompt-list`, `pane`, and `backdrop` still need `next` |

## Preview

Returned by `preview` and `withdraw`.

| Diagnostic code | Meaning | How to fix |
| - | - | - |
| `EXTENSION_PREVIEW_NOT_ACTIVE` | This session has no preview of the plugin | Use `inspect` to confirm the plugin name. If the preview was already withdrawn or never took effect, you don't need `withdraw`. Disable or uninstall installed extensions in plugin management |
| `EXTENSION_NAME_RESERVED` | The preview plugin name matches an official plugin | Give the preview plugin a different name. A preview can't replace an official plugin |
| `EXTENSION_CANDIDATE_DRIFTED` | Before it took effect, the candidate version no longer matched this session's record: a newer preview or reload bound another version, `withdraw` ran, or the file snapshot changed | Run `preview` again. Don't start several previews of the same plugin at once |

## Runtime

Shown in `inspect.runtime.diagnostics` and in `site.diagnostics` in tests, or thrown as the error code of a `ctx` call.

| Diagnostic code | Meaning | How to fix |
| - | - | - |
| `EXTENSION_ENTRY_MISMATCH` | The `on()` calls actually made during loading differ from the validation record | Make the runtime `on()` event names and matchers match the validation record. Run `preview` again to refresh the record |
| `EXTENSION_REGISTER_FAILED` | `register(on)` threw during loading | Fix the error at module top level or in `register` using `message`, then `preview` again. The old version keeps running until you fix it |
| `CALL_NOT_DECLARED` | A method or server outside `calls:` was called at runtime | Call only the methods and servers listed in `calls:`. When you need a new call, change the code and `preview` again. `calls:` is regenerated from the code |
| `INVOCATION_SETTLED` | `ctx` was called after the callback finished, or at module top level | Keep the work in the callback's `await` chain. Don't use `setTimeout`, and don't leave Promises unawaited |
| `ACTIVATION_RETIRED` | A callback from a retired Activation fired, such as a timer left over from before a reload | Run `preview` again, or wait for the installed version to finish loading |
| `EXTENSION_DISABLED` | The circuit breaker disabled the plugin or hook (3 failures in a row, or the plugin hung, crashed, or failed to load) | Fix the hook that tripped the breaker and `preview` again, or ask the user to click "Retry" on the pause notice |
| `PERMISSION_REQUIRED` | The permission decision couldn't be completed | The permission check itself failed. Retry, or ask the user to add an allow rule for this server tool |
| `PERMISSION_DENIED` | A permission rule denied the call, or the user denied or closed the permission card, or stopped the turn | Don't retry automatically. Tell the user what the call needs and let them decide again |
| `CANCELLED` | The call was cancelled: the caller aborted its `signal`, or the preview was withdrawn or reloaded while waiting for permission | Nothing to change in the extension. The next call can try again |
| `AGENT_CONCURRENCY_LIMIT` | Too many sub-agents from this plugin are running in this session | Wait for a `turn.complete` with one of your own `agentId`s before starting another |
| `AGENT_UNKNOWN_TYPE` | `agentType` isn't an Agent available in this session | Leave out `agentType` (defaults to `worker`), use `explore` for read-only investigation, or use a built-in or plugin-provided Agent name |
| `AGENT_START_FAILED` | The sub-agent couldn't start | Handle it using the reason in `message`. Check that `model` is a `provider/model` this session can use, then start it again from a new Invocation |
| `ARGUMENT_INVALID` | A `ctx` call got invalid arguments | Follow the argument shapes and value limits in [Extension API](https://agent.minimax.io/docs/extension/api.md) |
| `PROMPT_READ_UNAVAILABLE` | The message box didn't respond in time (within 2 seconds) | The current session has no visible message box. Read it again from a later user action |
| `MCP_SERVER_AMBIGUOUS` | This plugin has no server with that name, and the name matches more than one server (user-configured or from other plugins) | Use the full name for another plugin's server: `'<plugin-name>/<declared-name>'` |
| `MCP_CALL_RATE_LIMITED` | `ctx.mcp.call` exceeded 60 calls per plugin per minute | Call less often: combine requests, or cache results in `ctx.state` |
| `GESTURE_QUEUE_FULL` | This plugin's button action queue in this session is full (10), so the new action was rejected; or its observe event queue is full (32), so the new observe event was dropped | Cut down rapid repeated actions, and don't keep hooks running for long. When a button action is rejected, the UI has already asked the user to try again later |
| `STATE_WRITE_IN_RENDER` | `ctx.state` was written during a draw | Move `ctx.state.set` into an interaction callback, a `ctx.clock` callback, or an observe event |
| `EXTENSION_CORE_PROPS_INVALID` | The props passed to `next(e')` don't match this site's definition | Change only the fields the site allows, and keep their types. Usually just call `next()` with no arguments |
| `VIEW_LEASE_HELD` | This site is already open in another view | Close the other view, then reopen this one |
| `EXTENSION_NEXT_TWICE` | `next` was called a second time in one hook invocation | Call `next` only once per hook. Combine multiple pieces of content into one element tree |
| `EXTENSION_ROWS_INVALID` Coming soon | An `above-prompt-list` layer passed `next(e)` rows other than the ones it received: it changed a row's content, made up a row, or passed the same row twice. That list layer is skipped | Only filter or reorder `e.props.rows`, and pass the row objects unchanged to `next({ ...e, props: { ...e.props, rows } })`. To change what a row shows, change the `above-prompt` of the plugin that draws it. See [status band row arrangement](https://agent.minimax.io/docs/extension/interface.md#above-prompt-list) |
| `COMMAND_NAME_RESERVED` | `ctx.command.register` used the name of a built-in command, or a name that belongs to a Skill at the start of the Activation: the Skill's runtime name, or the name shown in the `/` menu. The error doesn't say which Skill | Pick another command name and rename the `command.run` matcher too. If the plugin works without this command, catch the error in `session.start` |
| `COMMAND_NAME_TAKEN` | Another plugin in this session already registered the name passed to `ctx.command.register`. `message` names that plugin | Pick another command name, or catch the error in `session.start` and go without this command. The plugin that registered first holds the name until it leaves the session |
| `COMMAND_LIMIT_REACHED` | `ctx.command.register` hit a limit: 32 commands per session, or 64 `register` calls that change commands per Activation | Register each command once in `session.start` with a literal name. Don't register in a loop or on every event |
| `COMMAND_PAUSED` | The circuit breaker has paused the `command.run` hook for the command the user ran. The UI has already told the user the plugin is paused | Fix the error that caused the pause (the `thrown`, `timeout`, or `EXTENSION_HOOK_EXPIRED` diagnostic before it), then `preview` again |
| `COMMAND_RETIRED` (warning) | The user ran a command while the plugin was leaving the session or being replaced by a new version. The UI has already told the user the command is unavailable for now | If this was a reload, nothing to change: the new version registers its commands again in `session.start` |
| `COMMAND_ANSWER_INVALID` (warning) | The `command.run` hook returned something other than `{ text }` or nothing, such as an object with keys besides `text`, or a `text` that isn't a string. The UI shows nothing | Return `{ text }` with a string `text` and nothing else from the `command.run` hook, or return nothing |
| `COMMAND_TIMEOUT` | The command got no answer within 15 seconds: it was queued behind earlier button actions and commands from this plugin, or the hook was too slow. The UI has already told the user it timed out | A timeout only ends the wait. A hook that is already running runs to the end (including any permission card it is waiting on) and keeps its place in the queue until then. The hook may already have run, so a retry isn't always safe. Keep button callbacks and `command.run` hooks short, and move slow `ctx.model.complete` and `ctx.mcp.call` calls out. If the work can finish in a `ctx.clock.after` callback, answer first and do it there |
| `COMMAND_UNHANDLED` | No `command.run` hook answered the plugin command the user ran: no hook's matcher names this command | Register a handler with `on('command.run', { command: '<name>' }, (ctx, e) => ({ text }))`, using the same literal name you pass to `ctx.command.register`. Don't register a command you can't answer |
| `COMMAND_FAILED` | When the user ran the command, its `command.run` hook threw, timed out, or the process restarted. The UI has already told the user it failed | Fix the error using the hook's own diagnostic just before it (`thrown`, `timeout`, `EXTENSION_HOOK_EXPIRED`, or `EXTENSION_WORKER_CRASHED`). Catch recoverable errors in the hook and answer with `{ text }` |
| `COMMAND_TEXT_TRUNCATED` (warning) | The `command.run` hook's answer was longer than 500 characters, so the user sees only the first 500 | Answer in one short sentence. The answer shows as a toast, up to 500 characters. Put longer content in `ctx.state`, or in a panel the command opens |
| `THEME_PALETTE_REJECTED` | The theme colors as written aren't readable: before any host correction, a text anchor has a contrast ratio below 3:1 against a surface anchor in the same set. `message` names the two colors and the ratio, and, when colors are split by light and dark mode, the mode | Raise the contrast between `text-primary` and `surface-0` (or the other text and surface anchors `message` names). The correction needed is too large: after it, the palette would no longer be the one you designed, so the host doesn't fix it for you. Change the anchors yourself |
| `EXTENSION_SVG_REFUSED` | The `source` of an `<Svg>` on the backdrop failed the SVG check, so this layer's output was rejected. An `<Svg>` in the status band or a panel has only its props checked, not this. `message` reads `Svg refused: <category> (<content>)`, for example `Svg refused: external-reference (@import)` or `Svg refused: element (a)`. Other layers draw as usual. A refusal isn't a failure and doesn't pause the hook | Remove what `message` names from `source`. Reference only `#id` and `url(#id)` in the same image, don't embed bitmaps, HTML, or fonts, and write plain, well-formed markup with no escapes, no character references beyond the five named XML entities, no DOCTYPE, and no CDATA. The categories `element`, `attribute`, and `value` mean content outside standard drawing SVG. `too-many-nodes` means an image or a `marker` exceeds its node limit, or a `marker` is nested in a `marker`. `nested-use` means a `<use>` references another `<use>`. See [Backdrop](https://agent.minimax.io/docs/extension/interface.md#backdrop) for how to write it |
| `EXTENSION_HANDLE_STALE` | When a press, input, selection, or similar action arrived, the screen had already redrawn and no single matching control exists on the new screen, so the action was dropped. The host looks for the same control on the latest screen by element type, callback, and `key` chain (the `key` of the control and of each ancestor, or an ancestor's position in its parent when it has no `key`), and delivers the action only if it finds exactly one. It happens when neither the control nor its ancestors have a `key`, the control is gone, more than one control matches, or the plugin has reloaded. These drops don't count toward a pause, show no notice in the UI, and aren't recorded in `inspect`. In tests, `press` fails with this code | Add a `key` to each list row and to controls whose callback triggers a redraw (`Button`, `Input`, `Select`, `Switch`), with no duplicate `key` among siblings. Or find the element again on the latest screen and act on it. See [Key rules](https://agent.minimax.io/docs/extension/interface.md#keys) |
| `thrown` | The hook threw. `message` has the error | Fix the error using `message`, then run `test` or `preview` again |
| `timeout` | Synchronous code ran longer than 2 seconds | Remove busy loops and long synchronous computation from the hook |
| `EXTENSION_HOOK_EXPIRED` | The hook's own time exceeded 10 seconds | Fetch less data per draw, cache results in `ctx.state`, or move slow work into a callback |
| `EXTENSION_WORKER_CRASHED` | The extension process restarted (an infinite loop or memory that keeps growing) | Look for infinite loops or growing memory in the hooks |
| `toast.dropped` | More than 6 toasts a minute. Extra ones are dropped until the one-minute window rolls over. Each run of consecutive drops is recorded once | Show fewer toasts. Put state that keeps changing on the status band |
| `console.<level>` | One line of the extension's `console` output, in `inspect.runtime.console` | Not an error. Use it for debugging |

### Other codes you may see

These codes aren't in the diagnostic code list in the type declarations. The host or the test utilities report them. Every code that appears in a diagnostic carries a `fix`. `COMMAND_BUSY`, `COMMAND_UNKNOWN`, and `COMMAND_ARGS_TOO_LONG` never appear in diagnostics. They show up only as error codes from `runCommand` in tests and as UI notices. In diagnostics, `COMMAND_BUSY` is recorded as `GESTURE_QUEUE_FULL`.

| Code | Meaning | How to fix |
| - | - | - |
| `EXTENSION_RENDER_DEADLINE` | A draw hadn't finished after 30 seconds | Don't wait for slow MCP calls in the draw. Draw a placeholder first, then refresh with `ctx.ui.invalidate()` once the data arrives |
| `EXTENSION_HOOK_FAILED` | A callback threw or timed out | Fix the error using `message`, then run the tests again |
| `aborted` | The hook was aborted | `await` every `ctx` call inside the hook. Don't let them run detached from the hook |
| `EXTENSION_HANDLE_FORGED` | A callback not created by this module was returned | Return only callbacks created by this module, or what `next()` returned |
| `EXTENSION_REQUEST_INVALID` | The request was invalid, for example session info was unavailable, or the site, slot, key, or matcher fields didn't line up | Check the fields named in `message` |
| `EXTENSION_SERVICE_FAILED` | A host service rejected a `ctx` call. Storage over quota (a single `ctx.store.set` value over 256 KB, or the plugin's total storage over 8 MB), a write to an undeclared `ctx.state` key, an invalid store key, an MCP server that can't be found, and a failed MCP call all surface as this code, with the reason in `message`. If you don't catch it, `inspect` records it as `thrown` | Check the arguments of the `ctx` call named in `message` |
| `TREE_INVALID` | The element tree has an element or property this site doesn't accept (reported only in tests) | Return only elements from the catalog, with the allowed property values. The real UI replaces invalid parts with a placeholder notice |
| `console.dropped` | `console` output exceeded 200 lines per plugin per minute, and the extra lines were dropped | Log less |
| `EXTENSION_OBSERVE_FAILED` | The host couldn't read the contents of an observe event, so the event wasn't delivered | Nothing to do |
| `EXTENSION_BREAKER_RESET` | The user clicked "Retry" on the pause notice, and the pause in this session was cleared | Nothing to do |
| `THEME_PALETTE_ADJUSTED` | The theme colors took effect, with corrections: an anchor used the host default, or a text color was darkened or lightened to get as close to 4.5:1 as possible. `inspect` keeps this record | To keep your own colors, set each text color in `colors` so it reaches 4.5:1 against the surface color it sits on, then `preview`. A line saying an anchor used the host default means you didn't set that anchor |
| `COMMAND_BUSY` | The queue shared by button actions and commands is full (10), so this command didn't run and no hook was called. `runtime.diagnostics` records it as `GESTURE_QUEUE_FULL` | Make button callbacks and `command.run` hooks finish quickly. The UI has already asked the user to try again later |
| `COMMAND_UNKNOWN` | No plugin in this session registered this command name. `runCommand` in tests also reports this code for a name that isn't registered | Check that `ctx.command.register` ran successfully in `session.start` and that the name matches the one you run |
| `COMMAND_ARGS_TOO_LONG` | The command arguments are longer than 4096 characters after trimming leading and trailing whitespace. `runCommand` in tests checks this too | Shorten the arguments |

## Notices in the UI

Users may see the text below in the UI. These aren't diagnostic codes, but they help you tell what happened.

### Pause notice

When an extension is paused, the status band or panel shows a notice:

| Text | When it appears |
| - | - |
| Paused · this session | The title. The extension is paused in the current session (`EXTENSION_DISABLED`). Other sessions aren't affected |
| Failed or timed out 3 times in a row; paused in this session | A hook failed 3 times in a row |
| The plugin hung, crashed or failed to load; paused in this session | The whole plugin has a problem |
| Last error: … | The error message from the last failure |
| Retry | A button. Clicking it tries to recover |
| Retry didn't go through. Try again later | It still failed after clicking "Retry" |

When a site has several plugins, the notice shows only when every layer is paused.

### Other notices

| Text | When it appears | Related diagnostic code |
| - | - | - |
| Too many actions. Try again later | 10 button actions are already queued, so new presses are rejected | `GESTURE_QUEUE_FULL` |
| The action didn't go through. Try again | A press or similar action was rejected for another reason | Check `inspect.runtime.diagnostics` |
| Part of an extension can't be displayed | The screen has an element or property this site doesn't accept, or exceeds the element tree limits, so that part is replaced with a placeholder notice | `TREE_INVALID` in tests. After a preview, recorded in `inspect.runtime.sites`; see [SVG the window rejects](#svg-fallback) |
| Already open in another view | This site is already open in another view | `VIEW_LEASE_HELD` |
| `<plugin-name>` has nothing to show here yet | The panel is open, but no layer drew anything | None |

### Command notices

After the user runs a plugin command, the UI shows the result in a toast. Replace `todo` below with the actual command name:

| Text | When it appears | Related diagnostic code |
| - | - | - |
| Plugin commands | The heading of the plugin command group in the `/` menu | None |
| Running | Shown next to the item in the menu while the command is still running | None |
| /todo didn't respond | No `command.run` hook answered the command | `COMMAND_UNHANDLED` |
| /todo failed | The `command.run` hook threw, timed out, or the process restarted | `COMMAND_FAILED` |
| /todo timed out and may have run already | No answer within 15 seconds | `COMMAND_TIMEOUT` |
| /todo is unavailable: the plugin is paused | The circuit breaker paused the hook | `COMMAND_PAUSED` |
| /todo is unavailable: the plugin is reloading or disabled | The plugin is leaving the session or being replaced | `COMMAND_RETIRED` |
| /todo did not run: the plugin is busy, try again | The queue for button actions and commands is full | `COMMAND_BUSY` |
| The arguments of /todo are too long | The arguments are longer than 4096 characters | `COMMAND_ARGS_TOO_LONG` |
| /todo no longer exists | No plugin in this session registered this command | `COMMAND_UNKNOWN` |
| /todo didn't run: this conversation no longer exists | The runtime session is gone | `SESSION_NOT_FOUND` |
| /todo didn't run. Try again | The command didn't run for another reason | Check `inspect.runtime.diagnostics` |

When the command answers normally, the toast shows the `text` that `command.run` returned.

### SVG the window rejects

After a screen reaches the window, the window checks it again and replaces any part it can't draw with a placeholder. The reason goes in `reason` in `inspect.runtime.sites` (see [`runtime.sites`](https://agent.minimax.io/docs/extension/testing#runtime-sites)). Two of these relate to `<Svg>`: `invalid-svg` is checked on every site, and `unsafe-svg` only on the backdrop.

| `reason` | Meaning | How to fix |
| - | - | - |
| `invalid-svg` | The `<Svg>` props break the rules: an unknown prop, children, a `source` that is blank or longer than 131 072 characters, or a `width` / `height` out of range. The **whole element tree** is replaced, not just this image. Tests report `TREE_INVALID` and name the prop | Use only `source`, `alt`, `width`, and `height`. `width` and `height` are numbers greater than 0 and no more than 4096 |
| `unsafe-svg` | The `source` of an `<Svg>` on the backdrop failed the SVG check. Only this image is replaced. An `<Svg>` in the status band or a panel doesn't get this check. The runtime checks with the same rules first, so `EXTENSION_SVG_REFUSED` has usually been reported already | Fix `source` as described for `EXTENSION_SVG_REFUSED` |

`detail` names the exact prop or content.

## Next steps

> [card] [Test and troubleshoot](https://agent.minimax.io/docs/extension/testing.md#troubleshoot)
>
> Find the cause by symptom.

> [card] [Extensions reference](https://agent.minimax.io/docs/extension/reference.md)
>
> Quick reference for events, ctx methods, elements, and limits.
