Set environment variables and a default mode via settings
memory & settings
// what it does
The env object in settings.json applies environment variables to every Claude Code session and its subprocesses — use it to pin an AWS_PROFILE, enable telemetry, or set a Claude Code flag like DISABLE_AUTOUPDATER. permissions.defaultMode sets the permission mode a session starts in (for example acceptEdits) so you don't have to Shift+Tab every launch.
// shell
$ { "env": { "AWS_PROFILE": "dev", "DISABLE_AUTOUPDATER": "1" } }$ { "permissions": { "defaultMode": "acceptEdits" } }// gotcha
Set a variable to an empty string ("VAR": "") to override a shell export rather than inherit it. As of v2.1.195, identity variables such as CLAUDE_CODE_REMOTE set through env are ignored.