Courseiva

CCAR-F Claude Code Configuration and Workflows Practice Question

An architect is onboarding a legacy service and wants Claude Code to build context quickly. The repository has 40,000 files, most of them generated build artifacts and vendored dependencies, and the team wants exploration to stay focused on first-party source. Which approach best keeps Claude Code's automatic context gathering efficient here?

⚠ Common exam trap

The trap here is treating a smaller working directory as equivalent to ignore configuration, when the two differ in whether legitimate first-party files outside that directory remain reachable.

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

✓

Add ignore patterns for the generated and vendored directories in the project's ignore configuration so they are excluded from tool-driven discovery.

On very large repositories, the dominant cost is irrelevant files entering the model's discovery path. Ignore configuration is the supported, reversible lever: it filters generated and vendored content out of search and exploration while leaving first-party source fully reachable. Dumping a tree into the prompt, shrinking the working root, or deleting directories all either waste context, over-restrict scope, or cause collateral damage.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Add ignore patterns for the generated and vendored directories in the project's ignore configuration so they are excluded from tool-driven discovery.

    Why this is correct

    Claude Code respects ignore configuration when deciding which files to surface during search and exploration. Excluding build artifacts and vendored code keeps discovery pointed at first-party source, which lowers noise and token cost on a large repository. This is the targeted fix for a repo where most files are irrelevant to the task at hand.

  • ✗

    Delete the generated and vendored directories from the working copy before starting the session.

    Why it's wrong here

    Removing vendored dependencies can break builds, and regenerated artifacts will simply reappear on the next build, undoing the cleanup. It also destroys the ability to inspect a dependency when that becomes necessary. Configuration-based exclusion is reversible and safe, unlike destructive deletion of working-tree content.

  • ✗

    Paste the full directory tree into the first prompt so Claude has a complete map of the repository.

    Why it's wrong here

    A tree of 40,000 files consumes a large share of the context window before any real work begins, and most entries are generated or vendored noise. It also goes stale the moment files change. Providing raw structure does not teach Claude which paths matter, so it is wasteful rather than efficient.

  • ✗

    Run the session from inside the `src/` subdirectory so the working root is smaller.

    Why it's wrong here

    Changing the working directory narrows the default root, but it also hides configuration, tests, and shared packages that legitimately belong to the task. It is a blunt instrument that trades correctness for a smaller scope. Ignore patterns achieve the same focus while still letting Claude reach anything that is genuinely first-party.

About these practice questions

One of 271 original CCAR-F 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-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.