cert
cert-1
cert-2

Pass Anthropic CCA-F Exam in First Attempt Guaranteed!

Get 100% Latest Exam Questions, Accurate & Verified Answers to Pass the Actual Exam!
30 Days Free Updates, Instant Download!

cert-5
cert-6
CCA-F Exam - Verified By Experts
CCA-F Premium File

CCA-F Premium File

$89.99
$98.99
  • Premium File 134 Questions & Answers. Last Update: Nov 02, 2026

Whats Included:

  • Latest Questions
  • 100% Accurate Answers
  • Fast Exam Updates
 
$98.99
$89.99
accept 412 downloads in the last 7 days
block-screenshots
Anthropic CCA-F Practice Test 26

Question 250

A developer needs every test file matching **/*.spec.ts in a repository. Which built-in tool is appropriate?

  1. Use Grep to locate text matches and then Read the relevant files
  2. Use Glob to find paths matching the filename pattern
  3. Use Write for the complete generated content after confirming replacement is authorized
  4. Use Bash with an appropriately scoped command and execution permission

Explanation

Correct Answer

B:

Glob searches the repository's path names and returns files that match a specified filename pattern, which is exactly what the **/*.spec.ts request needs. Grep searches inside files for matching text and does not directly enumerate every matching path by extension. Apply the correct repository root and exclusion settings, then inspect selected files with Read if their contents are needed. Do not use a file-writing command for path discovery.

Incorrect Answers

A:

Grep looks for text matches inside files, whereas the requirement is to list paths that match **/*.spec.ts regardless of their contents. Use Glob to discover the matching test filenames; Grep could miss a matching file that does not contain the searched text.

C:

Whole-file writing is suitable when the entire file is intentionally regenerated. This alternative does not establish how to discover files by path or naming convention in the stated workflow.

D:

Bash can enumerate paths if command execution is authorized, but it grants more capability than the file-pattern discovery task requires. Glob directly matches the requested **/*.spec.ts filenames without running a shell command or risking command side effects.

Question 251

A small configuration value must be changed in a known file with a clear old and new string. What built-in operation fits?

  1. Use Glob to find paths matching the filename pattern
  2. Use Write to create the new file with the intended content
  3. Use Edit for a targeted replacement after inspecting surrounding context
  4. Use Write for the complete generated content after confirming replacement is authorized

Explanation

Correct Answer

C:

A focused edit minimizes unintended modifications compared with rewriting an entire file. Verification should still check the diff. Edit performs a scoped replacement while preserving the rest of the file. Confirm that the expected original value occurs at the intended location and inspect the resulting diff before accepting the change.

Incorrect Answers

A:

Glob resolves path patterns and extensions without searching full file contents. That addresses a different part of the system, not the requirement to make a surgical edit to known source text.

B:

Write is suited for creating or replacing a complete file. This is not a substitute for “Use Edit for a targeted replacement after inspecting surrounding context”; that control is necessary in the stated circumstances. Confirm that the expected original value occurs at the intended location and inspect the resulting diff before accepting the change.

D:

Whole-file writing is suitable when the entire file is intentionally regenerated. The scenario instead requires a way to make a surgical edit to known source text.

Question 252

A project requires a new README that does not exist. Which built-in tool action is suitable?

  1. Use a targeted Edit against the nonexistent README without creating a new file
  2. Use Grep to locate text matches and then Read the relevant files
  3. Use Write to create the new file with the intended content
  4. Use Glob to find paths matching the filename pattern

Explanation

Correct Answer

C:

Write is suited for creating or replacing a complete file. It differs from Read and Edit, which inspect and modify existing content. Write can create a new README using the required content; Read cannot create files and Edit normally assumes a preexisting target. Verify path and write permission to avoid replacing an unrelated document.

Incorrect Answers

A:

A targeted replacement cannot edit a file that has not yet been created. Edit expects an existing matched location, so attempting it against a missing README is an invalid operation. Use Write or another explicit creation procedure when the intended file does not yet exist, then verify content.

B:

Grep searches contents efficiently. This capability does not directly create a new file rather than patching nonexistent text. Searching existing source text cannot create the missing README. Read may confirm the target does not exist, but Write is the file-creation operation under the approved path.

D:

Glob resolves path patterns and extensions without searching full file contents. It would leave the stated need to create a new file rather than patching nonexistent text unresolved.

Question 253

A coding assistant needs to execute npm test and inspect its exit code. Which built-in tool is relevant?

  1. Use Glob to find paths matching the filename pattern
  2. Use Write to create the new file with the intended content
  3. Use Read to inspect the changed source and infer test success from the absence of visible syntax mistakes, without executing npm test
  4. Use Bash with an appropriately scoped command and execution permission

