Installation and environment
Why does the shell say mcode: command not found?
Why does the shell say mcode: command not found?
mcode --version. If the command is still missing, check that the global npm or installer directory is in PATH. On Windows, an already-open VS Code process may retain an old environment; fully restart VS Code.Which Node.js versions are supported?
Which Node.js versions are supported?
22.19.0 or later in the 22.x line, or Node.js 24, 25, or 26. The official installer prepares a compatible runtime when needed. Alpine and other musl-based Linux distributions are not currently supported by the installer.What should I check when installation fails?
What should I check when installation fails?
HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, or NO_PROXY before retrying.How do I update or uninstall the CLI?
How do I update or uninstall the CLI?
mcode update and restart the current MCode process after it completes. For an npm installation, run npm uninstall -g @minimax-ai/code. For an installer installation, use the installer or uninstall method for that installation.Sign-in and authentication
How do I sign in to a mainland China or Global account?
How do I sign in to a mainland China or Global account?
mcode login. For a Global account, run mcode login --region global. After sign-in, use /status in the TUI to check account, model, and runtime status. You can also run mcode acp login --region <region> under the ACP command.What if the browser cannot open in WSL or on a remote host?
What if the browser cannot open in WSL or on a remote host?
xdg-open. On Debian or Ubuntu, install the browser opener first:mcode login process running until browser sign-in finishes. For an SSH remote host, forward the callback port printed by the login command:The browser login finished, but the localhost callback page does not load
The browser login finished, but the localhost callback page does not load
& parameters into background commands. Check the callback listener with ss -ltnp | grep <port>.A callback URL can contain a temporary credential. Do not share, screenshot, or commit it.Data directory, configuration, and proxy
Where does the CLI store configuration and sessions?
Where does the CLI store configuration and sessions?
~/.minimax, and the configuration file is <data-dir>/config.yaml. The directory also stores sessions, logs, plugins, skills, and other runtime data. Set MINIMAX_DATA_DIR to choose another directory; MAVIS_DATA_DIR is a compatibility fallback, and MINIMAX_DATA_DIR wins when both are set.How do I set a default model and permission mode?
How do I set a default model and permission mode?
config.yaml:defaultModel uses provider/model and can include #variant. mcode exec --model overrides only the current run. permissionMode accepts default, auto, bypassPermissions, or off.Which proxy variables does the CLI support?
Which proxy variables does the CLI support?
HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, NO_PROXY, and lowercase variants. It always bypasses localhost, 127.0.0.1, and ::1 so login callbacks and local services remain reachable.Providers and API keys
How do I use a MiniMax API key?
How do I use a MiniMax API key?
mcode provider set-minimax-key:MCODE_PROVIDER_API_KEY; use --api-key-env <name> for another variable. The CLI reads the key but does not print it.How do I add an OpenAI- or Anthropic-compatible provider?
How do I add an OpenAI- or Anthropic-compatible provider?
mcode provider add with at least one model:anthropic-messages, openai-completions, and openai-responses. Use mcode provider list, mcode provider test <provider-id>, and mcode provider remove <provider-id> --yes to manage the provider.Headless and CI
How do I run one task from a script?
How do I run one task from a script?
mcode exec; it does not launch the TUI:--input -:Which mcode exec options are available?
Which mcode exec options are available?
--cwd <path>: workspace directory;--file <path>: repeatable attachments, up to 10 files and 100 MB total;--model <provider/model[#variant]>: override the model for this run;--effort <level>: override reasoning effort for this run using a supported level;--session <id>or--continue: continue an existing session;--config <path>: use an explicit Runtime configuration;--permission smart|full|off: Headless permission policy, defaultsmart;--timeout <duration>: timeout such as30sor2m;--max-steps <count>: maximum Assistant steps;--output-format text|json|stream-json: output format;--output-schema <schema>: inline or file JSON Schema;-o, --output-last-message <path>: write the final message after success.
--input - cannot be combined with a positional prompt. Headless rejects --permission ask because it has no interactive host.How should automation parse output?
How should automation parse output?
text prints the final answer, json prints one stable ExecResult, and stream-json prints newline-delimited events. Results go to stdout; diagnostics go to stderr. Check the JSON status first and treat model and usage as optional.With --output-schema, the final answer must be JSON matching the schema. Parsing or validation failures return status: failed with STRUCTURED_OUTPUT_INVALID. --output-last-message writes atomically only after a successful run and Runtime shutdown.What are the mcode exec exit codes?
What are the mcode exec exit codes?
status:ACP and plugins
Why does an ACP client receive malformed responses?
Why does an ACP client receive malformed responses?
mcode acp reserves stdin/stdout for ACP protocol messages; logs and diagnostics go to stderr. Do not write natural language directly to the ACP process or mix wrapper logs into stdout. If the editor cannot find mcode, configure the absolute executable path and restart the editor.What should I do when a plugin install or refresh fails?
What should I do when a plugin install or refresh fails?
mcode plugin marketplace list and mcode plugin list --available first. Specify <plugin>@official or <plugin>@local when names collide. Refresh marketplace snapshots with mcode plugin marketplace upgrade; the local source is the plugins directory under the data directory.Sessions, terminals, and desktop boundaries
How do I continue a previous task?
How do I continue a previous task?
mcode --continue in the original workspace, or use mcode --session to open the session manager. In the TUI, use /sessions [query]. For long conversations, use /compact; export with /export [path.md] or inspect the full history with /transcript.What is the difference between Plan Mode and permission mode?
What is the difference between Plan Mode and permission mode?
Shift+Tab or /plan). Permission mode controls how tool actions are approved (Alt+M or /permission). They are independent settings.Why are Browser or Computer Use features missing from the CLI?
Why are Browser or Computer Use features missing from the CLI?
Why does Ctrl+V not paste an image?
Why does Ctrl+V not paste an image?
@ for a workspace file or mcode exec --file <path> for an attachment.