wait
Pauses until a Python execution completes or a timeout/silence threshold is reached, returning running status and recent output so agents can poll progress without blocking indefinitely.
Instructions
等待一个 execution 结束,或两个计时器之一到点。
两个计时器
与 cell 头的 --wait / --silence 相同,对应 HTTP 客户端的总超时与 read timeout:
timeout_seconds 是这次调用最多等多久;silence_seconds 是 execution 连续这么久
没有新输出就提前返回,从这次调用开始计。默认都是 10 秒。
到点只结束这次调用,cell 照常运行,结果写明 running 与原因,附最后几行输出;
之后可以再调用本工具,或用 read_output、interrupt。
结果第一行写着它从提交到现在跑了多久;对照预期估出剩下的整数秒,例如
wait(timeout_seconds=170, silence_seconds=35)。
选择
execution 的选择规则与 execution_status 相同。
完整输出交付
当所选 execution 的 cell 头含 --full-output 且已达到终态时,本工具
直接返回完整 combined 正文,可以突破 5,000-token 省略;仍在运行的
execution 继续返回 running。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| execution | No | 要等待的正整数执行编号。省略时使用当前记录,随后 使用最近记录。 | |
| silence_seconds | No | execution 连续这么久没有新输出就返回,正数;从这次调用开始计。 | |
| timeout_seconds | No | 这次调用最多等待的秒数,正数。 |