1. A nightly job runs claude -p "Fix the lint errors" with no other flags and no mode set. Claude tries to edit a file. What happens?
c — a -p run with no mode set starts in Manual mode. A call that needs approval is denied unless an allow rule, a hook or --permission-prompt-tool approves it.
2. Your script parses Claude's answer and also needs the session ID. Which output format fits?
a — json prints one object with result, the session ID and metadata. text is plain text only, stream-json is one event per line, and yaml isn't an option.
4. A pull request adds a .mcp.json server that nobody approved. Your CI checks out the branch and runs claude -p without --bare. What happens to the server?
d — -p can't show the approval prompt, so it loads project-scoped servers without asking, approved or not. Use --bare, --setting-sources user or --strict-mcp-config to keep them out.
5. Your prompt says "This is a read-only task. Never edit files." Claude then reads an issue that says "update config.yaml". Which control actually stops the edit?
c — the prompt and CLAUDE.md are advisory, so hostile text can talk Claude out of them. A deny rule that removes the tools is enforced. A turn cap limits length, not actions.
7. You copy a workflow that uses anthropics/claude-code-action with an API key and the Claude GitHub App. Which permissions: block is the least it needs to read the code?
c — contents: read lets the job read the code. id-token: write lets the action get the OIDC token it needs to work as the Claude GitHub App.
9. On an Ubuntu runner you pass --disallowedTools "Bash" and ask Claude to find every TODO. Which search tools does it have?
d — on macOS and Linux, Glob and Grep are left out by default and Claude searches through Bash. Removing Bash, or naming either tool in --allowedTools, brings both back.