# tmux.Pane.BreakPane

- **Module:** tmux.Pane
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/pane_relocate.go#L119
- **Page:** https://libtmux.org/reference/go/tmux-pane-breakpane/

```
tmux.Pane.BreakPane(ctx: context.Context, request: BreakPaneRequest) -> (Window, error)
```

BreakPane moves the receiver into a new window in its exact session. Attach lets that new winlink become current in the session; it is not a global client-focus guarantee. The returned [Window] is freshly materialized in the receiver SessionID rather than by canonical ID-only refresh.

Before tmux 3.6, the sole-pane path may print no ID and retain WindowID; this
method refreshes that identity. Raw version "3.7" alone uses a placeholder
name and optional second rename; with an empty Name, the window may remain
named "libtmux". Suffixed 3.7 releases do not use the workaround.

After a reported ID, rename failure, or refresh failure, the partial result
carries the known WindowID and receiver session with Index -1. Earlier
failures return zero; no mutation is rolled back.