Explanation

Correct Answer

D:

Bash runs shell commands and returns execution output. The command should be validated against the task's authorized environment. Use Bash to run the authorized test command and inspect the real process exit status and diagnostic output. A model claiming tests passed is not evidence the test process actually completed successfully.

Incorrect Answers

A:

Glob resolves path patterns and extensions without searching full file contents. This alternative does not establish how to execute approved project test commands in the stated workflow.

B:

Write is suited for creating or replacing a complete file. Although useful elsewhere, it is not the direct mechanism to execute approved project test commands.

C:

Read can inspect source code, but it cannot execute npm test or produce the command’s actual exit code. A code review alone cannot establish that unit or integration tests pass. The requested evidence is a real test process result, obtained with an authorized Bash execution and reviewed standard output, standard error and exit status.

Question 254

An assistant must understand one known module before proposing changes. Which first action is more proportionate?

  1. Use Write to create the new file with the intended content
  2. Use a targeted Edit that preserves all unrelated content
  3. Use Read on the specific module rather than grepping the entire repository
  4. Grep the symbol across source files and inspect matching call sites with Read

Explanation

Correct Answer

C:

When a specific file path has already been established and authorized, reading that file directly is more precise than running another broad repository search. A direct read gives the engineer the actual content needed for reasoning and avoids unrelated matches and extra tool latency. Verify the path and scope before access, and fall back to search only if the exact location is uncertain.

Incorrect Answers

A:

Write creates or replaces file contents; using it before inspecting one known module could overwrite code without understanding its dependencies. Read the specific file first, identify the relevant implementation and then choose a bounded edit if a change is justified.

B:

Whole-file replacement increases the risk of deleting concurrent or unrelated material. The proposed option cannot provide the specific “Use Read on the specific module rather than grepping the entire repository” behavior that the case requires. When a specific file path has already been established and authorized, reading that file directly is more precise than running another broad repository search.

D:

Content search reveals references regardless of filenames. That addresses a different part of the system, not the requirement to inspect a known file before editing it.

Question 255

A refactor changes a public symbol and needs all files importing it. Which search sequence fits?

  1. Glob for the target filename across the workspace
  2. Grep the symbol across source files and inspect matching call sites with Read
  3. Use Glob to find paths matching the filename pattern
  4. Use Read on the specific module rather than grepping the entire repository

Explanation

Correct Answer

B:

Content search reveals references regardless of filenames. Reviewing each usage prevents a rename from silently breaking consumers. Locate imports and references with Grep, then Read matching contexts before changing a shared symbol. A simple filename search cannot prove which call sites depend on the public API.

Incorrect Answers

A:

Glob handles structural filename discovery. The decisive requirement here is to find and inspect code references before refactoring. Glob finds filenames by pattern and may miss imports using other source names. A symbol-level Grep followed by Read is better for locating actual dependency references.

C:

Glob resolves path patterns and extensions without searching full file contents. It would leave the stated need to find and inspect code references before refactoring unresolved.

D:

When the file is already known, direct reading provides the necessary context with less search noise. This alternative does not establish how to find and inspect code references before refactoring in the stated workflow.

Question 256

An assistant wants to fix one paragraph in a large policy file and considers Write for the entire file. What is safer?

  1. Read the changed region and use Bash to run the focused test suite
  2. Use a targeted Edit that preserves all unrelated content
  3. Use Read on the specific module rather than grepping the entire repository
  4. Use Write for the complete generated content after confirming replacement is authorized

Explanation

Correct Answer

B:

Whole-file replacement increases the risk of deleting concurrent or unrelated material. A scoped edit is more appropriate for a small change. Inspect the target paragraph, apply a bounded Edit and verify the resulting diff. Rewriting an entire policy file for one small change risks removing unrelated clauses or annotations.

Incorrect Answers

A:

Running a focused test is useful after a modification, but it does not choose the safest way to change a single paragraph in an existing large file. Use a targeted Edit after reading the surrounding text; wholesale Write risks replacing unrelated sections.

C:

When the file is already known, direct reading provides the necessary context with less search noise. Although useful elsewhere, it is not the direct mechanism to minimize change scope for a local correction.

D:

Whole-file writing is suitable when the entire file is intentionally regenerated. The proposed option cannot provide the specific “Use a targeted Edit that preserves all unrelated content” behavior that the case requires. Rewriting an entire policy file for one small change risks removing unrelated clauses or annotations.

Question 257

A research-only subagent attempts to run a package-install command through Bash. What should the controller do?

  1. Glob for the target filename across the workspace
  2. Read the changed region and use Bash to run the focused test suite
  3. Use a targeted Edit that preserves all unrelated content
  4. Deny Bash when the specialist's role lacks command-execution permission

