CCAR-F Claude Code Configuration and Workflows Practice Question
Which mechanism does Claude Code use to maintain session state across multiple prompts during a single refactoring task?
⚠ Common exam trap
Candidates mistakenly believe the API itself maintains persistent server-side sessions, confusing stateless API endpoints with the CLI tool's local conversation history management approach.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
It manages conversation history in memory and sends it with each request.
Claude Code utilizes a stateless API connection, but the CLI maintains session state by managing a conversation history that is passed back to the model with every request. This history includes previous turns, tool outputs, and file modifications. This approach ensures that the model remains aware of previous decisions and code changes, allowing it to perform multi-step refactoring tasks logically and coherently while minimizing unnecessary re-computation of the base context.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
It keeps a long-running TCP connection open to the server.
Why it's wrong here
Maintaining a long-running TCP connection for chat sessions is architecturally inefficient and prone to instability due to network timeouts. Modern LLM interactions are handled via RESTful or gRPC calls that are inherently stateless, relying on the client to manage the conversation history and state appropriately between requests.
- ✗
It saves the full conversation history to a local SQLite database.
Why it's wrong here
While storing history locally is a valid strategy for recovery, it is not the primary mechanism for real-time session management. The active session state is passed in the request payload to the model. Using a local database for every turn would introduce unnecessary I/O latency to the interaction loop.
- ✓
It manages conversation history in memory and sends it with each request.
Why this is correct
By keeping the conversation history in the CLI's memory, the client can append new turns and tool outputs to the existing context. Sending this history with each request allows the model to maintain continuity, reference previous actions, and understand the progression of the task without requiring a stateful server.
- ✗
It uses a global state variable on the Anthropic API servers.
Why it's wrong here
Anthropic's API is designed to be stateless for scalability and security. The server does not store user-specific session state between API calls. All context must be provided by the client (the CLI) in each individual request, making the client responsible for the entire session history management.
About these practice questions
Courseiva writes every CCAR-F question from scratch — 271 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Anthropic exam blueprint
This CCAR-F practice question is part of Courseiva's free Anthropic certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CCAR-F exam.