# libtmux::Server::run

- **Module:** libtmux::Server
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/393d4b0ad666f18a6581f1eb281741a75a7503f0/include/libtmux/server.hpp#L182
- **Page:** https://libtmux.org/en/cxx/latest/reference/libtmux-server-run/

```
libtmux::Server::run(command: const CommandRequest &, timeout: std::optional< std::chrono::milliseconds > = {}, output_limit: std::optional< std::size_t > = {}) -> expected< std::string, CommandFailure >
```

Run one command and return its standard output.

The timeout still rides on the call: how long a caller will wait is a property of what they asked for, and listing sessions does not share a deadline with attaching a client. Unset takes the server's `ExecutionPolicy`, which is thirty seconds rather than forever — a floor, not a guess at what this particular command needs. `output_limit` bounds how much of tmux's answer this call will hold. Past it the command reports `truncated` rather than returning a prefix that reads like a complete answer. Unset uses the package default, which is ample for every listing and can be too small for a long scrollback.
