wait_for_channel
Block until a tmux wait-for channel is signalled.
This is the AUTHORED-output synchronisation primitive: the channel
only fires because your own composed shell command signals it.
Reserve wait_for_text for output you did not author.
Agents can compose this with send_keys to turn shell-side
milestones into explicit synchronisation points::
send_keys(
"pytest; tmux wait-for -S tests_done",
pane_id=...,
)
wait_for_channel("tests_done", timeout=60)
Shell ; semantics fire wait-for -S whether the command
succeeded or failed, so the edge-triggered signal never deadlocks
on a crash. Do NOT chain exit $status after the signal — in an
interactive shell that exits the shell itself, which destroys
single-pane sessions. Exit-status preservation in interactive
shells is out-of-scope; inspect the captured output for
command-specific success markers.
All Python tools · JSON · Source
Arguments
channelrequired · string- Channel name. Must match ``^[A-Za-z0-9_.:-]{1,128}$``.
socket_nameoptional- tmux socket name.
Default:
null. timeoutoptional · number- Maximum seconds to wait. The underlying ``tmux wait-for`` has
no built-in timeout — this wrapper enforces it by killing the
tmux child, which also happens if the call is cancelled.
Defaults to 30 seconds. Capped by the same server wait ceiling
as ``wait_for_text``; an over-large value is not an error, the
wait returns at the ceiling and the confirmation message names
the timeout that was actually enforced.
Default:
30.
Schemas
The schema defines required fields, nested values, defaults, and validation constraints.
Input schema
{ "additionalProperties": false, "properties": { "channel": { "description": "Channel name. Must match ``^[A-Za-z0-9_.:-]{1,128}$``.", "type": "string" }, "socket_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "tmux socket name." }, "timeout": { "default": 30, "description": "Maximum seconds to wait. The underlying ``tmux wait-for`` has\nno built-in timeout — this wrapper enforces it by killing the\ntmux child, which also happens if the call is cancelled.\nDefaults to 30 seconds. Capped by the same server wait ceiling\nas ``wait_for_text``; an over-large value is not an error, the\nwait returns at the ceiling and the confirmation message names\nthe timeout that was actually enforced.", "type": "number" } }, "required": [ "channel" ], "type": "object"}Output schema
{ "properties": { "result": { "type": "string" } }, "required": [ "result" ], "type": "object", "x-fastmcp-wrap-result": true}Tool annotations
{ "destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false}