A failing command
Run a command without signing in:mutagent login and mutagent auth login are the same command.
The same command with --json:
The JSON error object
With--json, a failed command prints one JSON object on stdout. Every one has these fields:
Sign-in, workspace and access errors also carry
remediation: the commands that fix each case.
Another example, a workspace name that does not exist:
Exit codes
Every command uses the same four exit codes. Under--json, success is true exactly when the
exit code is 0.
mutagent on its own, or a command group on its own such as mutagent env, prints its help and
exits 0.
Commands that run something in a cloud sandbox pass its exit status through instead:
mutagent helix runs, helix doctor and helix smoke exit with Helix’s own exit status. See
Run a task.
Delete commands need —force
A command that deletes something never asks “are you sure?”. It refuses unless you pass--force
(or -f), and it deletes nothing:
CONFIRMATION_REQUIRED. Run it again with --force once
you are sure:
--json, the error’s _agentGuidance.escalate tells a coding agent
to confirm with you before it runs the command again with --force.
The rule holds in every mode: in a terminal, with --json, and with --non-interactive. It covers
every command that deletes, removes or stops something, including env delete, env unset,
env set --replace, providers delete, sandbox delete, helix session signal, agent retire,
reports retract, integrations sources remove, and the gateway’s disconnect, repos unlink,
triggers delete, routines delete and runs cancel.
The gateway, reports and integrations commands also accept --yes in place of --force.
List and delete commands have one name each, with a short alias: list also answers to ls, and
delete to rm.
Common errors
AUTH_REQUIRED (exit 3)
AUTH_REQUIRED (exit 3)
You are not signed in on this machine and
MUTAGENT_API_KEY is not set. Run mutagent login.
In CI, set MUTAGENT_API_KEY to an API key. See API keys.AUTH_EXPIRED, INVALID_API_KEY or FOREIGN_API_KEY (exit 2)
AUTH_EXPIRED, INVALID_API_KEY or FOREIGN_API_KEY (exit 2)
Your saved key expired or was revoked, or the key you passed is not a Mutagent key. Mutagent
keys start with
mg_live_. Run mutagent login again, or set a valid MUTAGENT_API_KEY.WORKSPACE_REQUIRED (exit 3)
WORKSPACE_REQUIRED (exit 3)
The command works in a workspace and none is selected. Run
mutagent workspaces list, then
mutagent workspaces use <name>, or pass --workspace <name> for one command. With a
MUTAGENT_API_KEY you did not save with mutagent login, set MUTAGENT_WORKSPACE_ID instead.WORKSPACE_FROM_ENV (exit 1)
WORKSPACE_FROM_ENV (exit 1)
You ran
mutagent workspaces use with MUTAGENT_API_KEY set to a key you did not save with
mutagent login. Such a key has no saved workspace. Pass --workspace <name-or-id>, set
MUTAGENT_WORKSPACE_ID, or run mutagent login --json once to save the key.INTERACTIVE_REQUIRED (exit 1)
INTERACTIVE_REQUIRED (exit 1)
mutagent login --json had no way to sign in: no MUTAGENT_API_KEY, no --browser, and no
terminal to ask in. Run mutagent login --browser --json and show the printed URL to a person, or
set MUTAGENT_API_KEY and run mutagent login --json. See Sign in.TENANCY_DENIED (exit 1)
TENANCY_DENIED (exit 1)
The workspace you named is not one of your workspaces in this organization. Check the name with
mutagent workspaces list.ORG_MISMATCH (exit 1)
ORG_MISMATCH (exit 1)
You passed
--org and your key belongs to another organization. Nothing was sent. To work in
that organization, sign in to it: mutagent login --org <slug>.CLOUD_NOT_ENABLED (exit 1)
CLOUD_NOT_ENABLED (exit 1)
Cloud sandboxes are in early access and not enabled for your account yet. Nothing was started.
See Helix Cloud.