Skip to content

CCAR-P · Domain 7: Developer Productivity and Operational Enablement · 8% of the exam

Task 7.2: Agent SDK and Claude Code Configuration

Setting up the Claude Agent SDK or Claude Code (permission modes from default to bypassPermissions, hooks, subagent definitions, headless and CI runs) for a team workflow within its safety and automation limits.

Study it

  • Agent SDK and Claude Code configuration: permission modes, hooks, subagents and CI

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the Anthropic documentation page that proves it.

Question 1 · choose 1

A team checks this file into its repository as .claude/settings.json for a release-notes task that developers run with claude -p on their laptops:{ "permissions": { "deny": ["WebFetch"], "defaultMode": "dontAsk" } }The team now also starts the same task as a cloud session from claude.ai/code on that repository and leaves the mode dropdown as it is. Which permission mode does the cloud session use?

  1. AdontAsk, because the cloud session applies the defaultMode that the repository's checked-in settings file sets
  2. BNone; the session refuses to start and reports dontAsk as a value that cloud sessions don't accept
  3. CManual mode, the default, so the session asks for approval before each file edit it makes
  4. DThe mode shown in its dropdown, with file edits pre-approved, since the file's dontAsk value is ignored
Show the answer and why
  • AdontAsk, because the cloud session applies the defaultMode that the repository's checked-in settings file sets

    Incorrect

    Cloud sessions don't honor defaultMode "dontAsk" from settings files.

  • BNone; the session refuses to start and reports dontAsk as a value that cloud sessions don't accept

    Incorrect

    The value is ignored silently, and the session still starts.

  • CManual mode, the default, so the session asks for approval before each file edit it makes

    Incorrect

    Cloud sessions pre-approve file edits regardless of mode, so the dropdown offers Accept edits instead of Manual.

  • DThe mode shown in its dropdown, with file edits pre-approved, since the file's dontAsk value is ignored

    Correct

    A cloud session ignores dontAsk from settings files and starts in the dropdown's mode, which pre-approves file edits.

Cloud sessions don't honor defaultMode "bypassPermissions" or "dontAsk" from settings files, so a repository's checked-in settings can't set those modes there; the value is ignored silently and the session starts in the permission mode shown in the mode dropdown. Cloud sessions offer Accept edits, Plan and Auto, and they pre-approve file edits regardless of mode, so the dropdown shows Accept edits where other surfaces show Manual.

Question 2 · choose 2

A team defines two subagents in .claude/agents/ and relies on their permission modes as guardrails:# security-review.md frontmatter name: security-review permissionMode: plan # release-helper.md frontmatter name: release-helper permissionMode: bypassPermissionsDevelopers usually work with the main conversation in acceptEdits; on release days they work in default (Manual) mode. Which TWO statements describe how these definitions behave? (Choose TWO.)

  1. AWith the main conversation in acceptEdits, security-review runs in plan mode as its definition sets, so it can't edit files
  2. BWith the main conversation in acceptEdits, security-review runs in acceptEdits, so its setting isn't a read-only guarantee
  3. CWith the main conversation in default mode, release-helper runs in bypassPermissions, since a subagent's own setting wins there
  4. DWith the main conversation in plan mode, a subagent whose definition sets acceptEdits can edit files while the rest only plan
  5. EWith the main conversation in default mode, release-helper keeps default mode, so its calls still need approval
Show the answer and why
  • AWith the main conversation in acceptEdits, security-review runs in plan mode as its definition sets, so it can't edit files

    Incorrect

    When the main conversation is in acceptEdits, the subagent runs in that mode and the permissionMode you set is ignored.

  • BWith the main conversation in acceptEdits, security-review runs in acceptEdits, so its setting isn't a read-only guarantee

    Correct

    Under bypassPermissions, acceptEdits or auto in the main conversation, subagents run in that same mode.

  • CWith the main conversation in default mode, release-helper runs in bypassPermissions, since a subagent's own setting wins there

    Incorrect

    A subagent runs in bypassPermissions only when the main conversation does; otherwise it keeps the main conversation's mode.

  • DWith the main conversation in plan mode, a subagent whose definition sets acceptEdits can edit files while the rest only plan

    Incorrect

    When the main conversation is in plan mode, the subagent stays in plan mode whichever permissionMode is set.

  • EWith the main conversation in default mode, release-helper keeps default mode, so its calls still need approval

    Correct

    A bypassPermissions setting on a subagent applies only when the main conversation is also in bypassPermissions.

A subagent's permissionMode applies only in some cases. When the main conversation is in bypassPermissions, acceptEdits or auto mode, the subagent runs in that same mode and its own value is ignored. When the main conversation is in plan mode, the subagent stays in plan mode. When the main conversation is in default or dontAsk mode, the subagent runs in the mode it sets, except that bypassPermissions isn't honored there. Restrict a subagent's tools when it must stay read-only.

Question 3 · choose 1

A TypeScript Claude Agent SDK service sets skills: ["triage"] in its query options so that Claude can't run the project's deploy skill, which sits in .claude/skills/deploy/ next to triage. A security review asks what this restriction achieves on its own. What does the Agent SDK skills documentation say?

  1. AClaude doesn't see deploy and the Skill tool rejects it, but its files stay reachable through Read and Bash, and subagents aren't restricted
  2. BThe SDK hides the deploy skill's folder from the session's working directory until the query ends
  3. CClaude can't reach deploy by any path, since the list also blocks Read and Bash on skill folders
  4. DThe restriction covers the main agent and every subagent it spawns, though Claude can still see deploy's description
Show the answer and why
  • AClaude doesn't see deploy and the Skill tool rejects it, but its files stay reachable through Read and Bash, and subagents aren't restricted

    Correct

    The page states each part of this.

  • BThe SDK hides the deploy skill's folder from the session's working directory until the query ends

    Incorrect

    Unlisted skills' files remain on disk and stay reachable.

  • CClaude can't reach deploy by any path, since the list also blocks Read and Bash on skill folders

    Incorrect

    The files stay reachable through Read and Bash.

  • DThe restriction covers the main agent and every subagent it spawns, though Claude can still see deploy's description

    Incorrect

    The model doesn't see unlisted skills, and the list doesn't restrict subagents.

The skills option controls which skills Claude can invoke in the main conversation. The model doesn't see unlisted skills and the Skill tool rejects them, while their files remain on disk and stay reachable through Read and Bash. Restricting the list doesn't restrict subagents or dispatch by name, so it isn't a security boundary on its own.

Practice domain 7 →Practice all domains →