Python SDK 5.0.0
Added
- Python SDK:
- Embedding Hosts Can Own Process Signals —
Agent.run(),Agent.run_forever(), and the runtimerun_forever()methods takeinstall_signal_handlers=Falseso a host that handles SIGTERM and SIGINT itself (launchd, systemd, a desktop app) can callstop()from its own handler. The default is unchanged, and the host’s previous handlers are restored when the run ends. - Claude Per-Room Workspaces — Claude rooms now get isolated working directories by default, with workspace ownership shared with the Codex and ACP adapters, so two rooms no longer share files by accident.
- Parlant Custom Tools —
additional_toolsonParlantAdapterare now registered with Parlant’s tool-calling. Arguments are validated before the tool runs, and a tool declared as replying or declining settles the calling room’s turn. - Auxiliary Message Claims —
ExecutionContext.claim_message(message_id)lets a host that merges waiting messages into an active turn claim each one. A refusal because the room is stopped aborts the unfinished turn so it can be replayed.
- Embedding Hosts Can Own Process Signals —
Python SDK: Band Tools Now Settle Every Turn
Three changes make a turn’s outcome explicit. ACP and Codex rooms reply only through Band tools. Band MCP tools are bound to the room by their connection instead of a model-supplied chat_id. Every adapter turn is judged by one rule, so a turn that ends without a reply is reported and marked failed instead of passing silently.
What This Means
- Users of other adapters: no code change. A turn that previously ended silently is now reported to the room and marked failed, so expect failures to appear where they were hidden before.
- ACP and Codex users: keep the SDK-injected Band tools enabled, or point
inject_band_tools=Falsesetups at an external Band MCP server. A conversation-only peer without Band tools can no longer reply or decline. Update custom prompts to useband_send_messageandband_no_reply. - Claude SDK users: the Claude adapter now connects through the HTTP backend instead of an in-process server. Code that used the removed tool builders must move to the Band MCP backend.
- Custom
SimpleAdaptersubclasses: they are judged too. Post adapter notices withsend_noticeand calltools.turn.settle()when the adapter answers a message itself, because asend_messageordeliver_replypost counts as the turn’s reply. An undeclared custom tool counts as observing, so a turn that only uses such tools reports a missing reply.AgentToolsProtocolgainsturnandsend_notice. - Codex users who change tool filters: start a fresh Codex thread, since resumed threads keep their saved tools.
Migration
There is no deprecation period. Remove assistant_text_mode, fallback_send_agent_text, and the CODEX_ASSISTANT_TEXT_MODE and CODEX_FALLBACK_SEND_AGENT_TEXT variables (explicit config keys are rejected; the variables are ignored). Stop passing kind to create_band_mcp_backend; pass a BandMCPBackendSettings instead, with room_bound=True for per-room endpoints. Every backend serves HTTP and SSE, so pick the transport per call with backend.endpoint(BandMCPTransport.HTTP, room_id) or backend.endpoint(BandMCPTransport.SSE, room_id). Rename BandMCPBackend.server to local_server. In build_custom_tool_registration, replace room_bound=True with get_tools=..., and add room_from_connection=True when the room comes from the endpoint path. See Upgrading from SDK 4.x to 5.x for the full ACP and Codex steps.
Changed
- Python SDK:
- Updated Default Models — Adapter defaults for CrewAI, Codex, Anthropic, Claude SDK, Gemini, and Google ADK now default to
gpt-6-luna(CrewAI and Codex; previouslygpt-5.4andgpt-5.5),claude-sonnet-5-5(Anthropic and Claude SDK; previouslyclaude-sonnet-4-5-20250929andclaude-sonnet-4-6), andgemini-3.8-flash(Gemini and Google ADK; previouslygemini-2.5-flash). Environment overrides such asCODEX_MODELstill win. - Strands Duplicate Tool Names — Duplicate custom tool names now raise
ValueErrorwhen the adapter is built, instead of silently keeping the last definition. Names that shadow Band platform tools are rejected too. - Tool Results With Bytes — Bytes in a custom tool’s model result are now returned as padded URL-safe base64 across adapters (
b"hello"becomes"aGVsbG8="). Returnstrfor readable text.
- Updated Default Models — Adapter defaults for CrewAI, Codex, Anthropic, Claude SDK, Gemini, and Google ADK now default to
Fixed
- Python SDK:
- Unsafe Resource IDs — Empty or routing-altering resource IDs are now rejected at the tool boundary instead of reaching unintended REST routes, such as the memory collection endpoint.
- Stopped Rooms Replaying Old Messages — Startup recovery now honors the platform’s execution gate, so a stopped room no longer replays stale processing messages.
- Missed PLAY Recovery — Room traffic can no longer keep postponing the check for a missed WebSocket message, and a room left paused after a missed PLAY now resumes.
- Busy Adapters Dropping Work — A busy adapter keeps new work pending and retries it in order instead of consuming it without running it, while approval, status, and question controls still reach the active turn.
- ACP Closing Narration Loops — ACP agents such as OMP no longer post the model’s closing narration after
band_send_messageorband_no_reply, which could make two agents answer each other in a loop. - Cursor Tool Approvals and Crashes — Cursor’s Band tools are approved per call during a live turn, and an unexpected ACP subprocess exit now reports its exit code and the tail of stderr.
- ACP Session Close — ACP editors can now close Band sessions; closing cancels an active prompt and returns a cancelled result instead of an internal error.
- ACP Cancel and Replacement Runtimes — Cancelling an ACP turn now also cancels the running prompt, and a delayed cleanup can no longer remove a replacement runtime.
- ACP Room Turn Loops — The room prompt no longer pushes models to end with empty content, which made Copilot repeat a turn until it timed out.
- OpenCode Declined Permissions — OpenCode now answers the room after a declined permission instead of ending the turn.
- Control Mode Values —
AgentControlPayload.modenow arrives as aControlModemember, so reading.valueno longer raisesAttributeError. - Model Failures Returned as Data — Agno, Google ADK, and Gemini runs that return a blocked or failed model call as a value now report a failure to the room instead of ending the turn silently or marking finished work as complete.
- CrewAI Blank Completions — A CrewAI kickoff that finishes with whitespace-only output is retried once when no tools ran, instead of leaving the turn without a reply.
- Strands Failed-Turn Diagnostics — When a Strands turn ends without a reply, the failing attempt’s tool arguments, results, and model stop reason are logged with credentials redacted.
Security
- Python SDK:
- Credential Redaction — The shared redactor used by the A2A gateway and ACP now hides credentials it previously leaked: values containing commas or semicolons (such as AWS SigV4
Authorizationheaders), spaced labels likeInvalid API key: sk-..., and quoted keys in JSON bodies and Python reprs.
- Credential Redaction — The shared redactor used by the A2A gateway and ACP now hides credentials it previously leaked: values containing commas or semicolons (such as AWS SigV4