Claude Certified Architect – Foundations Practice Question 93: SDK Multi Tenant Isolation

Claude Certified Architect, Foundations · Test 10 · question 3 of 10

Agent Architecture & Orchestrationeasy

A SaaS company runs Claude Agent SDK agents on shared infrastructure, one agent process per customer. During testing, an agent picked up a developer's user-level CLAUDE.md, project skills, and saved auto memory from the host machine, none of which belong in a customer's session. The team wants each customer's agent limited to what the application configures in code. Which approach follows the documentation?

Select one answer
Show answer and explanation

Answer:

  • A. Run each tenant in its own filesystem and pass an empty settingSources list, and disable auto memory with CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 in env

A is correct. When settingSources is omitted, query() reads the same filesystem settings as the Claude Code CLI (user, project, and local settings, CLAUDE.md files, and .claude/ skills, agents and commands). Passing settingSources: [] limits the agent to what is configured programmatically. Some inputs are read regardless of that option, including managed policy settings and auto memory under ~/.claude/projects/, so the docs recommend, for multi-tenant deployments, a separate filesystem per tenant plus settingSources: [] and CLAUDE_CODE_DISABLE_AUTO_MEMORY=1.

B is wrong because omitting settingSources is equivalent to ["user", "project", "local"], the opposite of isolation. C is wrong because "project" loads project CLAUDE.md, rules, skills and hooks, and auto memory is still read regardless. D is wrong because the files would still be loaded into context and consume tokens; an instruction to ignore them is not a configuration boundary.

Reference: Use Claude Code features in the SDK

Practice Test 10 ›

Study guides for Claude Certified Architect, Foundations