# libtmux_mcp.tools.pane_tools.pipe_pane

- **Module:** libtmux_mcp.tools.pane_tools
- **Package:** libtmux-mcp
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/tools/pane_tools/pipe.py#L33
- **Page:** https://libtmux.org/en/py/stable/mcp/reference/libtmux_mcp-tools-pane_tools-pipe_pane/

```
libtmux_mcp.tools.pane_tools.pipe_pane(
    pane_id: str | None = None,
    output_path: str | None = None,
    append: bool = True,
    session_name: str | None = None,
    session_id: str | None = None,
    window_id: str | None = None,
    socket_name: str | None = None,
) -> str
```

Log a pane's live output to a file (or stop an active log).

Streams everything written to the pane (stdout plus terminal
control sequences) into a file on disk — the common use is
``output_path="/tmp/pane.log"`` to capture scrollback continuously
while the agent watches for errors. When ``output_path`` is given,
starts logging; when ``output_path`` is None, stops any active pipe
for the pane.

> **warning:** This tool writes to arbitrary filesystem paths chosen by the MCP
> client. There is no allow-list; the server will create files
> anywhere the server process has write access. Treat this as
> elevated-risk: it is the broadest-reach tool in ``execute``. If
> you run libtmux-mcp on untrusted input, consider
> ``LIBTMUX_TOOLSETS=inspect`` or run the server under a user with
> a scoped home directory. See :doc:`/topics/trust` for the full
> footgun list.

## Parameters

- `pane_id` (`str | None`): Pane ID (e.g. '%1').
- `output_path` (`str | None`): File path to write output to. None stops piping.
- `append` (`bool`): Whether to append to the file. Default True. If False, overwrites.
- `session_name` (`str | None`): Session name for pane resolution.
- `session_id` (`str | None`): Session ID for pane resolution.
- `window_id` (`str | None`): Window ID for pane resolution.
- `socket_name` (`str | None`): tmux socket name.

## Returns

str
    Confirmation message.
