From 7d7724a89b636886cce08f5af87fc5a221b0a7fc Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 2 Jun 2026 07:41:28 +0000 Subject: [PATCH] police sweep 2026-06-02: fix MCP lifecycle async-behavior description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit discover_traits and synthesize_samples block-and-poll for up to 5 minutes and stream progress notifications on the same request — they do NOT return once enqueued. Only train is fire-and-forget. Updated: - tool table rows to say "Blocks until the run completes, streaming progress" for discover_traits and synthesize_samples vs "Enqueues the run and returns immediately" for train - explanatory prose below the table to distinguish the two behaviors and note that poll/get_model is only needed on timeout/disconnect for the blocking tools Evidence: api/mcp.py discover_traits (lines 1413-1500) and synthesize_samples (1510-1600) block-and-poll up to 300s; train returns after enqueue. https://claude.ai/code/session_015z6Nsyx37deuN4o7kAEQWZ --- api-reference/mcp.mdx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/api-reference/mcp.mdx b/api-reference/mcp.mdx index 7d06474..1672167 100644 --- a/api-reference/mcp.mdx +++ b/api-reference/mcp.mdx @@ -88,14 +88,16 @@ Authoring tools mutate a draft model. Trait and sample edits apply only while th | Tool | Purpose | |------|---------| -| `train` | Train a draft model, or re-tune a ready one. Runs asynchronously. | -| `discover_traits` | Derive intrinsic traits from a draft model's samples. Runs asynchronously. | -| `synthesize_samples` | Generate labelled samples from a draft model's trait definitions. Runs asynchronously. | +| `train` | Train a draft model, or re-tune a ready one. Enqueues the run and returns immediately. | +| `discover_traits` | Derive intrinsic traits from a draft model's samples. Blocks until the run completes, streaming progress. | +| `synthesize_samples` | Generate labelled samples from a draft model's trait definitions. Blocks until the run completes, streaming progress. | | `tag_version` | Pin a tag to the active version. | | `untag_version` | Remove a tag. | | `activate_version` | Point the model at a version — roll back or pin. | -`train`, `discover_traits`, and `synthesize_samples` return once the run is enqueued; the model reports a `busy` state until the run completes. Poll `get_model` for the state rather than waiting on the call. +`train` returns once the run is enqueued — the model reports a `busy` state until the run completes; poll `get_model` for the outcome. + +`discover_traits` and `synthesize_samples` **block until the run finishes**, streaming progress on the same request. Calls may take several minutes. Poll `get_model` only if the call times out or the client disconnects. ## Models as resources