tmux_read_cc_pane
Monitor a tmux pane running Claude Code, wait for it to finish processing, approve permission prompts automatically, and return the captured pane content when idle.
Instructions
Monitor a tmux pane running Claude Code, auto-waiting and auto-approving.
Polls the pane in a loop:
While Claude Code is processing (spinners, "Running…", activity text): logs the status and sleeps.
When Claude Code asks for permission (numbered options): sends "1" to approve and continues monitoring.
When Claude Code is idle (waiting for next prompt): returns the captured pane content.
Args: target: Tmux target pane (e.g. "session:window.pane", "%3"). timeout: Max seconds to wait before returning (default 1800). poll_interval: Seconds between polls (default 0.5). last_n_lines: Number of trailing non-empty lines to analyze (default 20).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | ||
| timeout | No | ||
| last_n_lines | No | ||
| poll_interval | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |