Question · Vibe coding with Claude Code course · Module 15: Advanced Claude Code
Quiz: Writing a file without consent in -p
A script runs claude -p "Write Vitest tests for @lib/plural.ts and save them in lib/plural.test.ts." with no permission flag. What happens?
Answer options
- The write is rejected and lands in permission_denials, and the command still ends with exit code 0
- Claude writes the file without asking, because nobody in a script can answer a consent prompt
- The run stops and waits in the terminal for consent
- Claude writes the file to a temporary directory instead of lib/
You can check the correct answer by solving this task in the CodeWorlds game.