# tmux.Window.Respawn

- **Module:** tmux.Window
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/window_respawn.go#L39
- **Page:** https://libtmux.org/reference/go/tmux-window-respawn/

```
tmux.Window.Respawn(ctx: context.Context, request: RespawnRequest) -> (Window, error)
```

Respawn restarts the stable window process through the receiver's exact winlink. It does not select the window or promise any client focus. Respawn returns a canonical freshly materialized [Window], which may use another linked session for the same WindowID. If the command succeeds but refresh fails, it returns the receiver with that error; earlier failures return zero. Completed stderr produces a redacted [CommandError]; nonzero exits without stderr are followed by refresh.
