Wait for text¶
wait_for_text¶
Wait for NEW text to appear in a tmux pane.
- Returns:
Use when you need to block until specific output appears — waiting for a server to start, a build to complete, or a prompt to return.
Avoid when the expected text may never appear — always set a reasonable
timeout. For repeated observation or tailing, use
capture_since; for command completion you control, use
wait_for_channel.
Side effects: None. Readonly. Blocks until text appears or timeout.
Example:
{
"tool": "wait_for_text",
"arguments": {
"pattern": "Server listening",
"pane_id": "%2",
"timeout": 30
}
}
Response:
{
"found": true,
"matched_lines": [
"Server listening on port 8000"
],
"pane_id": "%2",
"elapsed_seconds": 0.002,
"risk_band_warned": false
}
risk_band_warned is true when polling entered tmux’s history-limit
trim-risk band. In that state, matching remains best-effort because older
scrollback can be discarded while the wait is active; use
wait_for_channel for deterministic command completion.
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
yes |
— |
Text to wait for. Treated as literal text by default. Set |
|
|
no |
|
Whether to interpret pattern as a regular expression. Default False (literal text matching). |
|
|
no |
— |
Pane ID (e.g. ‘%1’). |
|
|
no |
— |
Session name for pane resolution. |
|
|
no |
— |
Session ID (e.g. ‘$1’) for pane resolution. |
|
|
no |
— |
Window ID for pane resolution. |
|
|
no |
|
Maximum seconds to wait. Default 8.0. |
|
|
no |
|
Seconds between polls. Default 0.05 (50ms). |
|
|
no |
|
Whether to match case. Default False (case-insensitive). |
|
|
no |
— |
tmux socket name. |
|
|
Context |
no |
— |
FastMCP context; when injected the tool reports progress to the client. Omitted in tests. |