resume_task
Continue a finished task's session with follow-up instructions while preserving prior context. Returns a new task_id on the same backend and model so you can build on earlier work.
Instructions
Continue a finished task's session with follow-up instructions.
Args: task_id: A task that has finished; its session is the one resumed. followup_prompt: What the agent should do next, with the prior context intact. Write it in plain prose, as with start_task's prompt: preserve spaces and word boundaries and never concatenate words to shrink the payload — the text is stored and delivered exactly as submitted. Blank or all-whitespace follow-ups are rejected rather than trimmed into shape. May be omitted only when the task has follow-ups queued with send_message (see below); otherwise it is required. max_turns: Cap on agent turns, where the backend supports one. network: Optional boolean overriding the parent run's network setting for this run only: None (the default) inherits what the parent was dispatched with — which is also the historical default for a record written before the field existed — True asks for no network barrier of harflow_mcp's own, False asks for one, honoured or refused exactly as on start_task for the parent's freedom. fetch: Optional refresh of remote-tracking refs before the resumed agent starts. true uses the default remote; a list names remotes. A prepared branch is reused and is not recreated. branch and base are not accepted on resume. fetch_required: When true, a fetch failure refuses the resume. group_report_output: None inherits the saved group-scoped output opt-in; false disables it. allowed_commands: None (the default) inherits the parent's saved command grants; a list replaces them for this run after the same validation and nested-subset check as start_task, which documents the grammar and limits.
Follow-ups queued on the task with send_message are consumed by this call, exactly once: the prompt is each queued message as a block "Queued caller follow-up N of M (message , queued ):" followed by its text exactly as sent, in queue order, a blank line, then followup_prompt verbatim — or the line "End of queued caller follow-ups." when it is omitted. The new task's task_started event lists the message_ids. A message cannot be consumed twice; one that cannot be proven undelivered after a failed launch is kept as delivery_unknown rather than re-queued.
A task that had resources re-queues the same names; if they are busy the call returns at once
with launch_state: "waiting_for_resources", hands the consumed follow-ups to the waiting launch
(consumed when it spawns, queued again if it never starts) and has no record until then.
Returns a new task_id sharing the original session, and returns immediately as with start_task.
Runs on the same backend, model, reasoning_effort and freedom as the original — none of these
can be changed on resume, since a mid-conversation switch would not honestly describe what
produced the reply. network is the one per-run override, because it is a per-run sandbox
setting rather than a description of the session.
Some backends mint their own session id and only disclose it mid-run; if a task died before doing so, its conversation cannot be continued and this says so rather than starting a disconnected one.
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": {
"task_id": "<task_id>"
},
"name": "resume_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fetch | No | ||
| network | No | ||
| task_id | Yes | ||
| max_turns | No | ||
| fetch_required | No | ||
| followup_prompt | No | ||
| allowed_commands | No | ||
| git_https_rewrite | No | ||
| group_report_output | No | ||
| conversation_profile | No | ||
| background_idle_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||