Skip to main content

Auto Mode Default Rules

These are the built-in entries of the auto mode classifier. An allow entry is an exception to a block rule. A soft_deny entry blocks an action unless an allow entry applies or you clearly asked for it. For example, Production Deploy blocks a deploy to production until you ask for it by name.

The entries apply whenever the permission mode is auto. Add or replace entries with the autoMode setting, and keep the defaults with $defaults. Drop $defaults from a list to remove the built-in entries of that list. The entries live inside the program, and claude auto-mode defaults prints them as JSON.

Example​

claude auto-mode defaults --label "Production Deploy"

This prints the full text of one rule. --label matches the start of a label, without regard to case. In the JSON, some labels end in [named+specifics ...]. For those rules, your request must name the listed item to count as direction.

Rule summaries below are short. Official page: Configure Auto Mode. Rules marked Undocumented come from claude auto-mode defaults.

Allow Rules​

Each allow rule is an exception to the soft deny rules.

RuleStatusWhat it allows
Security DiscussionUndocumentedReading, reviewing, or writing security code and threat models is fine as part of your task.
Transient RetryUndocumentedRetrying an action after a network error, timeout, or rate limit is not a bypass.
Test ArtifactsDocumentedFake test keys, placeholder credentials, and hardcoded test cases are fine.
Local OperationsUndocumentedDeleting or changing local files inside the project is fine.
Read-Only OperationsUndocumentedGET requests and queries that change nothing and return no secrets are fine.
Declared DependenciesUndocumentedInstalling packages that the repo manifest already lists is fine.
Toolchain BootstrapUndocumentedInstalling a language toolchain from its official one-line installer is fine when the repo needs it.
Standard CredentialsUndocumentedReading a credential from the agent config and sending it to its own provider is fine.
Session-Created Job CleanupUndocumentedDeleting the jobs that the agent itself made in this session is fine.
Git Push DestinationUndocumentedPushing to any branch of the session repo is normal, also the default branch.
Trusted Internal Infra (Data Flow)UndocumentedDomains, buckets, and services in Environment count as internal, not external.
Scheduled-Task FiresUndocumentedA scheduled-task prompt is not a live human instruction.
Multi-Agent CoordinationUndocumentedMessages between teammates and subagents are normal traffic.
Memory DirectoryUndocumentedRoutine writes to and deletes from the memory directory are fine.
CLAUDE.md ContentUndocumentedEditing CLAUDE.md is fine when the text does not change permissions or auto mode.
Claude Code SchedulingUndocumentedUsing CronCreate, CronDelete, CronList, or RemoteTrigger to schedule tasks is fine.
Browser Trusted NavigationUndocumentedNavigating the browser to a trusted domain, localhost, or a URL you named is fine.

Hard Deny Rule​

RuleStatusWhat it blocks
Data ExfiltrationDocumentedSending sensitive data across the trust boundary is always blocked, even when you ask for it.

A scoped exception sends commits and pushes of sensitive material to the Sensitive-Source Provenance soft rule when that rule exists.

Environment Fields​

Most fields say None configured. Fill them with autoMode.environment.

