=========== moot attach =========== Attach your terminal to a running agent's tmux session. Synopsis -------- .. code-block:: bash moot attach Arguments --------- .. option:: role The role to attach to. Must match a role defined in ``moot.toml``. Description ----------- ``moot attach`` connects your terminal to the tmux session for the named role (``moot-``) running inside the devcontainer. The session runs Claude Code in interactive mode — you can type prompts, watch the agent's output, and observe or guide its work. To detach without stopping the agent, use the tmux prefix followed by ``d``. The bundled ``.tmux.conf`` remaps the prefix to ``Ctrl-Space``, so the default detach sequence is ``Ctrl-Space d``. You can also run ``moot detach `` from another terminal. **Auto-relaunch:** If the named session is not running (for example, the agent exited via ``/exit``), ``moot attach`` relaunches the role before attaching. This requires Claude Code credentials to already be present in the container. If credentials are absent, run ``moot up`` first. **First-time login:** ``moot up`` instructs you to run ``moot attach `` on the human-interface role (typically ``product``) to complete ``/login`` and theme setup during a cold start. Examples -------- Attach to the product agent: .. code-block:: bash moot attach product Attach to implementation to review ongoing work: .. code-block:: bash moot attach implementation See also -------- - :doc:`up` — start agents (handles cold-start login flow) - :doc:`status` — check which agents are running - :doc:`compact` — trigger context compaction without attaching