# libtmux::Server::run

- **Module:** libtmux::Server
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/85e8bd603a322dc32bb8b9aeb1a72bcf36945f1d/include/libtmux/server.hpp#L100
- **Page:** https://libtmux.org/reference/cxx/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.
