Permissions: what the agent may do without asking you
Approving every agent action eventually becomes a reflex, and that is exactly when a risky command slips through. This lesson teaches you to set Claude Code's permissions according to the task and your repository's risks, so the agent works alone on routine actions, asks you about sensitive ones and never touches what is off limits.
Lesson objective
By the end of this lesson, you will be able to choose a permission mode suited to the task, write allow, ask and deny rules in the right settings file according to your repository's risks, and know what those rules don't cover.
Topics covered
- Claude Code permissions
- coding agent security
- settings.json
- permission modes
- guardrails
Where it fits
Put guardrails in place that hold
What can the agent do without asking me, and how do I enforce what must never happen?
Lessons in this module
- Permissions: what the agent may do without asking you (this lesson)
- Hooks: rules that always apply
What you will learn in this module
This lesson is part of the course Work with Claude Code on a real project: context, planning, review
- Choose a permission mode and write allow, ask and deny rules suited to the project's risks, in the right settings file.
- Write simple hooks as deterministic guardrails (block, format, verify) and know their risks and limits.
Related courses
- AI & DevelopmentJuniorSome basics are useful: introductory knowledge of the topic.
Build and ship a web app with an AI coding agent
2 hr 45 min
- AI & DevelopmentAdvancedRegular practice: you already use the tools or work on this topic.
Add a database, authentication and payments to your app
4 hr
- Product ManagementAdvancedRegular practice: you already use the tools or work on this topic.
Git for PMs: ship as a team without putting production at risk
3 hr 30 min