Using AI at work

Use Claude Code Safely: Permission Modes, Checkpoints, and Secrets

Assuming Claude Code can read and modify files and run commands, organize the safety checks beginners should make before, during, and after work. Connect the differences between permission modes, changes checkpoints cannot restore, the separate role of git, and the rule of not exposing secrets into one practical checklist.

Show contents

Who this is forBeginners who want to understand permissions and recovery limits and build safer working habits before using Claude Code on real projects

What you need
  • Have reviewed basic Claude Code execution and plan mode at least once
  • Understand that file edits and command execution can affect a real project
  • Do not put passwords, API keys, or personal information into practice data
  • Understand that git is a version-control tool separate from checkpoints

01Before work: check the folder, secrets, and recovery method first

Safe use starts before you send a prompt. First confirm that the terminal is in the intended location, and for practice use a folder separated from real work repositories. If a project contains sensitive files such as .env files, certificates, or personal materials, review what the AI tool can access before proceeding. Even if an example seems to require an API key, use an obviously fake value such as `sk-EXAMPLE-NOT-REAL` instead of a real key.

Prompt
Before starting work
- Am I in the project folder I intended?
- Are there no real personal details, passwords, or API keys in the example files?
- Have I checked the pre-change state with git or committed it if necessary?
- If this is an unfamiliar task, am I starting in a review-focused flow such as plan or Manual?

The existence of Claude Code checkpoints does not remove the need for separate version control. The official documentation explicitly states that checkpoints do not replace version control such as git. For important projects, keep existing version-control habits such as pre-work commits or separate branches.

02Permission modes: separate automation level from points that require human review

The permission modes described in the official documentation are Manual, acceptEdits, plan, auto, dontAsk, and bypassPermissions. Worknote recommends that beginners start with Manual or plan. This does not mean risk disappears; it is a choice intended to build the habit of reading and judging the change scope before proceeding.

ModeConfirmed behaviorBeginner note
ManualSetting value default; reads automatically and asks before edits/commandsProceed while reviewing changes and commands
acceptEditsAutomatically allows file edits and common file commands such as mkdir, touch, mv, and cpUse after understanding the scope of automatic changes
planRead-focused analysis and planningUse to review scope before implementation
autoA classifier model reviews actions instead of the user and executes most without askingReview results and change scope separately
dontAskUses only pre-approved toolsUnderstand the scope of the tools you allowed
bypassPermissionsSkips all checksUse only in an isolated container or VM

The default starting mode differs by plan. In the official documentation checked on 2026-09-22, the interactive terminal starts in auto by default for Pro, Max, and Team plans, while other plans use Manual. Therefore, do not assume the same approval flow will always appear; check the current mode.

Prompt
claude --permission-mode plan

03During work: read the meaning of files and commands before approving

Claude Code can read the files it needs and may ask for approval before editing files or running commands. However, the fact that an approval prompt appears does not itself guarantee that the command is safe. First read which files will change, whether deletion, move, or copy commands are included, and whether there is any unrequested installation or scope expansion.

Prompt
Before making any changes, tell me only the following first.
1. Names of files you will modify
2. What you will change in each file
3. Shell commands you intend to run
4. Whether any original file will be deleted, moved, or overwritten
Do not modify files or run commands yet.
  • If more files than requested are selected, ask why.
  • For commands such as rm, mv, and cp that directly change file state, recheck the target path.
  • If an installation command appears, confirm whether it is actually required by the task.
  • If an unexpected change appears, stop approving and return to plan to recheck the scope.
  • Remove real sensitive values so they do not enter prompts, files, or logs.

04Checkpoints: understand exactly what the rewind feature can and cannot restore

Claude Code creates an automatic checkpoint for each prompt you send. You can open the rewind menu with `/rewind`, or by pressing Esc twice when the input box is empty, and choose options such as restoring code and conversation, restoring conversation only, restoring code only, or summarizing. However, this feature does not record every file change.

