Anything else is rejected. In practice: one run at a time per thread; you can’t start a new thread mid-run;
thread_close is only valid between runs.
Idempotency
Network retries are safe.thread_begin requires a request_id (max 256 chars); the other lifecycle tools default it to the JSON-RPC id. Sending the same request_id again returns the original result instead of applying the transition twice. Generate a new one for each new attempt, not each retry.
Errors
An invalid transition returns-32602 with the current state and what’s allowed from it. Don’t retry it; fix the call.
-32009. This one is safe to retry.
Other behavior
- Automatic runs: a provider tool call after
thread_begincan start a minimal run on its own, but Quaero then has no task description. Callrun_beginwhen you know the task. - Telemetry gaps: a
RUNNINGrun with norun_stepfor about 45 seconds shows as stale (telemetry_gap_open: true). Send steps at real milestones, not as a heartbeat. - Stops: when someone stops the agent,
runtime.stop_requestedis set on the next lifecycle response. End the run withoutcome: "killed"or"interrupted".