Enter copy mode

enter_copy_mode

enter_copy_mode
mutating tool

Enter copy mode in a tmux pane, optionally scrolling up.

Returns:

PaneInfo

Use when you need to scroll through scrollback history in a pane. Optionally scroll up immediately after entering. Use snapshot_pane afterward to read the scroll_position and visible content.

Side effects: Puts the pane into copy mode. The pane stops receiving new output until you exit copy mode.

Example:

{
  "tool": "enter_copy_mode",
  "arguments": {
    "pane_id": "%0",
    "scroll_up": 50
  }
}

Response:

{
  "pane_id": "%0",
  "pane_index": "0",
  "pane_width": "80",
  "pane_height": "24",
  "pane_current_command": "zsh",
  "pane_current_path": "/home/user/myproject",
  "pane_pid": "12345",
  "pane_title": "",
  "pane_active": "1",
  "window_id": "@0",
  "session_id": "$0",
  "is_caller": false
}

Parameters

Parameter

Type

Required

Default

Description

pane_id

str

no

Pane ID (e.g. ‘%1’).

scroll_up

int

no

Number of lines to scroll up immediately after entering copy mode.

session_name

str

no

Session name for pane resolution.

session_id

str

no

Session ID for pane resolution.

window_id

str

no

Window ID for pane resolution.

socket_name

str

no

tmux socket name.