docs(state)!: inspect_state is a coroutine, so the graph must be awaited - #134
Merged
Conversation
Reading a key as it stood at an earlier turn reaches the host's conversation store, and there is no synchronous way in — so the tool is async, and a host that drives its graph with `invoke` rather than `ainvoke` has to switch. Worth saying out loud in the consuming guide because of when it goes wrong: building the graph succeeds, and the failure arrives the first time the model calls the tool. BREAKING CHANGE: `inspect_state` is async. A host invoking its graph synchronously must switch to `ainvoke` or `stream_turn`. `read_state_key` also appends its turn note after the JSON on a key more than one turn wrote, so that output is no longer parseable as JSON. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ciaransweet
pushed a commit
that referenced
this pull request
Sep 10, 2026
🤖 I have created a release *beep* *boop* --- ## [0.9.0](mcp-toolsets-runtime-v0.8.5...mcp-toolsets-runtime-v0.9.0) (2026-09-10) ### ⚠ BREAKING CHANGES * **state:** `inspect_state` is async. A host invoking its graph synchronously must switch to `ainvoke` or `stream_turn`. `read_state_key` also appends its turn note after the JSON on a key more than one turn wrote, so that output is no longer parseable as JSON. ### Features * **state:** read a state key as it stood at an earlier turn ([#114](#114)) ([6fc5f2b](6fc5f2b)) ### Documentation * **state:** inspect_state is a coroutine, so the graph must be awaited ([#134](#134)) ([e1e7f93](e1e7f93)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: ds-release-bot[bot] <116609932+ds-release-bot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reading a key as it stood at an earlier turn reaches the host's conversation
store, and there is no synchronous way in — so
inspect_stateis a coroutine,and a host that drives its graph with
invokerather thanainvokehas toswitch.
Worth saying out loud in the consuming guide because of when it goes wrong:
building the graph succeeds, and the failure arrives the first time the model
calls the tool, which is in front of a user.
Why this is a release marker as well as a doc
#114 merged as a plain
feat(state):, so the open release PR proposes 0.8.6.Every consumer pins
<0.9.0— mcp-toolsets and all four dss packages — and0.8.6 satisfies all of them, so it would land on the next lock refresh with
nobody choosing it.
bump-minor-pre-majoris set, so a breaking marker makesit 0.9.0 instead: the pins then hold, and each consumer widens its bound
deliberately, which is the moment to check whether it invokes synchronously.
Nothing in this repo or in dss invokes synchronously, so nothing is broken
today. The pin is what protects a consumer we do not know about.
BREAKING CHANGE:
inspect_stateis async. A host invoking its graphsynchronously must switch to
ainvokeorstream_turn.read_state_keyalsoappends its turn note after the JSON on a key more than one turn wrote, so that
output is no longer parseable as JSON.
🤖 Generated with Claude Code