Claude Code
Today
Explore
Practice
Library
Exam
Certificate
Search
⌘K
ខ្មែរ
◐
Sign in
Today
Explore
Practice
Library
Profile
Non-Interactive Mode
Today
6. Optional: Automation · 1 of 4
Mark read
Prev
Next
Orient
Bound the actions, then the turns, then parse the result
Harden the nightly test-fixing job
Predict
Write one bounded automation
Close
Practice
Related
Non-Interactive Mode
Advanced
☆
📑
claude -p turns the agent into a Unix command — with all that implies
Orient
Bound the actions, then the turns, then parse the result
Harden the nightly test-fixing job
Predict
Write one bounded automation
Close
Practice
Related
Practice activities and scenarios are optional. Mark the lesson complete after reading, and return to practice whenever it helps.
Restoring your saved work…
07
Optional practice
🧠 Optional scenario practice
Q1
Why is
--permission-mode dontAsk
usually the right choice for a
-p
run in CI?
A
It is faster than other modes
B
An unanticipated action is denied rather than triggering a prompt no one can answer, so the job fails instead of hanging
C
It disables all tool use
D
It is required whenever --output-format json is used
Q2
In an automation script, what should decide whether the job succeeded?
A
The text Claude returns in its result field
B
A check the script runs itself, such as the test suite, independent of Claude's self-report
C
Whether the run completed without hitting --max-turns
D
The absence of errors in stream-json output
08
Up Next
Advanced
Fan-Out and Batch Work
Advanced
Scheduled and CI Work
Advanced
Team Rollout and Governance
📝 Notes
Mark lesson complete
Next: Fan-Out and Batch Work →