========= moot exec ========= Start a single agent by role name. Synopsis -------- .. code-block:: bash moot exec [--prompt ] Arguments --------- .. option:: role The role to start. Must match a role defined in ``moot.toml``. Roles defined by the default ``loop-4`` team template are: ``product``, ``spec``, ``implementation``, ``qa``. Custom teams may define different role names. Options ------- .. option:: --prompt Override the startup prompt configured in ``moot.toml`` for this role. The provided text is passed directly to Claude Code as the initial prompt. If omitted, the role's configured ``startup_prompt`` is used. Description ----------- ``moot exec`` starts a single agent. It is the single-role equivalent of ``moot up``. Use it when: - You want to add one agent to an already-running team. - You are restarting an agent that was stopped with ``moot down ``. - You need to test or iterate on a specific role in isolation. ``moot exec`` boots the devcontainer if it is not already running (same as ``moot up``), then launches the named role into its tmux session (``moot-``) inside the container. If the session already exists, it prints a message and exits without relaunching. ``moot exec`` requires Claude Code credentials to already be present in the container. If credentials are absent (cold start), run ``moot up`` first — it handles the first-run ``/login`` flow. ``moot exec`` does not. Each role runs in a dedicated git worktree at ``.worktrees//`` inside the container. The worktree is created automatically if it does not exist. **Prerequisites:** ``moot init`` must have been run first. ``moot.toml`` is required. Examples -------- Start the ``spec`` agent: .. code-block:: bash moot exec spec Start the ``implementation`` agent with a custom prompt: .. code-block:: bash moot exec implementation --prompt "Continue from where you left off." See also -------- - :doc:`up` — start all agents at once - :doc:`attach` — attach your terminal to a running agent's session - :doc:`status` — check which agents are running