Skip to content

docs(aws-strands): correct the concurrent-run comment on _activeRunsByThread - #2613

Merged
ranst91 merged 1 commit into
mainfrom
claude/unruffled-benz-211252
Sep 3, 2026
Merged

docs(aws-strands): correct the concurrent-run comment on _activeRunsByThread#2613
ranst91 merged 1 commit into
mainfrom
claude/unruffled-benz-211252

Conversation

@ranst91

@ranst91 ranst91 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What

The doc comment on _activeRunsByThread in integrations/aws-strands/typescript/src/agent.ts claimed 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_thread set and refuses an overlapping run in run before the body is entered, emitting THREAD_BUSY with the same message template TypeScript uses, via _busy_scope.

Change

The comment now describes what both bridges actually do:

  • both refuse a per-thread collision before the run body, with the same code and the same message text;
  • Python additionally guards a shared orchestrator instance across every thread, since such an instance cannot be multiplexed at all, and that arm narrows back to per-thread when a callable builds a fresh orchestrator per run;
  • Python also refuses a run against an orchestrator parked at an interrupt.

integrations/aws-strands/ARCHITECTURE.md already 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 run in integrations/aws-strands/typescript: 76 test files passed, 1611 tests passed, 0 failed.

…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.
@ranst91
ranst91 requested a review from a team as a code owner September 3, 2026 08:06
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Python Preview Packages

Version 0.0.0.dev1788422762 published to TestPyPI.

Warning: These packages are built from contributor code that may not yet have been vetted for correctness or security. Install at your own risk and do not use in production.

Install with uv

Add the TestPyPI index to your pyproject.toml:

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
explicit = true

Then 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 testpypi

Install with pip

pip install \
  --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple/ \
  ag-ui-protocol==0.0.0.dev1788422762

Use --extra-index-url https://pypi.org/simple/ so pip can resolve
transitive dependencies (pydantic, fastapi, etc.) from real PyPI.


Commit: 07a6dc2

@pkg-pr-new

pkg-pr-new Bot commented Sep 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

@ag-ui/a2a-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2a-middleware@2613

@ag-ui/a2ui-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2ui-middleware@2613

@ag-ui/event-throttle-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/event-throttle-middleware@2613

@ag-ui/mcp-apps-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mcp-apps-middleware@2613

@ag-ui/mcp-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mcp-middleware@2613

@ag-ui/a2a

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2a@2613

@ag-ui/adk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/adk@2613

@ag-ui/ag2

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/ag2@2613

@ag-ui/agno

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/agno@2613

@ag-ui/aws-strands

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/aws-strands@2613

@ag-ui/claude-agent-sdk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/claude-agent-sdk@2613

@ag-ui/claude-managed-agents

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/claude-managed-agents@2613

@ag-ui/crewai

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/crewai@2613

@ag-ui/langchain

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/langchain@2613

@ag-ui/langgraph

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/langgraph@2613

@ag-ui/llamaindex

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/llamaindex@2613

@ag-ui/mastra

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mastra@2613

@ag-ui/pydantic-ai

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/pydantic-ai@2613

@ag-ui/vercel-ai-sdk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/vercel-ai-sdk@2613

@ag-ui/watsonx

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/watsonx@2613

@ag-ui/a2ui-toolkit

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2ui-toolkit@2613

create-ag-ui-app

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/create-ag-ui-app@2613

@ag-ui/client

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/client@2613

@ag-ui/core

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/core@2613

@ag-ui/encoder

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/encoder@2613

@ag-ui/proto

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/proto@2613

commit: f845954

@ranst91
ranst91 merged commit af08551 into main Sep 3, 2026
40 checks passed
@ranst91
ranst91 deleted the claude/unruffled-benz-211252 branch September 3, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants