AnthropicApplications and Integration

Messages API & Conversation — CCDV-F Practice Question

A representative Claude Certified Developer - Foundations (CCDV-F) exam question on Messages API & Conversation. Work through it below, then read why each option is right or wrong.

Short answer

The correct answer is C. Send the relevant prior user and assistant turns again in the messages array.

Messages API calls are stateless with respect to conversation history. The application owns state and must include the relevant prior turns in each request.

The Question

A developer expects the Messages API to remember a user's previous request, but the second call has no context. What is the correct fix?

APut the history in the model name
BWait for server-side memory to synchronize
CSend the relevant prior user and assistant turns again in the messages arrayCorrect
DReuse only the request ID

Why C is correct

Messages API calls are stateless with respect to conversation history. The application owns state and must include the relevant prior turns in each request.

Why the other options are wrong

Option A: Put the history in the model name

Option A does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.

Option B: Wait for server-side memory to synchronize

Option B does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.

Option D: Reuse only the request ID

Option D does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.

Key idea: Messages API & Conversation

Messages API calls are stateless with respect to conversation history. The application owns state and must include the relevant prior turns in each request. On the CCDV-F exam, questions in the "Applications and Integration" domain test whether you can map a scenario's constraints to the right choice. Read the requirement carefully, eliminate options that violate any single constraint, and pick the one that satisfies all of them with the least operational overhead.

Ready to see how you'd score?

Take the free practice quiz and find out which Claude Certified Developer - Foundations domains you need to focus on. No signup required.

Practice 5 similar questions

Same cert, same or adjacent domain. Use these after reviewing the explanation.

Related Claude Certified Developer - Foundations Practice Questions