Streaming Input changedagent-sdk/streaming-vs-single-mode
Nearest release: v2.1.247, published 5 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+1added
Lines−2removed
From line
272
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits6to this page, all time
The whole hunk
from line 272, old and new numbered
/
from line 272
272272
273273 async def single_message_example():
274274 # Simple one-shot query using query() function
275 # query() raises after an error result, such as error_max_turns
275 # query() raises ResultError after an error result, such as error_max_turns
276276 try:
277277 async for message in query(
278278 prompt="Explain the authentication flow",
from line 280
280280 ):
281281 if isinstance(message, ResultMessage) and message.subtype == "success":
282282 print(message.result)
283 # The SDK raises a plain Exception for error results, so match Exception here
284283 except Exception as e:
285284 print(f"Query failed: {e}")
286285
No line in this hunk matches that.