Problem
clear_pane still carries an old workaround for libtmux 0.56-era behavior: it manually runs send-keys -R and then clear-history.
The project now depends on libtmux 0.58, where Pane.reset() deliberately sends reset and clear-history to the target pane. The tool also advertises non-destructive mutating annotations even though it clears scrollback.
Upstream reference
Minimal local recreation
$ uv run pytest tests/test_pane_tools.py::test_clear_pane -q
Then inspect the tool annotations through tools/list; clear_pane currently reports destructiveHint=false.
Minimal fix
- Replace the two-call implementation with
pane.reset().
- Use an annotation preset that marks the operation as state-losing/destructive.
- Update docs that describe
clear_pane as two separate tmux commands.
Acceptance criteria
clear_pane still resets visible terminal state and clears scrollback.
clear_pane uses pane.reset() with libtmux 0.58+.
- Tool annotations no longer imply the operation is non-destructive.
- Existing clear-pane tests pass.
Problem
clear_panestill carries an old workaround for libtmux 0.56-era behavior: it manually runssend-keys -Rand thenclear-history.The project now depends on libtmux 0.58, where
Pane.reset()deliberately sends reset and clear-history to the target pane. The tool also advertises non-destructive mutating annotations even though it clears scrollback.Upstream reference
Pane.reset()sendssend-keys -Randclear-history: https://github.com/tmux-python/libtmux/blob/v0.58.0/src/libtmux/pane.py#L2201-L2220clear_history(): https://github.com/tmux-python/libtmux/blob/v0.58.0/src/libtmux/pane.py#L2167-L2194Minimal local recreation
$ uv run pytest tests/test_pane_tools.py::test_clear_pane -qThen inspect the tool annotations through
tools/list;clear_panecurrently reportsdestructiveHint=false.Minimal fix
pane.reset().clear_paneas two separate tmux commands.Acceptance criteria
clear_panestill resets visible terminal state and clears scrollback.clear_paneusespane.reset()with libtmux 0.58+.