Skip to content

CCAR-F · Domain 5: Context Management & Reliability · 15% of the exam

Task 5.1: Manage conversation context to preserve critical information across long interactions

Keeping amounts, dates and commitments exact across long sessions with a persistent case-facts block, trimming verbose tool results, and placing and labeling aggregated input so nothing in the middle gets lost.

Study it

  • Case facts, trimmed tool results and position-aware input

    Partly covered by: Context Windows

Sample questions

Try each one before opening the answer. Every option is explained, with the Anthropic documentation page that proves it.

Question 1 · choose 1

Your support agent summarizes older turns to keep long conversations within budget. In one escalated case, the summary turned "refund of $1,240.50 promised by October 3 for order 88412" into "the customer expects a refund soon," and the agent later offered the wrong amount. Which design prevents this?

  1. ASummarize less often, only when the conversation gets close to the context limit of the model
  2. BKeep amounts, dates and promises in a case-facts block sent with every prompt, outside the summary
  3. CSwitch the agent to a model with a larger context window so that summarization is rarely needed
  4. DAsk the summarizer to write longer, more detailed summaries so that fewer specifics are dropped
Show the answer and why
  • ASummarize less often, only when the conversation gets close to the context limit of the model

    Incorrect

    Delaying summarization delays the loss; once it runs, the same details can be blurred.

  • BKeep amounts, dates and promises in a case-facts block sent with every prompt, outside the summary

    Correct

    Transactional facts held verbatim in their own block are never condensed, so later turns always see the exact values.

  • CSwitch the agent to a model with a larger context window so that summarization is rarely needed

    Incorrect

    A bigger window postpones the problem and raises cost, and long inputs bring their own recall problems.

  • DAsk the summarizer to write longer, more detailed summaries so that fewer specifics are dropped

    Incorrect

    A longer summary still paraphrases; numbers and dates can be rounded off or blurred at every pass.

Progressive summarization tends to compress exact values into vague phrases. Extract transactional facts into a persistent case-facts block included in each prompt, separate from the summarized history.

Question 2 · choose 1

Your order lookup tool returns more than 40 fields per order, including warehouse codes, carrier events and internal flags. Return requests need about five of them. After a few lookups in multi-order conversations, the context is crowded and the agent overlooks details the customer gave earlier. What should you change?

  1. ATurn on prompt caching so that the repeated order data costs less on each request
  2. BTrim each lookup result to the fields that returns need before it is added to the conversation
  3. CTell Claude in the system prompt to ignore fields that are not relevant to returns
  4. DMove every lookup result into the system prompt so the order data stays separate from the conversation
Show the answer and why
  • ATurn on prompt caching so that the repeated order data costs less on each request

    Incorrect

    Caching makes repeated tokens cheaper, but they still crowd the context; the waste is inside every result.

  • BTrim each lookup result to the fields that returns need before it is added to the conversation

    Correct

    Returning only high-signal fields keeps tool results from crowding out what matters in the context.

  • CTell Claude in the system prompt to ignore fields that are not relevant to returns

    Incorrect

    Ignored fields still occupy the context; the instruction does not reduce what accumulates.

  • DMove every lookup result into the system prompt so the order data stays separate from the conversation

    Incorrect

    Moving the data does not shrink it, and tool results belong with the tool calls that produced them.

Tool results accumulate and can consume tokens far beyond their relevance. Trim verbose outputs to the relevant fields before they enter the context.

Question 3 · choose 1

Your compliance team needs a full, unsummarized record of every long Agent SDK session, but sessions auto-compact as they approach the context limit. Where can you capture the full transcript before it is summarized?

  1. AIn a PreCompact hook that archives the transcript
  2. BBy asking Claude to repeat the whole conversation before it compacts
  3. CIn a PostToolUse hook, from the last tool result
  4. DBy disabling compaction for all sessions
Show the answer and why
  • AIn a PreCompact hook that archives the transcript

    Correct

    PreCompact runs before compaction and can save the full history.

  • BBy asking Claude to repeat the whole conversation before it compacts

    Incorrect

    That spends context and is not a faithful record.

  • CIn a PostToolUse hook, from the last tool result

    Incorrect

    A tool result is not the transcript.

  • DBy disabling compaction for all sessions

    Incorrect

    Long sessions would then run out of context.

A PreCompact hook fires before compaction (manual or automatic) and is the place to archive the full transcript.

Question 4 · choose 1

