Courseiva

CCAR-P Advanced Agentic Architecture Practice Question

An enterprise agentic system using Claude needs to maintain strict state isolation across multiple concurrent user sessions while executing autonomous tool loops. Which architecture best ensures security and state integrity?

⚠ Common exam trap

Many candidates mistakenly choose to store session state within the agent's memory or prompt context, which leads to security risks like prompt injection or data leakage between concurrent user sessions.

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

✓

Store conversation history and intermediate scratchpads in an encrypted, session-scoped external database retrieved on each turn.

Isolating agent state at the session layer prevents context bleed and cross-user data contamination in enterprise environments. Stateless server designs combined with externalized transactional stores allow horizontal scaling while preserving deterministic tool execution history, which is critical for compliance and reliable multi-turn agent interactions.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Maintain a single global conversation history array in memory and append all incoming user turns sequentially.

    Why it's wrong here

    A single shared history array lets concurrent sessions read and append to one another's turns, breaking isolation and leaking data across users. It is tempting because a global array is trivial to implement for a single-user prototype, but production concurrency requires per-session state keyed by session identifier.

  • ✓

    Store conversation history and intermediate scratchpads in an encrypted, session-scoped external database retrieved on each turn.

    Why this is correct

    Session-scoped external storage enforces isolation by keying every read and write to a unique session identifier, so concurrent agent loops cannot observe or mutate each other's scratchpads. Encryption at rest satisfies the security constraint, while per-turn retrieval keeps state authoritative rather than relying on in-context memory that could leak across sessions.

  • ✗

    Rely entirely on Claude's native system prompt caching to automatically differentiate between distinct concurrent user sessions.

    Why it's wrong here

    Prompt caching is a latency and cost optimisation that reuses identical prompt prefixes; it carries no session identity and cannot separate concurrent users' state. It is tempting because caching sounds like context management, but isolation requires explicit per-session stores, not cache behaviour.

  • ✗

    Encode all intermediate tool states directly into the client-side browser local storage and send the full payload to Claude.

    Why it's wrong here

    Browser local storage is client-controlled and tamperable, so encoding tool state there and resending it lets users forge or replay intermediate states, violating integrity. It is tempting because it offloads storage from the server, but server-side per-session state is required for trustworthy autonomous loops.

About these practice questions

One of 262 original CCAR-P practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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-P 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-P exam.