Prompt
/rewind
Type of changeCheckpoint limitationSeparate protection
Changes tracked by Claude CodeMay be eligible for rewindUse git as well for important work
Files changed by Bash commands such as rm, mv, and cpNot tracked or restoredCheck targets before the command and prepare a separate recovery method
Files edited directly outside Claude CodeNot trackedCheck separately with git diff and similar tools
Project version historyDoes not replace gitKeep version control with commits, branches, and related practices

In particular, do not expect `/rewind` to restore every file deleted or moved through shell commands. Treat checkpoints as an auxiliary way to rewind work inside Claude Code, and manage project history and recovery separately with git or other tools.

05Keep secrets and real data out of practice examples

Do not paste passwords, API keys, real customer information, or real research data directly into prompts or example files just because code needs them. For tutorials and error reproduction, use synthetic data and clearly fake tokens. For real projects, separately confirm which data may be provided to the tool under your organization's policy and your usage environment.

Prompt
Fake value for practice:
API_KEY=sk-EXAMPLE-NOT-REAL

Synthetic data:
date,category,amount
2026-09-01,food,12000

If a project already contains sensitive information, do not assume that simply asking 'do not look at that file' is sufficient. Check the files the tool can access and the applicable security policy; when needed, reproduce the task in a working copy with sensitive information removed.

06After work: use the actual diff and execution result as the reference, not the explanation

After the work is finished, judge the result from the actual files and execution output rather than from the AI saying 'done.' As in the previous article, read git diff, rerun the command, and compare with the expected values. For an error fix, do not check only that the error disappeared; verify that the original valid input still produces the same result.

Prompt
After-work check
- Did only the expected files change in git diff?
- Does the execution result match the expected values in the requirements?
- Are temporary files or fake secrets absent from the commit target?
- Are the reason for the change and the run method left clearly enough for the next person to understand?

Claude Code's natural-language explanation is material that helps review. Make the final judgment by comparing the actual diff, execution results, and project rules. This principle remains useful even when the model or permission mode changes.

07Final result: a safety checklist for before, during, and after work

StageQuestion to checkIf there is a problem
Before workIs this the correct folder, is there no sensitive information, and is there a recovery method?Prepare a practice folder, synthetic data, and the git state first
During workDo you understand which files and commands you are approving?Stop approval and recheck the scope in plan
Before rewindIs this a Bash or external change that checkpoints do not track?Check a separate recovery method such as git or backup
After workDo the diff and execution result match the requirements?Find the cause and revise only the necessary part
  • At first, use a review-focused flow such as Manual or plan.
  • Because bypassPermissions skips all checks, use it only in an isolated container or VM.
  • Do not treat checkpoints as a replacement for git.
  • Do not expect checkpoint restoration for files changed by Bash commands or files edited directly outside Claude Code.
  • Use synthetic data and clearly fake values instead of real passwords, API keys, or personal information.
  • Determine completion from the diff and actual execution results, not from the AI's explanation.

The common principle throughout this series is to define requirements narrowly first, begin with reading and planning, verify the change scope, and have a person validate the execution result. As the scope of automation grows, the human role does not disappear; it shifts toward checking what was allowed and whether the result meets the defined criteria.

What to check yourself

Written based on the Claude Code official documentation checked on 2026-09-22 · Claude Code was not actually run · No Python execution code

  • Check that the descriptions of Manual, acceptEdits, plan, auto, dontAsk, and bypassPermissions match the official documentation
  • Compare the difference in default starting modes between Pro, Max, Team and other plans with the official documentation
  • Compare the automatic checkpoint for each prompt and the `/rewind` or double-Esc access method from an empty input box with the official documentation
  • Check that it explicitly states that files changed by Bash commands and files changed outside Claude Code are not tracked or restored by checkpoints
  • Check that the limitation that checkpoints do not replace git is stated clearly
  • Check that only clearly fake values such as sk-EXAMPLE-NOT-REAL are used instead of real secrets
Verification limits

This article is based on the Claude Code official documentation checked on 2026-09-22 and is not a record of actually testing Claude Code permission modes or checkpoints. Before applying it to a real project, separately check your organization's security policy and the latest official documentation.