Claude Certified Architect – Foundations Practice Question 91: SDK Streaming Input Mode
Claude Certified Architect, Foundations · Test 10 · question 1 of 10
A team is building a chat front end on the Claude Agent SDK. Users watch the agent work on a long codebase analysis, and they need to send follow-up messages while it is still running, interrupt it when it heads in the wrong direction, and attach screenshots to later messages. The first prototype calls query() with a plain string prompt for every user message. Which change fits these requirements?
Show answer and explanation
Answer:
B is correct. Streaming input mode is the recommended way to use the Agent SDK: the agent runs as a long-lived process that takes in user input from an async generator of messages. The docs list image uploads, queued messages that process sequentially with the ability to interrupt, full tool and MCP access, real-time feedback, and context persistence as its benefits.
A is wrong because maxTurns only caps how many agent turns a run may take; it does not change how input is accepted. C is wrong because single message input mode does not support direct image attachments; images are sent as image content blocks in a streamed user message. D is wrong because continue: true resumes the previous conversation for a new one-shot call, which gives you multi-turn state but not dynamic queueing or real-time interruption; those are listed as unsupported in single message mode.
Reference: Streaming Input - Claude Agent SDK