docs(aws-strands): correct the concurrent-run comment on _activeRunsByThread - #2613
Merged
Conversation
…yThread The doc comment on `_activeRunsByThread` claimed Python guarded the per-thread collision only around an orchestrator and that its single-agent path had no guard of its own. That stopped being true once Python grew its own `_active_runs_by_thread` set and refused an overlapping run in `run`. Describe what both bridges do now: each refuses a per-thread collision before entering the run body, with the same code and the same message text, and Python additionally guards a shared orchestrator instance across every thread (narrowing back to per-thread when a callable builds a fresh orchestrator per run) and refuses a run against an orchestrator parked at an interrupt. ARCHITECTURE.md already described this behaviour correctly. Comment only; no runtime string or behaviour changes.
Contributor
Python Preview PackagesVersion
Install with uvAdd the TestPyPI index to your [[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
explicit = trueThen install the packages you need: # Core SDK
uv add 'ag-ui-protocol==0.0.0.dev1788422762' --index testpypi
# Integrations (each already depends on the matching ag-ui-protocol preview)
uv add 'ag-ui-langgraph==0.0.0.dev1788422762' --index testpypi
uv add 'ag-ui-crewai==0.0.0.dev1788422762' --index testpypi
# NOTE: ag-ui-agent-spec depends on pyagentspec (git-only, not on PyPI).
# You will need to install pyagentspec separately from its git repo.
uv add 'ag-ui-agent-spec==0.0.0.dev1788422762' --index testpypi
uv add 'ag_ui_adk==0.0.0.dev1788422762' --index testpypi
uv add 'ag_ui_strands==0.0.0.dev1788422762' --index testpypiInstall with pippip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
ag-ui-protocol==0.0.0.dev1788422762
Commit: 07a6dc2 |
@ag-ui/a2a-middleware
@ag-ui/a2ui-middleware
@ag-ui/event-throttle-middleware
@ag-ui/mcp-apps-middleware
@ag-ui/mcp-middleware
@ag-ui/a2a
@ag-ui/adk
@ag-ui/ag2
@ag-ui/agno
@ag-ui/aws-strands
@ag-ui/claude-agent-sdk
@ag-ui/claude-managed-agents
@ag-ui/crewai
@ag-ui/langchain
@ag-ui/langgraph
@ag-ui/llamaindex
@ag-ui/mastra
@ag-ui/pydantic-ai
@ag-ui/vercel-ai-sdk
@ag-ui/watsonx
@ag-ui/a2ui-toolkit
create-ag-ui-app
@ag-ui/client
@ag-ui/core
@ag-ui/encoder
@ag-ui/proto
commit: |
AlemTuzlak
approved these changes
Sep 3, 2026
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.
What
The doc comment on
_activeRunsByThreadinintegrations/aws-strands/typescript/src/agent.tsclaimed that Python guarded the per-thread run collision only around an orchestrator, and that its single-agent path had no guard of its own.That stopped being true in 6b09f47, "fix(aws-strands): refuse a second concurrent run on one thread in Python". Python now has its own
_active_runs_by_threadset and refuses an overlapping run inrunbefore the body is entered, emittingTHREAD_BUSYwith the same message template TypeScript uses, via_busy_scope.Change
The comment now describes what both bridges actually do:
integrations/aws-strands/ARCHITECTURE.mdalready documented this behaviour correctly, so the comment was the only thing out of date and no doc change was needed.Comment only. No runtime strings and no behaviour changed.
Verification
pnpm exec vitest runinintegrations/aws-strands/typescript: 76 test files passed, 1611 tests passed, 0 failed.