# tmux.CommandError

- **Module:** tmux
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/command.go#L110
- **Page:** https://libtmux.org/reference/go/tmux-commanderror/

CommandError reports a completed failed high-level tmux operation. It matches [ErrCommand] through errors.Is; callers can recover its fields with errors.As. Generic library operations retain an owned copy of the completed command and output so tmux diagnostics remain available. Operations whose primary payload may contain secrets return an exit-code-only result instead. Callers must treat retained argv and output as potentially sensitive.

## Members

- `Subcommand` (attribute) — Subcommand is the failed tmux subcommand.
- `Result` (attribute) — Result is the owned completed result, or an exit-code-only redacted result for a secret-bearing operation.
- `Error` (method) — Error implements error.
- `Unwrap` (method) — Unwrap makes CommandError compatible with ErrCommand.
- `Is` (method) — Is reports [ErrNoServer] for a failure that means no tmux server answered: either the command never reached one, or the one it reached is gone.
