Skip to content

clear_pane uses stale libtmux workaround and underreports destructive behavior #74

Description

@tony

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions