# history-limit

Source: https://libtmux.org/en/tmux/3.2a/catalog/options/history-limit/

> Set the maximum number of lines held in window history.

option tmux3.2a

Set the maximum number of lines held in window history.

* Scope

  session

* Type

  Number

* Default

  `2000`

* Values

  0 to 2147483647 lines

* Set

  [`set-option`](https://libtmux.org/en/tmux/3.2a/manual/set-option/) `history-limit value`

* Read

  [`show-options`](https://libtmux.org/en/tmux/3.2a/manual/show-options/) `history-limit`

## Description[#](https://libtmux.org/en/tmux/3.2a/catalog/options/history-limit/#description)

Set the maximum number of lines held in window history. This setting applies only to new windows - existing window histories are not resized and retain the limit at the point they were created.

## Releases[#](https://libtmux.org/en/tmux/3.2a/catalog/options/history-limit/#releases)

* [tmux 3.7c](https://libtmux.org/en/tmux/3.7c/catalog/options/history-limit/) : present
* [tmux 3.2a](https://libtmux.org/en/tmux/3.2a/catalog/options/history-limit/) : present

## Source[#](https://libtmux.org/en/tmux/3.2a/catalog/options/history-limit/#source)

* Defined in

  [`options-table.c:456`](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/options-table.c#L456)

* C source reference

  [`options_table`](https://libtmux.org/en/tmux/3.2a/reference/c-variable-options_table/)

* CLI Manual

  [Original manual entry](https://libtmux.org/en/tmux/3.2a/manual/full/#options-history-limit)

## Used by[#](https://libtmux.org/en/tmux/3.2a/catalog/options/history-limit/#used-by)

Library documentation that names this option.

* Python

  [`libtmux_mcp.tools.option_tools.set_option`](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-option_tools-set_option/), [`libtmux_mcp.tools.option_tools.show_option`](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-option_tools-show_option/)

* TypeScript

  [`pane.Pane.pipeTo`](https://libtmux.org/en/ts/latest/reference/pane-pane-pipeto/), [`server.Server.showGlobalOptions`](https://libtmux.org/en/ts/latest/reference/server-server-showglobaloptions/)

* Rust

  [`mcp.model.OptionArgs.name`](https://libtmux.org/en/rs/latest/mcp/reference/mcp-model-optionargs-name/), [`options.generated.HISTORY_LIMIT`](https://libtmux.org/en/rs/latest/reference/options-generated-history_limit/), [`pane.Pane.wait_for_text`](https://libtmux.org/en/rs/latest/reference/pane-pane-wait_for_text/), [`pane.Pane.wait_until`](https://libtmux.org/en/rs/latest/reference/pane-pane-wait_until/), [`session.Session.set_typed_option`](https://libtmux.org/en/rs/latest/reference/session-session-set_typed_option/)

* Go

  [`tmux.GlobalSessionScope.SetHistoryLimit`](https://libtmux.org/en/go/latest/reference/tmux-globalsessionscope-sethistorylimit/), [`tmux.RunResult.Lines`](https://libtmux.org/en/go/latest/reference/tmux-runresult-lines/), [`tmux.Session.SetHistoryLimit`](https://libtmux.org/en/go/latest/reference/tmux-session-sethistorylimit/), [`tmux.SessionOptionValues.HistoryLimit`](https://libtmux.org/en/go/latest/reference/tmux-sessionoptionvalues-historylimit/)

* Java

  [`io.github.libtmux.Pane.awaitText`](https://libtmux.org/en/java/latest/reference/io-github-libtmux-pane-pane-awaittext/)

* C#

  [`LibTmux.Mcp.TailResult`](https://libtmux.org/en/csharp/latest/mcp/reference/libtmux-mcp-tailresult/), [`LibTmux.Mcp.TailResult.LinesMissed`](https://libtmux.org/en/csharp/latest/mcp/reference/libtmux-mcp-tailresult-linesmissed/), [`LibTmux.Pane.ReadOutputSinceAsync`](https://libtmux.org/en/csharp/latest/reference/libtmux-pane-readoutputsinceasync/)
