Repository navigation
Add untrusted external messages to the Python SDK - #44086
Merged
copyberry[bot] merged 1 commit intoSep 9, 2026
Merged
copyberry[bot] merged 1 commit into
copyberry[bot] merged 1 commit into
Conversation
## Why Applications need to deliver content from other agents, tools, or services with tool-level authority, without treating it as user input or granting authorization. ## What changed - Export `ExternalMessage` for sync and async `run(...)` and `turn(...)`, accepting text or structured content with a tool name and optional namespace. Send it through `toolOutput` and require CLI 0.151.0 or newer. - Support starting a turn or joining an active regular turn while preserving external content as function output in history. Keep external messages separate from user-input lists and `steer(...)`. - Give turn handles independent subscriptions, replaying completed items and latest usage to joining handles. Release consumed transient events and clean up subscriptions on closure, failure, or cancellation. - Document the authority boundary and add sync and async examples. ## Testing Add coverage for wire representations, input validation, runtime compatibility, tool authority across resume, active-turn joins, and tool-output truncation. Add subscription tests for replay, concurrent consumers, early completion, cancellation, and cleanup. GitOrigin-RevId: 6106327085fd9c4bd11b71e20b3d8e74738b8bb5
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/6106327085fd9c4bd11b71e20b3d8e74738b8bb5
branch
from
September 9, 2026 06:54
dfcd64f to
1a4096e
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/6106327085fd9c4bd11b71e20b3d8e74738b8bb5
branch
September 9, 2026 06:54
zhouan272-cmd
temporarily deployed
to
issue-triage
September 9, 2026 06:56 — with
GitHub Actions
Inactive
zhouan272-cmd
temporarily deployed
to
issue-triage
September 9, 2026 06:56 — with
GitHub Actions
Inactive
zhouan272-cmd
temporarily deployed
to
issue-triage
September 9, 2026 06:56 — with
GitHub Actions
Inactive
zhouan272-cmd
temporarily deployed
to
issue-triage
September 9, 2026 06:56 — with
GitHub Actions
Inactive
zhangzexin
temporarily deployed
to
issue-triage
September 9, 2026 07:03 — with
GitHub Actions
Inactive
zhangzexin
temporarily deployed
to
issue-triage
September 9, 2026 07:03 — with
GitHub Actions
Inactive
zhangzexin
temporarily deployed
to
issue-triage
September 9, 2026 07:03 — with
GitHub Actions
Inactive
This branch was previously deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Add untrusted external messages to the Python SDK
Why
Applications need to deliver content from other agents, tools, or services with tool-level authority, without treating it as user input or granting authorization.
What changed
ExternalMessagefor sync and asyncrun(...)andturn(...), accepting text or structured content with a tool name and optional namespace. Send it throughtoolOutputand require CLI 0.151.0 or newer.steer(...).Testing
Add coverage for wire representations, input validation, runtime compatibility, tool authority across resume, active-turn joins, and tool-output truncation. Add subscription tests for replay, concurrent consumers, early completion, cancellation, and cleanup.