Skip to content

Commit 1c1a6fa

Browse files
committed
mcp(fix[pane_tools]): Use tmux-level reset instead of sending keystrokes
why: `clear_pane` called `pane.clear()` which sends the literal text "reset" + Enter as keystrokes to the pane's foreground process. For non-shell panes (vim, REPL, TUI), this injects unexpected input. The tool's contract says "clear the pane" but the annotation says `destructiveHint: False`, compounding the mismatch. what: - Use `pane.reset()` which does tmux-level `send-keys -R \; clear-history` - This resets the terminal state and clears history without injecting keystrokes
1 parent 462db9c commit 1c1a6fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libtmux/mcp/tools/pane_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def clear_pane(
314314
session_name=session_name,
315315
window_id=window_id,
316316
)
317-
pane.clear()
317+
pane.reset()
318318
return f"Pane cleared: {pane.pane_id}"
319319

320320

0 commit comments

Comments
 (0)