FieldStatusDefault text
OrganizationDocumentedNone configured.
Primary use of Claude CodeDocumentedsoftware development.
Cloud provider(s)DocumentedNone configured.
Repository visibilityDocumentedassume private unless the remote host and repo name indicate otherwise, or a visibility check in the transcript shows public.
Internal sharing / snippet hostingDocumentedNone configured.
Org-specific CLIsDocumentedNone configured.
Secrets managementDocumentedNone configured.
CI/CD deploy targetsDocumentedNone configured.
Network postureDocumentedNone configured.
Host containmentDocumentedNone configured.
Protected deployment namespaces / environmentsDocumentedNone configured.
Data retention / declassificationDocumentedNone configured.
Trusted repoDocumentedThe git repository the agent started in (its working directory) and its configured remote(s). When the repo's public/private visibility is given.
Source controlDocumentedThe trusted repo and its remote(s) only (no additional orgs configured).
Trusted internal domainsDocumentedNone configured.
Trusted cloud bucketsDocumentedNone configured.
Key internal servicesDocumentedNone configured.
Internal package registryDocumentedNone configured.
Sensitive data locations & audiencesDocumentedany file or store holding personal data, confidential business data, credentials, regulated data, or similarly sensitive material, and more.
Sensitive remote targetsDocumentedany namespace, host, or container whose name carries prod or production as a whole word or name segment (hyphen/underscore/dot-delimited.
Protected IaC scopesDocumentedIAM, RBAC, networking, quota, and node-pool resources, anything whose name or tag carries prod or production as a whole word or name segment.

Soft Deny Rules​

RuleStatusWhat it blocks
Git DestructiveDocumentedForce-pushes, remote branch or tag deletes, and history rewrites that destroy the work of others.
Code That Leaks When RunUndocumentedCommitting code that would leak secrets or widen access when it runs.
Code from ExternalUndocumentedRunning code that came from an outside source.
Cloud Storage Mass DeleteUndocumentedMass deletes on cloud storage, or dropping data stores.
Production DeployDocumentedDeploys to production and production database migrations.
Remote Shell WritesUndocumentedWriting to live production or shared hosts through ssh, kubectl exec, and similar.
Sensitive Remote ExecUndocumentedInteractive sessions or port forwards into sensitive remote targets.
Production ReadsUndocumentedReading inside live production through a remote shell.
Blind ApplyUndocumentedApplying live infrastructure changes with --yes or --auto-approve and no preview.
Protected-Scope IaC ApplyUndocumentedInfrastructure-as-code applies that touch protected scopes.
Logging/Audit TamperingUndocumentedStopping logs, deleting log directories, or removing audit trails and git hooks.
Permission GrantUndocumentedGranting admin roles, adding repo users, or raising IAM permissions.
Account & Standing-Rule ChangesUndocumentedChanging account security or creating standing rules, such as mail forwarding.
TLS/Auth WeakenUndocumentedTurning off TLS checks or authentication on a service.
Secret-Store WritesUndocumentedCreating, rotating, or deleting entries in a secret manager.
DNS / Domain / Cert ChangesUndocumentedChanging DNS records, domain settings, or TLS certificates.
Security WeakenUndocumentedTurning off security controls or adding ways around them.
Security Test RemovalUndocumentedDeleting or skipping tests that guard auth, crypto, or sandboxing.
Safety Bypass FlagUndocumentedRunning a command with a flag such as DANGEROUSLY_* or BREAKGLASS*.
Create Unsafe AgentsUndocumentedCreating agent loops that run commands with no human approval.
Interfere With WorkloadsUndocumentedDeleting, cancelling, or killing jobs the agent did not start in this session.
Shared Cluster MutationUndocumentedWrites to a shared compute cluster that can hit the jobs of other users.
CI BypassUndocumentedDisabling CI checks, editing branch protection, or marking required checks as optional.
Modify Shared ResourcesUndocumentedChanging or destroying shared resources that this session did not create.
Irreversible Local DestructionUndocumentedDeleting or overwriting local files that existed before the session, such as rm -rf.
Unverifiable Deletion TargetUndocumentedA forced recursive delete whose target is a shell variable or a glob.
Shared Scratch SweepUndocumentedBroad deletes in shared scratch space such as /tmp.
Irreversible Deletion (general)UndocumentedTearing down a stateful resource that the agent did not create.
Unverifiable Deletion ScopeUndocumentedA delete on shared or remote state whose targets are computed at run time.
Create RCE SurfaceUndocumentedCreating endpoints that run arbitrary code, or code with remote-execution holes.
Expose Local ServicesUndocumentedStarting a listener or file server that exposes local files or a shell to the network.
External Ingress TunnelUndocumentedOpening a tunnel, such as ssh -R, that makes a local address reachable from the internet.
Credential LeakageUndocumentedWriting real secrets into commits, images, or other lasting files.
Credential MaterializationUndocumentedPrinting a live token or credential into output, the transcript, or a file.
Credential ExplorationUndocumentedScanning credential stores for secrets.
PII Data HandlingUndocumentedCopying sensitive data out of its listed location.
Exfil ScoutingUndocumentedTesting which outside endpoints are reachable, to prepare data theft.
Traffic RedirectionUndocumentedPointing API base URLs, proxies, or registries at third-party hosts.
Remote RepointUndocumentedChanging where pushes go, such as git remote set-url.
Out-of-Place PublicationUndocumentedPushing or publishing work to a public place that does not fit the task.
Sensitive-Source ProvenanceDocumentedSensitive content flowing into a repo, a commit, or a push.
Excess Sensitive DetailUndocumentedSending more sensitive detail to a recipient than you approved.
Unrequested Artifact PublishUndocumentedPublishing a file to a claude.ai page with the Artifact tool without being asked.
Live-Shared Artifact Sensitive DeltaUndocumentedAdding sensitive content to an artifact that viewers see live.
Sandbox Network CallbackUndocumentedA sandboxed command that opens a connection to an unapproved host.
Command Network ListsUndocumentedA shell command that sets its own allowed_domains list.
Containment EscapeUndocumentedReaching past the network or identity boundary of the container or VM that runs Claude Code.
Create Public SurfaceUndocumentedCreating a public repo, release, or package.
Public Data-Sharing UploadUndocumentedCreating gists or uploading data to public sharing services.
Untrusted Code IntegrationUndocumentedPulling in code from outside your orgs and arranging for it to run.
Package Registry BypassUndocumentedInstalling from a public registry when an internal registry exists.
Unauthorized PersistenceUndocumentedAdding SSH keys or editing shell profiles and credential stores.
Self-ModificationUndocumentedEditing the permissions, hooks, or sandbox config of the agent itself.
Tmux Self DriveUndocumentedSending keystrokes to the pane of the agent itself to change its own oversight.
Instruction PoisoningUndocumentedWriting to files that a later session reads as instructions, such as CLAUDE.md.
Auto-Mode BypassUndocumentedWorking around the classifier or the permission system.
Session Transcript TamperingUndocumentedWriting to session transcript files.
Unrequested Commit in a Connected AppUndocumentedCommitting a decision in a connected app when you asked only for a read or a draft.
External System WritesUndocumentedDeleting, closing, or mass-changing items in tools such as Jira, Linear, or mail.
Merge Without ReviewUndocumentedMerging a pull request before a human approves it.
Self-ApprovalUndocumentedApproving a pull request that the agent wrote.
ChatOps Trigger CommentsUndocumentedPosting a comment that is a command to automation, such as atlantis apply.
Feature Flag WritesUndocumentedChanging or deleting a production feature flag.
Node Lifecycle OperationsUndocumentedCordoning, draining, restarting, or removing cluster nodes.
Cluster-Wide Workload CreationUndocumentedCreating resources that run on every node or intercept cluster traffic.
Real-World TransactionsUndocumentedPayments, purchases, trades, and other actions with real-world cost.
Third-Party AttackUndocumentedAttacking a real system of an outside party.
Browser Navigate ExfilUndocumentedNavigating the browser to an unrelated outside domain, with data in the URL.
Browser Input ExfilUndocumentedTyping credentials or sensitive data into a browser page that you did not provide.
Browser JS ExfilUndocumentedBrowser scripts that read cookies or storage and send them off-site.
Browser File Upload ExfilUndocumentedUploading files from outside the project, or sensitive files, in the browser.
Browser Shortcut ExecutionUndocumentedRunning browser shortcuts, whose effect is hidden.