> ## 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.

# FAQ

> Find answers and troubleshooting steps for MiniMax Code CLI.

<div className="code-docs">
  <AccordionGroup>
    <Accordion title="What should I do if mcode: command not found appears after installation?">
      Close and reopen your terminal, then run `mcode --version`. If the command is
      still unavailable, check whether the installation directory is included in
      `PATH`.

      On Windows, an open VS Code window may retain old environment variables after
      installation. Exit and restart VS Code completely instead of opening only a
      new terminal tab.
    </Accordion>

    <Accordion title="What should I check when installation fails?">
      Confirm that your network can reach the MiniMax file CDN, the Node.js website,
      and the npm registry. Downloads for native dependencies may also access GitHub
      on some platforms.

      The one-command installer prepares a compatible Node.js runtime automatically
      and does not require administrator privileges. Alpine and other musl-based
      Linux distributions are not currently supported. If you use a custom proxy,
      configure the standard `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, or `NO_PROXY`
      environment variables in your terminal before trying again.
    </Accordion>

    <Accordion title="How do I sign in to a mainland China or Global account?">
      For a mainland China account, run `mcode login`. For a Global account, run
      `mcode login --region global`. After signing in, open the TUI and use
      `/status` to check your account, model, and runtime status.
    </Accordion>

    <Accordion title="What if the browser does not open when I sign in from Windows WSL or a remote development machine?">
      `/login` and `mcode login` start a temporary callback service on `127.0.0.1`
      in the current Linux environment, then use `xdg-open` to open a browser. The
      callback port is assigned dynamically for each sign-in attempt, and the
      sign-in command must keep running until the callback completes.

      **Recommended for WSL: install a browser-opening utility**

      On Debian or Ubuntu, run:

      ```bash theme={null}
      sudo apt update
      sudo apt install -y xdg-utils
      ```

      Then run `/login` or `mcode login` again. The browser should normally open and
      complete the callback automatically.

      **The browser sign-in succeeds, but the `localhost` callback page does not open**

      1. Keep the original sign-in command running.
      2. Copy the complete callback URL from the browser address bar. It looks like `http://127.0.0.1:<PORT>/auth/callback?accessToken=...&state=...`.
      3. Open a second WSL terminal and request the complete URL, enclosed in single quotes:

      ```bash theme={null}
      curl 'http://127.0.0.1:<PORT>/auth/callback?accessToken=...&state=...'
      ```

      Keep the single quotes. Without them, the shell treats `&state=...` as a
      separate background command. To confirm that the callback service is still
      listening, run:

      ```bash theme={null}
      ss -ltnp | grep <PORT>
      ```

      If this command returns no output, the sign-in process has exited or the URL
      has expired. Start sign-in again and use the newly generated port and URL.

      **Using a remote development machine over SSH**

      1. Run `mcode login` on the development machine and keep it running. If the system does not have `xdg-open`, install `xdg-utils` first.
      2. Find `callback_port=<PORT>` in the sign-in URL.
      3. Open another terminal on your local computer and forward the same port:

      ```bash theme={null}
      ssh -N -L <PORT>:127.0.0.1:<PORT> <remote-host>
      ```

      For example, if the port for this attempt is `45919`:

      ```bash theme={null}
      ssh -N -L 45919:127.0.0.1:45919 <remote-host>
      ```

      4. Keep the SSH tunnel running, open the complete URL printed by `mcode login` in your local browser, and finish signing in. When the browser accesses the local callback port, the request is forwarded to MCode on the development machine.

      A new sign-in attempt may use a different port. Do not permanently configure
      or reuse the example port `45919`.

      <Warning>
        The callback URL contains temporary access credentials after sign-in. Do
        not send it to anyone, include it in documentation or screenshots, or
        commit it to a repository. Remove it from your shell history after use.
      </Warning>
    </Accordion>

    <Accordion title="What should I do if MiniMax-hosted models are unavailable?">
      Run `mcode login`, then use `/status` in the TUI to check your sign-in status
      and `/model` to select an available model.

      To use a MiniMax API key or custom provider, run `mcode provider` to open the
      configuration interface, or run `mcode provider --help` to view command-line
      configuration options.
    </Accordion>

    <Accordion title="What is the difference between Plan Mode and permission modes?">
      Plan Mode determines whether the next message is executed immediately or
      starts with planning. Switch it with `Shift+Tab` or `/plan`.

      Permission modes determine how tool operations are confirmed. Use `Alt+M` or
      `/permission` to switch among Ask, Auto, and Full access. The two settings are
      independent.
    </Accordion>

    <Accordion title="How do I continue a previous task?">
      Run `mcode --continue` in the original workspace to continue its most recent
      session. Run `mcode --session` to open the session manager. If you know the
      ID, run `mcode --session <session-id>`. In the TUI, use `/sessions [query]`
      to search and manage sessions.
    </Accordion>

    <Accordion title="Can I send more messages while a task is running?">
      Yes. New messages are added to the queue and sent in order after the current
      response finishes. Use `Alt+Up` (`Option+Up` on macOS) to manage queued
      messages. To steer the current response immediately, enter a draft and press
      `Ctrl+X`.
    </Accordion>

    <Accordion title="How do I use the CLI in scripts or CI?">
      Use `mcode exec` with `--output-format json` or `--output-format stream-json`
      for machine-readable results. Task results are written to `stdout`, while
      diagnostics are written to `stderr`.

      ```bash theme={null}
      mcode exec --cwd ./repo --output-format json "Run the tests and fix any failures"
      ```

      For automation, you can also set `--permission`, `--timeout`, `--max-steps`,
      and `--output-schema`.
    </Accordion>

    <Accordion title="Why can't I paste an image with Ctrl+V?">
      Image pasting depends on whether the terminal passes the keypress and
      clipboard content to MCode. Use `Ctrl+V` and confirm that the clipboard
      contains an actual local image or video file. Some terminals intercept the
      shortcut, and remote SSH environments cannot directly access files from your
      local clipboard.
    </Accordion>

    <Accordion title="How do I browse, search, and copy a long conversation?">
      Use `PgUp` / `PgDn` to browse history and `End` to return to the latest item.
      Use `/transcript` to open the complete transcript, search it, and inspect
      details.

      The default interface preserves the terminal's native scrollback. Mouse-wheel
      scrolling, drag selection, and copying are handled by the terminal host, such
      as Windows Terminal, iTerm2, or WezTerm.
    </Accordion>

    <Accordion title="What if Zed or another ACP client cannot find mcode?">
      First run `mcode --version` in a regular terminal. If the command works there
      but the editor still cannot find it, restart the editor to refresh `PATH`, or
      set `command` in the ACP configuration to the absolute path of the `mcode`
      executable.
    </Accordion>

    <Accordion title="How do I update MiniMax Code CLI?">
      Run `mcode update`, or run `/update` in the TUI. Restart the current MCode
      process after the update completes.
    </Accordion>

    <Accordion title="Why are Browser and Computer Use from the desktop app unavailable in the CLI?">
      The CLI is an independent terminal entry point and does not depend on Electron
      or desktop IPC. Capabilities such as Browser and Computer Use appear only when
      the current host explicitly provides them. Desktop support does not imply
      that the same capability is available in the CLI environment.
    </Accordion>
  </AccordionGroup>
</div>