Explanation

Correct Answer

D:

Tool capabilities must match delegated authority. A research task does not imply permission to mutate the development environment. A research agent with read-only responsibilities should not have package installation or shell execution rights. Deny the unapproved Bash action at the host authorization layer, independent of the model's phrasing.

Incorrect Answers

A:

Glob can list workspace paths without side effects, but the research-only agent is attempting a package-install command through Bash. The primary control is to deny execution permissions for Bash, not to switch to a file-name search tool after the unsafe request.

B:

A correct edit must be verified. This capability does not directly enforce execution permissions on built-in tools. Reading and testing may be allowed in a different coding workflow, but they do not authorize a research-only agent to install packages. Reject Bash where command execution exceeds its role.

C:

A targeted Edit changes text precisely, but it still modifies files and is unrelated to a package install requested through Bash. Research-only capabilities should exclude or deny shell execution at the tool boundary regardless of whether another editing tool seems narrower.

Question 258

A project uses several nested src directories and the engineer needs all package.json files. Which tool use is most efficient?

  1. Grep the symbol across source files and inspect matching call sites with Read
  2. Glob for the target filename across the workspace
  3. Use Write to create the new file with the intended content
  4. Read every file in the repository sequentially looking for the literal package name

Explanation

Correct Answer

B:

Glob handles structural filename discovery. Grep would search file contents and is unnecessary for a path-only objective. Glob matches filenames across the directory tree, making it appropriate for finding package.json in multiple nested locations. Grep is useful later if the contents need searching for a dependency or script.

Incorrect Answers

A:

Grep finds symbols inside source text; the engineer needs paths named package.json across nested directories. Glob directly matches that filename pattern. Content search would depend on arbitrary text inside those files and could omit legitimate package manifests.

C:

Write is suited for creating or replacing a complete file. Although useful elsewhere, it is not the direct mechanism to locate files by their basenames.

D:

Exhaustive manual reading wastes context when a filename pattern can locate manifests directly. Reading all repository files creates unnecessary cost and may expose unrelated secrets. Use Glob to discover likely paths and Grep to locate matching content, then Read the few relevant files before proposing a change.

Question 259

After changing a parser, the assistant claims success without examining the file or running tests. What tool sequence should follow?

  1. Use Write for the complete generated content after confirming replacement is authorized
  2. Read the changed region and use Bash to run the focused test suite
  3. Use Bash with an appropriately scoped command and execution permission
  4. Use Glob to find paths matching the filename pattern

Explanation

Correct Answer

B:

A correct edit must be verified. Inspection confirms the intended diff, while tests provide evidence that behavior remains valid. A successful edit response is not a passing test. Read the changed region to verify the actual bytes, execute the relevant test with Bash and check its exit code rather than trusting a summary.

Incorrect Answers

A:

Whole-file writing is suitable when the entire file is intentionally regenerated. Here, after changing a parser, the assistant claims success without examining the file or running tests. Read the changed region and use Bash to run the focused test suite. A correct edit must be verified.

C:

Bash runs shell commands and returns execution output. That addresses a different part of the system, not the requirement to verify source changes with reading and executable tests.

D:

Glob resolves path patterns and extensions without searching full file contents. The scenario instead requires a way to verify source changes with reading and executable tests.

Question 260

A coding agent starts by reading every file in a monorepo and exhausts context. Which exploration tactic is better?

  1. Use Glob to find paths matching the filename pattern
  2. Use a targeted Edit that preserves all unrelated content
  3. Use Write for the complete generated content after confirming replacement is authorized
  4. Use Glob to map relevant paths and Grep for symbols before selective Read

Explanation

Correct Answer

D:

Progressive discovery limits context consumption while retaining the files needed for the task. Full repository dumps are rarely necessary. Map likely file paths using Glob and locate specific symbols with Grep before opening a small set of relevant files. This conserves context for understanding behavior and testing the fix.

Incorrect Answers

A:

Glob alone maps file locations but does not find the relevant function names and references for selective reading. Combine path filtering with Grep on symbols, then Read only the matched modules instead of loading the whole monorepo into context.

B:

Edit is a precise modification operation, not an exploration strategy. The agent has not yet located the relevant code, so making edits now risks changing the wrong module. First narrow paths with Glob and locate symbols with Grep, then read the necessary context.

C:

Write is appropriate only after the full replacement content is validated and authorized. It does not solve the early discovery problem of reading far too many files. Locate relevant paths and symbols before deciding whether any rewrite is warranted.

Claude Certified Architect - Foundations (CCA-F) Practice Tests