Your agent harness compacts context automatically, but on long tasks Claude starts wrapping up early as the window fills, leaving work unfinished. What does the prompting guidance suggest adding?

  1. AA note that context will be compacted, so keep going
  2. BAn instruction to finish every task within one context window
  3. CA rule to delete old messages by hand every few turns
  4. DA smaller max_tokens so that responses use less context
Show the answer and why
  • AA note that context will be compacted, so keep going

    Correct

    Telling Claude how the harness handles limits stops it from stopping early.

  • BAn instruction to finish every task within one context window

    Incorrect

    That encourages the early wrap-up you want to avoid.

  • CA rule to delete old messages by hand every few turns

    Incorrect

    Manual deletion is what compaction already handles.

  • DA smaller max_tokens so that responses use less context

    Incorrect

    Shorter responses do not change Claude's sense of the remaining budget.

In harnesses that compact or save context externally, tell Claude so in the prompt; otherwise it may try to wrap up as it nears the limit.

Question 5 · choose 1

Your Claude API support agent should remember a customer's preferences and open issues across separate conversations held weeks apart, without carrying full transcripts in context. Which feature fits?

  1. AExtended thinking with a large budget
  2. BA longer context window that holds every past conversation
  3. CPrompt caching of the previous conversations
  4. DThe memory tool, which keeps notes outside the context
Show the answer and why
  • AExtended thinking with a large budget

    Incorrect

    Thinking happens within a request and is not memory across conversations.

  • BA longer context window that holds every past conversation

    Incorrect

    Old transcripts would crowd out the current conversation.

  • CPrompt caching of the previous conversations

    Incorrect

    Caching lowers cost for repeated prefixes; it does not decide what to remember.

  • DThe memory tool, which keeps notes outside the context

    Correct

    The memory tool lets Claude save and consult information across sessions.

For knowledge that must persist beyond one context window, use the memory tool (or similar note-taking) so Claude stores and retrieves only what matters.

Question 6 · choose 1

Your Claude API chat application has conversations that eventually exceed the context window. You want older turns summarized automatically near the limit instead of writing your own summarizer. Which platform feature fits?

  1. APrompt caching, which stores earlier turns for reuse
  2. BThe Message Batches API, which processes long conversations offline
  3. CCompaction, which summarizes earlier context as the window fills
  4. DStructured outputs, which shorten every response
Show the answer and why
  • APrompt caching, which stores earlier turns for reuse

    Incorrect

    Caching lowers the cost of repeated tokens but keeps them all in context.

  • BThe Message Batches API, which processes long conversations offline

    Incorrect

    Batches change when requests run, not how context is managed.

  • CCompaction, which summarizes earlier context as the window fills

    Correct

    Compaction replaces older content with a summary so the conversation can continue.

  • DStructured outputs, which shorten every response

    Incorrect

    Output format does not manage accumulated history.

Compaction summarizes older conversation context as it approaches the limit, so the conversation can continue without your own summarizer.

Question 7 · choose 2

Your support chat uses on-demand compaction, and agents complain that after a summary the last few exchanges come back paraphrased. You want the most recent turns sent word for word after the summary, with only older turns summarized. Which TWO statements about compaction that keeps recent turns are correct? (Choose TWO.)

  1. AA request parameter sets how many recent turns the API keeps
  2. BYou send only the older turns in the compaction request, then send the kept turns unchanged after the returned block
  3. CKeeping more recent turns frees more room in the context window
  4. DYou send the whole history for compaction and then repeat the last turns after the block
  5. EThe cut should leave no tool call open, with each call and its result on the same side
Show the answer and why
  • AA request parameter sets how many recent turns the API keeps

    Incorrect

    No parameter sets this; you choose a cut point in your own history.

  • BYou send only the older turns in the compaction request, then send the kept turns unchanged after the returned block

    Correct

    The API summarizes every message it receives, so the kept turns stay out of the compaction request and follow the block word for word.

  • CKeeping more recent turns frees more room in the context window

    Incorrect

    Kept turns go back at full length, so the more you keep, the less room the compaction frees.

  • DYou send the whole history for compaction and then repeat the last turns after the block

    Incorrect

    The last turns would be summarized and then sent again, so they appear twice.

  • EThe cut should leave no tool call open, with each call and its result on the same side

    Correct

    If the messages you send end in an assistant turn whose tool call has no result, the API rejects the compaction request.

Keep-tail compaction is a cut point you choose: the older turns go into the compaction request, the recent ones are sent after the summary block exactly as they were. Place the cut where no tool call is left open, and remember that kept turns cost their full length.

Practise domain 5 →Practise all domains →