resume
Continue a stuck or questioning program by choosing retry, skip, substitute action or code, answer, abort, or stop; then report its current state.
Instructions
Go on with a program that exec (or an earlier resume) left stuck, asking or running; id is the number in its reply, "Program is ". Give one choice, by the state that reply named:
stuck on an action: retry (after you fixed things with act's single actions), skip (value: what the program gets back instead), instead { tool, args } (do this action in its place), code (JavaScript run in the program in the action's place, with its calls and args: several steps, a loop; what it returns is what the action returns), or abort (true, or the error message; the program gets an error it may catch)
asking: answer (the program's ask() returns it), or abort
any state: stop: true ends the program; nothing at all waits for it again Then waits up to waitSec (default 30, at most 300) and replies the way exec does: where the program stands now (done with its result, stuck, asking, or still running). A program that has ended takes no choice (resume with only its id still reports it); to do it again, run it again with exec.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "resume"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The program's id, from exec's reply | |
| code | No | Stuck: JavaScript to run in the program in the action's place (its calls and args are there; return what the action should return) | |
| skip | No | Stuck: pass over the failed action; value is what it returns | |
| stop | No | End the program, whatever its state | |
| abort | No | Stuck: true, or the error message the program gets | |
| retry | No | Stuck: run the failed action again | |
| value | No | With skip: what the action returns to the program | |
| answer | No | Asking: the answer to its question | |
| instead | No | Stuck: run this tool with these args in the failed action's place | |
| waitSec | No | Wait up to this long before answering; default 30 |